Trong mô hình Ecore của tôi, tất cả các kiểu đến từ bên ngoài mô hình hiện tại đều không được giải quyết bởi proxy của chúng. Tất cả các trường của đối tượng được trả về bởi getType()
là null
và chỉ URI loại lưu trữ được điền vào lúc chạy.EProxy URI không giải quyết trong mô hình sinh thái
Dưới đây là một trích mô hình của tôi:
<?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>
Hiện nay nếu tôi thực hiện một
Address a = <address item from model>
Type t = a.getType();
tất cả các lĩnh vực t
sẽ null
và toString()
lợi nhuận gì đó như:
[email protected] (eProxyURI:
platform:/plugin/org.eclipse.uml2.types/model/Types.ecore#//String)