Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » Acivity Diagram: Saving notes content to the uml model
Acivity Diagram: Saving notes content to the uml model [message #476301] Thu, 29 January 2009 18:47 Go to next message
Yordan Terziev is currently offline Yordan TerzievFriend
Messages: 4
Registered: July 2009
Junior Member
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 #476303 is a reply to message #476301] Fri, 30 January 2009 11:58 Go to previous messageGo to next message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
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 #476326 is a reply to message #476303] Tue, 17 February 2009 13:08 Go to previous messageGo to next message
Yordan Terziev is currently offline Yordan TerzievFriend
Messages: 4
Registered: July 2009
Junior Member
Hello Tanya,

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 :). I am doing following:

1. activityDiagram.gmfmap -> right mouse click -> Create Generator
Model..
2. FileName - >activityDiagram.gmfgen (replacing/ adding to the
existing)
3. Mapping Model -> the altered activityDiagram.gmfmap ( i've tried to
regenerate the .gmfgem without changing the .gmfmap at all, so the error
should be somewhere in this steps)
4. Model Validation Results -> here i am getting some validation
errors (even when i am using the not changed .gmfmap), which all have the
text "'Containment Feature' must be owned by 'Domain Meta Element' or its
super type of this reference parent Node Mapping". I have read in the
newsgroups that having some validation errors here is ok ( is it realy
so?). So here i check the "ignore validation errors" box and go to next.
5. Select GenModel -> here i don't change anything and leve the URI to
"platform:/plugin/org.eclipse.uml2.uml/model/UML.genmodel
6. Specify transformation options - > Hier i check the boxes "Use IMap
Mode" and "Utilize enhaced features of GMF runtime" and i specify the
"GMFGraph dynamic templates" like you said in the thread about
regenerating .gmfgen
('${your-workspace}/org.eclipse.uml2.diagram.def/dynamic-tem plate
s/
gm
f-graph')

What i am getting then is a .gmfgen file which is a lot different from the
original one. I making something wrong but i can't find out what, so i am
thankful for any help.

with kind regards
Yordan
Re: Acivity Diagram: Saving notes content to the uml model [message #476327 is a reply to message #476326] Wed, 18 February 2009 19:50 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
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 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
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 #623608 is a reply to message #476303] Tue, 17 February 2009 13:08 Go to previous message
Yordan Terziev is currently offline Yordan TerzievFriend
Messages: 4
Registered: July 2009
Junior Member
Hello Tanya,

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 :). I am doing following:

1. activityDiagram.gmfmap -> right mouse click -> Create Generator
Model..
2. FileName - >activityDiagram.gmfgen (replacing/ adding to the
existing)
3. Mapping Model -> the altered activityDiagram.gmfmap ( i've tried to
regenerate the .gmfgem without changing the .gmfmap at all, so the error
should be somewhere in this steps)
4. Model Validation Results -> here i am getting some validation
errors (even when i am using the not changed .gmfmap), which all have the
text "'Containment Feature' must be owned by 'Domain Meta Element' or its
super type of this reference parent Node Mapping". I have read in the
newsgroups that having some validation errors here is ok ( is it realy
so?). So here i check the "ignore validation errors" box and go to next.
5. Select GenModel -> here i don't change anything and leve the URI to
"platform:/plugin/org.eclipse.uml2.uml/model/UML.genmodel
6. Specify transformation options - > Hier i check the boxes "Use IMap
Mode" and "Utilize enhaced features of GMF runtime" and i specify the
"GMFGraph dynamic templates" like you said in the thread about
regenerating .gmfgen
('${your-workspace}/org.eclipse.uml2.diagram.def/dynamic-tem plate
s/
gm
f-graph')

What i am getting then is a .gmfgen file which is a lot different from the
original one. I making something wrong but i can't find out what, so i am
thankful for any help.

with kind regards
Yordan
Re: Acivity Diagram: Saving notes content to the uml model [message #623609 is a reply to message #476326] Wed, 18 February 2009 19:50 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
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.
Previous Topic:XMI Export
Next Topic:Installing UML2Tools
Goto Forum:
  


Current Time: Wed Apr 24 20:01:01 GMT 2024

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

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

Back to the top