Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » How to use user defined class within profile?
How to use user defined class within profile? [message #627400] Wed, 18 February 2009 01:56
maniel  is currently offline maniel Friend
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
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?
Previous Topic:Extending L2.uml
Next Topic:[Announce] MDT UML2 2.2.2 is available
Goto Forum:

Current Time: Sun Mar 29 16:28:06 GMT 2020

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

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

Back to the top