How to use user defined class within profile? [message #627400] |
Wed, 18 February 2009 01:56 |
maniel Messages: 7 Registered: July 2009 |
Junior Member |
|
|
I have defined a stereotype "stereoA" and a class "Class1" in a profile.
An attribute called "attr1" within "stereoA" type is "Class1". The
"Class1" has a property "tablename".
I tried different approaches and still unable to set data into "tablename".
If I use below.
element.setValue(stereoA, "attr1::Class1[0]::tablename", "This is some
text");
it fails due to null point, because Class1[0] not exist in first place.
How can I create Class[0] in the first place?
To create an instance of Class1, I use
EObject eobj = myProfile.create(profile.getOwnedType("Class1")).
It fails as the profile.getOwnedType("Class1") returns a "Type" not a
"Classifier" which myProfile.create() expects a "Classifier".
How can I get the "Classifier" from "Type"?
Could somebody please enlighten me?
|
|
|
Powered by
FUDForum. Page generated in 0.02568 seconds