Property-Type from a inter-moded reference can't be correctly resolved? [message #626230] |
Tue, 18 March 2008 10:40 |
Jinhui Messages: 42 Registered: July 2009 |
Member |
|
|
Hi everyone,
I am using RSA7, and having a problem about how to get the type-name of a
property, which is a reference to a class in another model(the
"modelLibrary").
like following:
M1 (M1.emx)
|--Class1
|--attr1 (type: M2.Integer)
M2(M2.emx, defined as a ModelLibrary in RSA7)
|--Integer
I want to get the name of type of "attr1" (i.e. it should be "Integer"),
but using the following code snippet, I can't get the type of the
Property, the type of the property attr1 is a Proxy without much
information, not even the name.
Class c = (Class)entityPkg.getPackagedElement("Class1");
for(Iterator iter = c.getOwnedAttributes().iterator(); iter.hasNext();) {
Property p = (Property)iter.next();
System.out.println("Property name : " + p.getName() + ", type : " +
p.getType().getName());
}
type information from the debug session:
org.eclipse.uml2.uml.internal.impl.ClassImpl@67886788 (eProxyURI:
platform:/resource/EvaluationTestModel/libs/M2.emx#_Ktwuva7K EdqP-KXzb5-4Sg?M2/Integer?)
Further inspecting this type, I found that almost everything is null,
except for the eProxyURI. I guess this is because this Proxy is not
resolved, right?
So my question is how can I resolve this proxy and get the name of the
type.
Any help would be greatly appreciated.
Regards!
Jinhui
|
|
|
Powered by
FUDForum. Page generated in 0.03273 seconds