Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to make a State Invariant cover several lifelines?(Sequence Diagram Issue)
How to make a State Invariant cover several lifelines? [message #687862] Thu, 23 June 2011 08:14 Go to next message
Miriam  is currently offline Miriam
Messages: 29
Registered: April 2011
Junior Member
Hi,
In sequence diagram, I need to customize the state invariant to make it cover all the lifelines, and not only be centred around one lifeline. Can you please help me with that, it's very urgent for my project.
Thanks a lot

Miriam

[Updated on: Fri, 24 June 2011 08:42]

Report message to a moderator

Re: How to make a State Invariant cover several lifelines? [message #688250 is a reply to message #687862] Fri, 24 June 2011 05:06 Go to previous messageGo to next message
Miriam  is currently offline Miriam
Messages: 29
Registered: April 2011
Junior Member
Hi,
Please can you help me with that? even if there is something to change in the code, just give me an idea or a doc showing how to do it, it's very urgent.
Thanks again.

Miriam

[Updated on: Fri, 24 June 2011 08:42]

Report message to a moderator

Re: How to make a State Invariant cover several lifelines? [message #689241 is a reply to message #687862] Mon, 27 June 2011 04:18 Go to previous messageGo to next message
Vincent   is currently offline Vincent
Messages: 35
Registered: December 2009
Member
Hello,

The short answer is : As is, you can't. The StateInvariant has a 'covered' relationship which relates it to a single Lifeline. Moreover, the figure is defined as a child figure of the Lifeline figure. Hence you can not draw it in several lifelines (contrary to CombinedFragments figures which are graphically located at the same level as Lifelines figures).

As this answer won't satisfy your needs, you can still develop your own figure.
But this will be a complicated task which requires the complete knowledge of a Papyrus developper.
If your need really is urgent, I doubt you will be able to make these modifications in time, unless you have a GMF-advanced developper working for you.
If you want to give it a try, here are a few instructions. Though, I will not have time to teach you everything I know.

For this purpose, I suggest you first create a profile with a stereotype to apply on your StateInvariant, since you clearly change its semantic.
Then, you can create a new configuration (taking only the same figure as existing one), as if you were creating a whole new node. Have a look at the GMF tutorial (http://wiki.eclipse.org/Graphical_Modeling_Framework/Tutorial) which explains the basics about how to do so if you do not know how. Also take a look at http://wiki.eclipse.org/Papyrus_Developer_Guide/Papyrus_diagram_generation for Papyrus specific aspects.

You should perform these modifications in a separate plugin, as these will remain independant of the sequence diagram implementation.
You should download from the SVN at least :
- developper documents, to see Papyrus specific aspects
- Sequence diagram project. Of course, it contains the current figure, which you can reuse, though you will have to create your own edit parts.
- Block diagram project. This will give you an example of how to extend a diagram with stereotypes, as it is based on class diagram.
Re: How to make a State Invariant cover several lifelines? [message #689712 is a reply to message #689241] Tue, 28 June 2011 04:24 Go to previous messageGo to next message
Miriam  is currently offline Miriam
Messages: 29
Registered: April 2011
Junior Member
Hi, thanks for your reply!
Before I have seen your reply, I started to follow the tutorial PapyrusDevelopperTutorial_OnDiagramCreating, everything was ok until the generation of papyrus diagram, I encountred this error message "An internal error occurred during: "Generate Papyrus diagram".
java.lang.ClassNotFoundException: org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage"
the project generated has some import problems (I can handle this by adding external jars?) and only 2 packages were generated newdiagram.uml.diagram.edit.helpers in which there is a class UmlBaseEditHelper.java, and the package newdiagram.uml.diagram.part in which there is a class Messages.java
Can I have some help to deal whith this error?
I had a look on the links u gave me, and it seems to be dealing with the same issue, thanks a lot for your help, I really need it.
Re: How to make a State Invariant cover several lifelines? [message #690244 is a reply to message #689712] Wed, 29 June 2011 05:07 Go to previous messageGo to next message
Vincent   is currently offline Vincent
Messages: 35
Registered: December 2009
Member
Sorry, I forgot to mention you must also download from the SVN plugins and features in Developper forlder of SVN.

Then, export the "org.eclipse.papyrus.developper" feature and install it on your platform.
This enables handling specific Papyrus nodes in the gmfgen file (which I advise you to copy from another gmfgen file).
Re: How to make a State Invariant cover several lifelines? [message #690279 is a reply to message #690244] Wed, 29 June 2011 06:09 Go to previous messageGo to next message
Miriam  is currently offline Miriam
Messages: 29
Registered: April 2011
Junior Member
I will try that and let you know about the result Smile
thanks for your availability
Re: How to make a State Invariant cover several lifelines? [message #699440 is a reply to message #690279] Thu, 21 July 2011 10:40 Go to previous message
Miriam  is currently offline Miriam
Messages: 29
Registered: April 2011
Junior Member
I installed the org.eclipse.papyrus.developper plug ins in my platform, some errors disappear, but still have this errors:

Problems while generating code
Exception (Boolean expected (was: org.eclipse.emf.ecore.impl.DynamicEObjectImpl)!:in xpt::diagram::commands::CreateNodeCommand, line 132) while generating code
Boolean expected (was: org.eclipse.emf.ecore.impl.DynamicEObjectImpl)!:in xpt::diagram::commands::CreateNodeCommand, line 132
Exception (Boolean expected (was: org.eclipse.emf.ecore.impl.DynamicEObjectImpl)!:in xpt::navigator::NavigatorLabelProvider, line 306) while generating code
Boolean expected (was: org.eclipse.emf.ecore.impl.DynamicEObjectImpl)!:in xpt::navigator::NavigatorLabelProvider, line 306

can you help me with this?
thanks

Miriam
Previous Topic:(no subject)
Next Topic:Integration of EMF.Edit Item Providers?
Goto Forum:
  


Current Time: Sat Aug 30 10:32:24 EDT 2014

Powered by FUDForum. Page generated in 0.01727 seconds