EProxy URI does not resolve in ecore model
Asked Answered
U

1

8

In my Ecore model all types that come from outside the current model are not resolved by their proxies. All fields of the object returned by getType() are null and only the storage type URI is filled in at runtime.

Here is an extract of my model:

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model" nsURI="http:///model.ecore" nsPrefix="model">
  <eSubpackages name="general" nsURI="http:///model/general.ecore" nsPrefix="model.general">
    <eClassifiers xsi:type="ecore:EClass" name="Address">
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="street" ordered="false" lowerBound="1"
      eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String"/>
    </eClassifiers>
  </eSubpackages>
</ecore:EPackage>

Currently if I make an

Address a = <address item from model>
Type t = a.getType();

all fields of t will be null and the toString() returns something like:

org.eclipse.uml2.uml.internal.impl.PrimitiveTypeImpl@6e315086 (eProxyURI:
 platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String)
Ulrikaumeko answered 20/6, 2013 at 12:11 Comment(0)
T
6

Change the proxy URIs from platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String to contain the NS URI of the package that contains the data type: http://www.eclipse.org/uml2/4.0.0/Types#//String.

Note that this change can only be done in a textual editor.

Turino answered 20/6, 2013 at 12:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.