Home » Modeling » UML2 Tools » Acivity Diagram: Saving notes content to the uml model
|
Re: Acivity Diagram: Saving notes content to the uml model [message #476303 is a reply to message #476301] |
Fri, 30 January 2009 11:58 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
Hello Yordan,
So, you want to convert Notes, which are notation element, to Comments, which
are UML semantic elements.
Actions to convert Notes to Comments and back are implemented in UML2 Tools
in all Structure diagrams, where 'Comment' element do exist. There is no
'Comment' element on Activity diagram, so, the functionality is not implemented
there.
But, Yordan, you can use org.eclipse.uml2.diagram.common.actions.ConvertNoteToComment Action
class to solve your problem.
1) You can add a mapping for Comment element to Activity diagram, re-generate
it, and then just repeat functionality from Class diagram editor (take a
look at TurnNoteIntoCommentAction).
2) If you don't want to add a new mapping, Notes can be converted into Comments,
and Comments will not be shown on the diagram, but they will be persisted
in model. Here you can ConvertNoteToCommentAction class, but as you won't
be able to create a View for Comments, make you should createCommentView(Comment
c) method empty.
Best wishes,
Tanya.
> Hello to all of you,
>
> I am working on a small study project, and one of the task is reading
> information out of the notes which are connected to activity nodes.
>
> I am reading information about the model from the uml model file, but
> the notes content isn't there.
>
> So my question is, how can i get the UML2Tools Editor, to save the
> notes content also in the uml model for example in form of Comment
> Object associated with the activity node. If you can at least tell me,
> which classes i should change, i think it would be enough.
>
> Thanks in advice for your help.
>
|
|
| |
Re: Acivity Diagram: Saving notes content to the uml model [message #476327 is a reply to message #476326] |
Wed, 18 February 2009 19:50 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
Hello Yordan,
> I am having some troubles regenerating the activity diagram, and
> especially the step: activityDiagram.gmfmap (Create Generator Model..
> )--> activityDiagram.gmfgen. I have read the Thread about regenerating
> the gmfgen
> ( http://dev.eclipse.org/newslists/news.eclipse.modeling.mdt.u ml2tools/
> msg00584.html), but i am still doing something wrong, so i hope you
> can help me find out what :).
There is a Tutorial 'How to regenerate UML2 Tools diagrams' -- http://wiki.eclipse.org/MDT-UML2Tools_How_To_Regenerage_Diag rams.
It describes every steps of diagram generating in details. It can help a lot.
> What i am getting then is a .gmfgen file which is a lot different from
> the original one.
What if the tutorial didn't help?
A big difference between generated *.gmfgen file and the file from CVS usually
means, that
1) GMF Generation couldn't find GMF Trace plugin which is responsible for
Visual ID preservation.
What to do? Make sure org.eclipse.gmf.bridge.trace plugin is in your 'source'
workspace. And if it isn't -- check it out from the GMF CVS.
2) GMF couldn't load the corresponding *.gmfgen file, because it uses latest
changes from GMFGen Extension.
What to do? Select *.gmfgen file, in the context menu call 'Open with> GMFGen
Model Editor'. Did it open without any problem? If not, make sure you have
'org.eclipse.uml2.diagram.codegen' and 'org.eclipse.uml2.diagram.codegen.edit'
plugins in your workspace, and their sources are up-to-date.
I hope your problems with generation will be solved soon.
Tanya.
|
|
|
Re: Acivity Diagram: Saving notes content to the uml model [message #623531 is a reply to message #476301] |
Fri, 30 January 2009 11:58 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
Hello Yordan,
So, you want to convert Notes, which are notation element, to Comments, which
are UML semantic elements.
Actions to convert Notes to Comments and back are implemented in UML2 Tools
in all Structure diagrams, where 'Comment' element do exist. There is no
'Comment' element on Activity diagram, so, the functionality is not implemented
there.
But, Yordan, you can use org.eclipse.uml2.diagram.common.actions.ConvertNoteToComment Action
class to solve your problem.
1) You can add a mapping for Comment element to Activity diagram, re-generate
it, and then just repeat functionality from Class diagram editor (take a
look at TurnNoteIntoCommentAction).
2) If you don't want to add a new mapping, Notes can be converted into Comments,
and Comments will not be shown on the diagram, but they will be persisted
in model. Here you can ConvertNoteToCommentAction class, but as you won't
be able to create a View for Comments, make you should createCommentView(Comment
c) method empty.
Best wishes,
Tanya.
> Hello to all of you,
>
> I am working on a small study project, and one of the task is reading
> information out of the notes which are connected to activity nodes.
>
> I am reading information about the model from the uml model file, but
> the notes content isn't there.
>
> So my question is, how can i get the UML2Tools Editor, to save the
> notes content also in the uml model for example in form of Comment
> Object associated with the activity node. If you can at least tell me,
> which classes i should change, i think it would be enough.
>
> Thanks in advice for your help.
>
|
|
| |
Re: Acivity Diagram: Saving notes content to the uml model [message #623609 is a reply to message #476326] |
Wed, 18 February 2009 19:50 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
Hello Yordan,
> I am having some troubles regenerating the activity diagram, and
> especially the step: activityDiagram.gmfmap (Create Generator Model..
> )--> activityDiagram.gmfgen. I have read the Thread about regenerating
> the gmfgen
> ( http://dev.eclipse.org/newslists/news.eclipse.modeling.mdt.u ml2tools/
> msg00584.html), but i am still doing something wrong, so i hope you
> can help me find out what :).
There is a Tutorial 'How to regenerate UML2 Tools diagrams' -- http://wiki.eclipse.org/MDT-UML2Tools_How_To_Regenerage_Diag rams
It describes every steps of diagram generating in details. It can help a lot.
> What i am getting then is a .gmfgen file which is a lot different from
> the original one.
What if the tutorial didn't help?
A big difference between generated *.gmfgen file and the file from CVS usually
means, that
1) GMF Generation couldn't find GMF Trace plugin which is responsible for
Visual ID preservation.
What to do? Make sure org.eclipse.gmf.bridge.trace plugin is in your 'source'
workspace. And if it isn't -- check it out from the GMF CVS.
2) GMF couldn't load the corresponding *.gmfgen file, because it uses latest
changes from GMFGen Extension.
What to do? Select *.gmfgen file, in the context menu call 'Open with> GMFGen
Model Editor'. Did it open without any problem? If not, make sure you have
'org.eclipse.uml2.diagram.codegen' and 'org.eclipse.uml2.diagram.codegen.edit'
plugins in your workspace, and their sources are up-to-date.
I hope your problems with generation will be solved soon.
Tanya.
|
|
|
Goto Forum:
Current Time: Wed Apr 24 20:01:01 GMT 2024
Powered by FUDForum. Page generated in 0.04055 seconds
|