Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » how to initialize class diagram from .uml file programmactically
how to initialize class diagram from .uml file programmactically [message #624892] Wed, 07 October 2009 09:19 Go to next message
hadaytullah  is currently offline hadaytullah Friend
Messages: 5
Registered: October 2009
Junior Member
Hi,

I have creat .uml file using UML2 Api. Now I want to initialize a class diagram and also want to show it a class diagram editor provided by uml2 tools plugin.

How can I achieve this?

-----------
Hadaytullah
Re: how to initialize class diagram from UML2 Model programmactically [message #624893 is a reply to message #624892] Wed, 07 October 2009 15:13 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad VarnicaFriend
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
Do you mean to create a view of your model inside a class diagram ?
If yes, I have written a short tutorial last year on this subject available at: http://www.forum-omondo.com/documentation_eclipseuml_2008/ec lipseuml2008_dynamic_navigation.html

We have changed the way it works after our first customers return of experience. You just need now to paste and copy the .uml inside an existing project then with the XMI editor drop the element inside a diagram and the tool merge both models. You can have as many sub model model as you need, no size limitation. Each model is a submodel of the metamodel. You keep UML Id during this transformation stage. Only stereotypes are lost but this is an EMF issue not related to Omondo.


There could other tutorials available on this class diagram creation from an existing model but I never found them. I would also be interested to read other articles on this subject.

Vlad
Omondo
Re: how to initialize class diagram from UML2 Model programmactically [message #624898 is a reply to message #624892] Fri, 09 October 2009 10:25 Go to previous message
Vlad Varnica is currently offline Vlad VarnicaFriend
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
What do you mean by .umlclass ? Is-it the graphical information or the model information ? Don't forget that in UML you always have two or more models. The graphical model is used to display the information on the screen (e.g. element position and size for example) and the model information is the XMI (e.g metamodel and xmi interoperability for example).

It seems that your question is to be able to create immediately a diagram without human decision !! If this is your need then you can have a look in the code of each menu. Each menu has a specific call to a method which could be simulated.
You need to create the following steps:
Download EMF, UML2, GMF and GEF jar files to create a development environment.
Create a diagram and give it a name.
Select classifiers and drop them into the diagram.
Refresh the diagram.

It should work but this is a big job !!
Good luck for your project :)

Vlad,
Previous Topic:How to remove "src" and "dst", and other questions
Next Topic:UML Profile - Stereotype - Tagged Values - Value Editor(s)
Goto Forum:
  


Current Time: Fri Nov 28 07:13:00 GMT 2014

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

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