Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » class name
class name [message #473111] Thu, 07 June 2007 22:43 Go to next message
charfi asma is currently offline charfi asma
Messages: 78
Registered: July 2009
Member
Hi,
I know tha this question is so easy, but I can not resolve it!
I select a class (named Client1) with stereotype named Client. I want to
extract the class's name
this is the value of my selection (type Element)
"org.eclipse.uml2.uml.internal.impl.ClassImpl@188a387 (name: Client1,
visibility: <unset>) (isLeaf: false, visibility: public, isAbstract: false)
(isActive: false, isAbstract: false)"ant to extract from this element the
name Client1.
I used getclass().getname(), getSimplename(), getclass().tostring() but all
this method reffer to classimpl.
and eclass() method reffer to Class.

thank you!

asma


so I w
Re: class name [message #473112 is a reply to message #473111] Thu, 07 June 2007 13:51 Go to previous messageGo to next message
Eclipse User
Originally posted by: firstname.name.gmail.com

In the last post, on 06/08 about 12h, "charfi" (charfi asma) wrote:

charfi> I want to extract the class's name this is the value of my
charfi> selection (type Element)

You have to cast your selection to a typed NamedElement (if you are sure to only
receive NamedElements..)


--
F. Lagarde
Re: class name [message #473114 is a reply to message #473111] Thu, 07 June 2007 23:00 Go to previous message
charfi asma is currently offline charfi asma
Messages: 78
Registered: July 2009
Member
Hi fran
Re: class name [message #619779 is a reply to message #473111] Thu, 07 June 2007 13:51 Go to previous message
Eclipse User
Originally posted by: firstname.name.gmail.com

In the last post, on 06/08 about 12h, "charfi" (charfi asma) wrote:

charfi> I want to extract the class's name this is the value of my
charfi> selection (type Element)

You have to cast your selection to a typed NamedElement (if you are sure to only
receive NamedElements..)


--
F. Lagarde
Re: class name [message #619782 is a reply to message #473111] Thu, 07 June 2007 23:00 Go to previous message
charfi asma is currently offline charfi asma
Messages: 78
Registered: July 2009
Member
Hi fran
Previous Topic:class name
Next Topic:Exporting UML diagram and profile
Goto Forum:
  


Current Time: Sat Sep 20 22:14:20 GMT 2014

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

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