Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Property-Type from a inter-moded reference can't be correctly resolved?
Property-Type from a inter-moded reference can't be correctly resolved? [message #626230] Tue, 18 March 2008 10:40
Jinhui is currently offline JinhuiFriend
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
Previous Topic:Illegal Argument setting a stereotype property
Next Topic:Property-Type from a inter-moded reference can't be correctly resolved?
Goto Forum:
  


Current Time: Sat Nov 29 09:10:41 GMT 2014

Powered by FUDForum. Page generated in 0.12641 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software