Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » how to initialize class diagram from UML2 Model programmactically
how to initialize class diagram from UML2 Model programmactically [message #490079] 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 a UML2 'model' object. Now I want to initialize a class diagram and also want to show it in a class diagram editor provided by uml2 tools plugin.

How can I achieve this?

-----------
Hadaytullah

[Updated on: Wed, 07 October 2009 09:29]

Report message to a moderator

Re: how to initialize class diagram from UML2 Model programmactically [message #490159 is a reply to message #490079] 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 #490582 is a reply to message #490159] Fri, 09 October 2009 09:42 Go to previous messageGo to next message
hadaytullah  is currently offline hadaytullah Friend
Messages: 5
Registered: October 2009
Junior Member
Thaks,

Actually i want to creat .umlclass file and then want to show in uml2tools class diagram editor. And i wanna do this all programmatically.


------------
Hadaytullah
Re: how to initialize class diagram from UML2 Model programmactically [message #490596 is a reply to message #490079] Fri, 09 October 2009 10:25 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
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 Smile

Vlad,
Re: how to initialize class diagram from UML2 Model programmactically [message #491794 is a reply to message #490582] Thu, 15 October 2009 21:30 Go to previous messageGo to next message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 62
Registered: July 2009
Member
Hello Hadaytullah,

UMLDiagramEditorUtil#createDiagram() and UMLDiagramEditorUtil#openDiagram() are used in order to create and open a diagram.

For more details yu can search in this forum, I remember the similar question here.
Also, the same topic was discussed recently in the GMF forum.

Best wishes,
Tanya.
Re: how to initialize class diagram from UML2 Model programmactically [message #491795 is a reply to message #490596] Thu, 15 October 2009 21:33 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 62
Registered: July 2009
Member
Vlad,
you asked
> What do you mean by .umlclass ? Is-it the graphical
> information or the model information ?
It's an extension of diagram model files for Class diagrams.
Tanya.

Re: how to initialize class diagram from UML2 Model programmactically [message #624897 is a reply to message #490159] Fri, 09 October 2009 09:42 Go to previous message
hadaytullah  is currently offline hadaytullah Friend
Messages: 5
Registered: October 2009
Junior Member
Thaks,

Actually i want to creat .umlclass file and then want to show in uml2tools class diagram editor. And i wanna do this all programmatically.


------------
Hadaytullah
Re: how to initialize class diagram from UML2 Model programmactically [message #624903 is a reply to message #490582] Thu, 15 October 2009 21:30 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 62
Registered: July 2009
Member
Hello Hadaytullah,

UMLDiagramEditorUtil#createDiagram() and UMLDiagramEditorUtil#openDiagram() are used in order to create and open a diagram.

For more details yu can search in this forum, I remember the similar question here.
Also, the same topic http://www.eclipse.org/forums/index.php?t=msg&th=153840& amp;start=0&S=dbc8223418fe189951546941f0a54bd4 in the GMF forum.

Best wishes,
Tanya.
Re: how to initialize class diagram from UML2 Model programmactically [message #624904 is a reply to message #490596] Thu, 15 October 2009 21:33 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 62
Registered: July 2009
Member
Vlad,
you asked
> What do you mean by .umlclass ? Is-it the graphical
> information or the model information ?
It's an extension of diagram model files for Class diagrams.
Tanya.
Previous Topic:Newbie - generated class is extending interface not implementing
Next Topic:How to remove "src" and "dst", and other questions
Goto Forum:
  


Current Time: Sat Apr 20 03:55:29 GMT 2024

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

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

Back to the top