Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: Navigating on UML metamodel
Re: Navigating on UML metamodel [message #628239] Mon, 22 February 2010 18:17 Go to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
I think it's best to ask about UML specific details on the UML2
newsgroup, which I've added to the "to" list of the reply, so no need to
repost.



CaribeanAlien wrote:
> Hi,
>
> I would like to create a standalone program able to display the list
> of elements available inside of the UML metamodel. To do this, I've
> tried to register into the resourceSet the path to the UML jar
> (org.eclipse.uml2.uml.resources_2.2.0.v200805131030.jar), as shown in
> the FAQ. Then, my thought was to access to the resource representing
> the UML Metamodel :
> Resource res =
> _resourceSet.getResource(URI.createURI(UMLResource.UML_METAM
> ODEL_URI), true);
> and to navigate over it.
>
> I didn't get error, but unexpected results. When I display elements
> name, It seems to be all the same. A lot of MetaElement, ... But no
> access to the real name! It seems to be a real mess. Does anyone has
> an idea?
> here is the test code I'm working on : http://www.pastebin.com/f44dc1608
>
> I'm currently waiting for the EMF book, hoping this to help me. Thanks
> in advance for any help!


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Navigating on UML metamodel [message #628240 is a reply to message #628239] Mon, 22 February 2010 19:34 Go to previous message
Vlad Varnica is currently offline Vlad VarnicaFriend
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
You need to parse the .uml file. which is in your Package Explorer.
First identify how is saved the name of the element in the xmi then just make a query directly on the xml.

I think it is more simple to query the metamodel once it has been already created than during the creation stage :p
Previous Topic:Re: Associations lost when converting from UML
Next Topic:Naviagate throught UML statemachine diagram
Goto Forum:
  


Current Time: Fri Apr 19 23:22:46 GMT 2024

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

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

Back to the top