Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » How to get all available UML properties
How to get all available UML properties [message #895872] Mon, 16 July 2012 12:03 Go to next message
Tex Iano is currently offline Tex IanoFriend
Messages: 99
Registered: February 2012
Member
Hi,

when I open a UML model within the model editor, in the properties view in eclipse there are some properties like "Name", "Use Case", "Visibility" etc. (depending on the selected element type).

How can I get these properties automatically? Are these structural features of the eClass?

I.e.: selectedUMLElement.eClass().getEAllStructuralFeatures()?

Because this list is much longer than within Eclipse. Or is there a way to work on UML element? I tried:

selectedUMLElementClassifier.allFeatures()

But this list is empty.

So how can I get a list of available properties for a UML element? Any ideas?

Regards,

Tex
Re: How to get all available UML properties [message #895878 is a reply to message #895872] Mon, 16 July 2012 12:21 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

In principle getEAllStructuralFeatures() should be what you want, but
you may want to filter the list to eliminate transient/volatile/derived
properties. You may want to eliminate opposites. You may care about
derived/subset union properties and redefinitions, which in Ecore
requires you to examine the EAnnotations. If you are using UML you
should probably examine the UML model to avoid the simplifications of
conversion to Ecore.

Regards

Ed Willink


On 16/07/2012 13:03, Tex Iano wrote:
> Hi,
>
> when I open a UML model within the model editor, in the properties
> view in eclipse there are some properties like "Name", "Use Case",
> "Visibility" etc. (depending on the selected element type).
>
> How can I get these properties automatically? Are these structural
> features of the eClass?
>
> I.e.: selectedUMLElement.eClass().getEAllStructuralFeatures()?
>
> Because this list is much longer than within Eclipse. Or is there a
> way to work on UML element? I tried:
>
> selectedUMLElementClassifier.allFeatures()
>
> But this list is empty.
> So how can I get a list of available properties for a UML element? Any
> ideas?
>
> Regards,
>
> Tex
Re: How to get all available UML properties [message #897505 is a reply to message #895878] Tue, 24 July 2012 10:26 Go to previous messageGo to next message
Tex Iano is currently offline Tex IanoFriend
Messages: 99
Registered: February 2012
Member
Hi,

thanks. Already works a little bit Smile But what is the EAnnotation for?

Regards,

Tex
Re: How to get all available UML properties [message #897524 is a reply to message #897505] Tue, 24 July 2012 12:02 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The EAnnotations contains aspects of UML such as 'redefines' that are
not directly representable in Ecore.

Regards

Ed Willink

On 24/07/2012 11:26, Tex Iano wrote:
> Hi,
>
> thanks. Already works a little bit :) But what is the EAnnotation for?
>
> Regards,
>
> Tex
Previous Topic:Stereotype/Profile Hello World
Next Topic:Multilingual models and OWL
Goto Forum:
  


Current Time: Thu Apr 25 01:34:01 GMT 2024

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

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

Back to the top