EProxy URI does not allow in ecore model

In my Ecore model, all types that come from outside the current model are not allowed by their proxies. All fields of the object returned by getType() are null , and at run time only the storage type URI is populated.

Here is an excerpt from 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 create

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

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

 org.eclipse.uml2.uml.internal.impl.PrimitiveTypeImpl@6e315086 (eProxyURI: platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String) 
+7
source share
1 answer

Change the proxy URI 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 .

Please note that this change can only be made in a text editor.

+5
source

All Articles