Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » How to add several use-case diagrams to one model file?(How can one create more than one diagram of the same type (like class, sequence etc)?)
How to add several use-case diagrams to one model file? [message #486831] Sat, 19 September 2009 16:25 Go to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: September 2009
Junior Member
Dear all,

I am fairly new to UML2tools and have stumbled on a problem that dramatically reduces the usefullness of UML2tools - it seems to be possible to only have one diagram of the same type in a certain UML model.

I am able to create a new diagram using the File, New menu, and a model file is created along with the first diagram file I create.

By right clicking on the model file in the Project explorer, I can create several more diagrams that are connected to the same model (if I use the File, New menu to create a new diagram, every new diagram comes with its own new model file as well) using the "Initialize...." context menu commands.

However, whenever I create more than one diagram of the same type for a model file, the second diagram is autopopulated with the contents of the first diagram, and they do in general interfere with each other.

Creating every diagram with its own model file appears to break the connections between the diagrams, ie the OnEnter action in a statechart state, can for example not find an activity defined in an activity diagram.

So, what is the recommended way to create several diagram files of the same type for a model file, such that the diagrams can find each other's information?

Any information most welcome!

Kind regards,
Goran
Re: How to add several use-case diagrams to one model file? [message #487778 is a reply to message #486831] Thu, 24 September 2009 12:10 Go to previous messageGo to next message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 62
Registered: July 2009
Member
Hello Goran,

Yes, it is possible to create several diagrams of the same kind for the same model.

All UML2 Tools diagrams are in synchronized mode by default. To be in synchronized mode means, that changes in the model are reflected on the diagramimmediately and vise versa. The opposite to 'synchronized' is 'semi-synchronized' mode, when the user can manage content of the diagram, e.g. delete an element from the diagram or add an existing element to the diagram. This semi-synchronized mode is what you actually need. As I mentioned above, the diagrams are synchronized by default. How to make them semi-synchronozed?

Just invoke the context menu of the diagram, select 'Synchronize...' action. In the dialog opened select the root element (model or package), invoke context menu for it and select 'Disable Synchronization' action. Now press 'OK' for the 'Synchronize...' diagram and that's it.
Reapeat this procedure with all diagrams you would like to have semi-synchronized.

A bit more information on how to work with semi-synchronized diagrams can be found here - http://wiki.eclipse.org/MDT/UML2Tools/New_and_Noteworthy/Gal ileo#Class_diagram_synchronization

Best wishes,
Tanya.
Re: How to add several use-case diagrams to one model file? [message #493238 is a reply to message #487778] Fri, 23 October 2009 18:54 Go to previous messageGo to next message
Johan  is currently offline Johan Friend
Messages: 39
Registered: July 2009
Member
Thank you very much, it seems as this is the feature I need to use, to create several different diagrams of the same type, over the same UML model file!

However, when I follow your description, this is not really working well.

First of all, it is very un-intuitive after clicking the "Synchronise..." command in the context menu. It took me a long while to realise that I need to right-click on the root item in the dialog box, to change the synchronisation method. Some toolbar buttons would be needed here!

Secondly, even if I disable synchronisation in class diagrams, there isn't a good way to create several different diagrams stored in the same uml model file. If I use the File, New menu, I always need to enter diagram filename and model filename. The dialog box does not allow me to use the filename of an existing model file. Therefore, the File, New menu can't be used to create several (different) diagrams of the same type, to be stored in the same UML model file.

The second approach was to create the first class diagram using the File, New menu. Then I wanted to create a second UML class diagram, so I tried the "New diagram" command in the context menu of the first class diagram. This wizard requires me to "select semantic model element to be depicted on the diagram". The only item to select is the package from the first diagram. When the second diagram is created, it is populated with the package and class from the first diagram. I made sure to disable synchronisation from both the first and second diagrams. Then in the second diagram, I removed the class from the first diagram, that ended up in the second diagram. Then I opened the first diagram, the class was gone also from the first diagram.
So, the "Add diagram" context menu does not work to create new diagrams that are supposed to contain different contents.

The final attempt was to create a first class diagram using the File, New menu, and the second class diagram using the context-menu over the model.uml file (Initialize...). Also this method results in the package from the first diagram to be auto-inserted in the new diagram, but this time I get an option to deselect insertion of other graphical items from the model file. But if I remove the package in the new diagram, that came from the first diagram and was auto-inserted in the new diagram, the package is removed also from the first diagram.

Furthermore, the Synchronise command does not exist in all diagram types. For example, it is impossible to create several state/event diagrams (with different contents), that are stored in the same UML model file, as the "Synchronise..." command does not exist in the diagram context menu.

All-in-all, it still appears UML2Tools does not allow users to create severeal different diagrams of the same type, to be stored in the same UML model file. At least not in a way that is nearly as easy and intuitive as it needs to be.

If anyone have figured out how to create several different diagrams of the same type, to be stored in the same model file, in a reasonably stable and useful way, I'd appreciate very much any suggestions on how to do it!

/Goran
Re: How to add several use-case diagrams to one model file? [message #495070 is a reply to message #493238] Tue, 03 November 2009 17:16 Go to previous messageGo to next message
Johan  is currently offline Johan Friend
Messages: 39
Registered: July 2009
Member
Hi,

Is it really possible that no-one knows how to add many diagrams of the same type to the same model file, without the different diagrams interfering with each other's contents?

Surely it must be possible to create for example 3 different class diagrams and 4 different statemachine diagrams and store all of them in the same model file, without having the diagrams adding/removing things from each other???

I am looking for a solution that works for ALL supported diagram types.

Any help most welcome!

/Johan
Re: How to add several use-case diagrams to one model file? [message #495304 is a reply to message #486831] Wed, 04 November 2009 14:32 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
You are certainly talking about the meta modeling approach opposed to Eclipse UML tools using models transformation with GMF+EMF.

The UML meta modeling is a new concept in which all diagram elements are live synchronized with the UML metamodel. Your UML diagrams are a view of your metamodel and not of your model and no need anymore for transformation.
I agree this meta modeling makes life easier Very Happy

Vlad


Re: How to add several use-case diagrams to one model file? [message #495367 is a reply to message #486831] Wed, 04 November 2009 16:20 Go to previous messageGo to next message
Thomas Neustupny is currently offline Thomas NeustupnyFriend
Messages: 75
Registered: October 2009
Member
Vlad, I don't understand your answer. The diagram should be a view of a (part of) the model, not of the metamodel? So, if the diagram elements are different objects then the elements in the model (just referring them), then you could have as many diagrams of the same type as you like on top of the same model. And you can even have full synchronization between the model and all diagrams. Does UML2Tools does not follow this approach? (I don't know what is stored in the uml file).

Goran, I fully understand your question, maybe you should try to find out how model and diagrams are handled in UML2Tools. Sorry, I can't help you here. I'm a developer of ArgoUML, where this feature is taken for granted.

Maybe it's one of those issues why Papyrus was made: for some things UML2Tools is more appropriate, some other things are addressed by Papyrus and other UML design tools. Check if you hit the border of UML2Tools. If I understood correctly the intention of UML2Tools, it just allows for UML2 compliant editing of models, so having a model element on different diagrams of the same type is probably not the primary goal here. I might be wrong (can't speak for UML2Tools) and would appreciate to be corrected by UML2Tools experts.
Re: How to add several use-case diagrams to one model file? [message #495384 is a reply to message #495367] Wed, 04 November 2009 17:02 Go to previous message
Johan  is currently offline Johan Friend
Messages: 39
Registered: July 2009
Member
Vlad and Thomas, thank you both for you responses!

I am a newbie so I agree with Thomas, I don't understand Vlad's answer, as it was slightly too technical for me.

The bottom line is that I'd like to have several different diagrams of the same type (containing different sets of data from one model file, say one class diagram for graphic management, one class diagram for communication protocols and another class diagram for database access etc).

It is possible in UML2tools to do this but only if there is one model file for each diagram file, which means that the diagrams don't know about each others entities - it is for example not possible to select an activity from an activity diagram as an Entry action in a state in a statemachine diagram, in a convenient way.

With the current UML2tools solution, it appears that several diagrams of the same type interfere with each other if they are stored in the same model file, as all diagrams synchronize the same set of data from the model file. I.e all diagrams of the same type always show identical information as the diagrams effectively synch with each other as soon as a change is made in one diagram.

What one would like to do is to have each diagram to only display a PART of the data from the model file (the part that was added to the model from that specific diagram only), not always having it to display ALL the data from the model file.

Any clarifications on this matter are still much appreciated!
Re: How to add several use-case diagrams to one model file? [message #625136 is a reply to message #493238] Tue, 03 November 2009 17:16 Go to previous message
Johan  is currently offline Johan Friend
Messages: 39
Registered: July 2009
Member
Hi,

Is it really possible that no-one knows how to add many diagrams of the same type to the same model file, without the different diagrams interfering with each other's contents?

Surely it must be possible to create for example 3 different class diagrams and 4 different statemachine diagrams and store all of them in the same model file, without having the diagrams adding/removing things from each other???

I am looking for a solution that works for ALL supported diagram types.

Any help most welcome!

/Johan
Re: How to add several use-case diagrams to one model file? [message #625146 is a reply to message #495367] Wed, 04 November 2009 17:02 Go to previous message
Johan  is currently offline Johan Friend
Messages: 39
Registered: July 2009
Member
Vlad and Thomas, thank you both for you responses!

I am a newbie so I agree with Thomas, I don't understand Vlad's answer, as it was slightly too technical for me.

The bottom line is that I'd like to have several different diagrams of the same type (containing different sets of data from one model file, say one class diagram for graphic management, one class diagram for communication protocols and another class diagram for database access etc).

It is possible in UML2tools to do this but only if there is one model file for each diagram file, which means that the diagrams don't know about each others entities - it is for example not possible to select an activity from an activity diagram as an Entry action in a state in a statemachine diagram, in a convenient way.

With the current UML2tools solution, it appears that several diagrams of the same type interfere with each other if they are stored in the same model file, as all diagrams synchronize the same set of data from the model file. I.e all diagrams of the same type always show identical information as the diagrams effectively synch with each other as soon as a change is made in one diagram.

What one would like to do is to have each diagram to only display a PART of the data from the model file (the part that was added to the model from that specific diagram only), not always having it to display ALL the data from the model file.

Any clarifications on this matter are still much appreciated!
Previous Topic:How to add several use-case diagrams to one model file?
Next Topic:Programmatically generating and viewing UML diagrams
Goto Forum:
  


Current Time: Thu Apr 25 00:36:51 GMT 2024

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

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

Back to the top