Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » How to get the type of the element
How to get the type of the element [message #891636] Mon, 25 June 2012 11:48 Go to next message
Tex Iano is currently offline Tex IanoFriend
Messages: 99
Registered: February 2012
Member
Hi,

within my application I am storing UML elements.

private Element element;

How can I get the type of the element? For example, if it is a UML Class, I want to have "Class" as result. When it is a Port "Port" etc. I do not need it as string. Even a "type" is more better.

Any ideas?

Regards,

Tex
Re: How to get the type of the element [message #891670 is a reply to message #891636] Mon, 25 June 2012 13:08 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The MDT/UML2 project is based on Ecore so try eClass().getName().

Regards

Ed Willink

On 25/06/2012 12:48, Tex Iano wrote:
> Hi,
>
> within my application I am storing UML elements.
>
> private Element element;
>
> How can I get the type of the element? For example, if it is a UML
> Class, I want to have "Class" as result. When it is a Port "Port" etc.
> I do not need it as string. Even a "type" is more better.
>
> Any ideas?
>
> Regards,
>
> Tex
Previous Topic:error using UML as input
Next Topic:element.getXYZs(String name, boolean ignoreCase, EClass eclass)
Goto Forum:
  


Current Time: Fri Mar 29 08:58:31 GMT 2024

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

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

Back to the top