Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 542434 - [SequenceDiagram] Can't add any element on a Lifeline with stereotype
Summary: [SequenceDiagram] Can't add any element on a Lifeline with stereotype
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Diagram (show other bugs)
Version: 4.2.0   Edit
Hardware: PC Windows 10
: P3 critical with 1 vote (vote)
Target Milestone: 4.3.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-05 09:24 EST by Yoann Farré CLA
Modified: 2019-05-21 03:42 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yoann Farré CLA 2018-12-05 09:24:21 EST
If the lifeline has a stereotype, we can't create any element on it (works well if the lifeline has no stereotype).

To reproduce the bug:
- Create a new UML Papyrus project
- Create a new sequence diagram
- Add a lifeline and add a stereotype to this lifeline (any stereotype)
- Try to add a state invariant, a message or an action execution specification on the lifeline

The log error is given here:

Error stack trace:

java.lang.IllegalArgumentException: Anchor anchor is not a valid BaseSlidableAnchor
at org.eclipse.papyrus.infra.gmfdiag.common.helper.IdentityAnchorHelper.getYPercentage(IdentityAnchorHelper.java:95)
at org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.DisplayEvent.getMessageEvent(DisplayEvent.java:339)
at org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.DisplayEvent.getMessageEvent(DisplayEvent.java:95)
at org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling.LifelineCreationEditPolicy.getCreateElementAndViewCommand(LifelineCreationEditPolicy.java:85)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy.getCommand(CreationEditPolicy.java:87)
at org.eclipse.papyrus.infra.gmfdiag.dnd.policy.CustomizableDropEditPolicy.getCommand(CustomizableDropEditPolicy.java:121)
at org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:502)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$1(GraphicalEditPart.java:1)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$1.run(GraphicalEditPart.java:482)
at org.eclipse.papyrus.infra.emf.readonly.PapyrusROTransactionalEditingDomain.runExclusive(PapyrusROTransactionalEditingDomain.java:273)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.getCommand(GraphicalEditPart.java:477)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy.getUnspecifiedTypeCreateCommand(CreationEditPolicy.java:395)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy.getCommand(CreationEditPolicy.java:85)
at org.eclipse.papyrus.infra.gmfdiag.dnd.policy.CustomizableDropEditPolicy.getCommand(CustomizableDropEditPolicy.java:121)
at org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:502)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$1(GraphicalEditPart.java:1)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$1.run(GraphicalEditPart.java:482)
at org.eclipse.papyrus.infra.emf.readonly.PapyrusROTransactionalEditingDomain.runExclusive(PapyrusROTransactionalEditingDomain.java:273)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.getCommand(GraphicalEditPart.java:477)
at org.eclipse.gef.tools.TargetingTool.getCommand(TargetingTool.java:123)
at org.eclipse.gmf.runtime.diagram.ui.tools.CreationTool.getCommand(CreationTool.java:277)
at org.eclipse.gef.tools.CreationTool.handleMove(CreationTool.java:253)
at org.eclipse.gmf.runtime.diagram.ui.tools.CreationTool.handleMove(CreationTool.java:258)
at org.eclipse.gef.tools.AbstractTool.mouseMove(AbstractTool.java:1182)
at org.eclipse.gef.EditDomain.mouseMove(EditDomain.java:287)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseMoved(DomainEventDispatcher.java:365)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseMove(LightweightSystem.java:543)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:216)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4145)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3958)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3561)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:628)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:199)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:391)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:246)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
at org.eclipse.equinox.launcher.Main.run(Main.java:1501)
at org.eclipse.equinox.launcher.Main.main(Main.java:1474)
Comment 1 Nicolas FAUVERGUE CLA 2018-12-13 07:14:45 EST
I confirm this bug
Comment 2 Camille Letavernier CLA 2019-01-10 09:13:41 EST
With the 2018-09 and 2018-12 updates to the sequence diagram, the code should never assume that a Papyrus Anchor will necessarily be a BaseSlidableAnchor (e.g. we used a lot of fixed/automatic anchors for Duration Links). It shouldn't assume that all edges are messages, either :)

Most of these assumptions have been removed already, but there might still be a few ones (Like in this case)
Comment 3 Eclipse Genie CLA 2019-03-22 12:49:17 EDT
New Gerrit change created: https://git.eclipse.org/r/139347
Comment 5 Nicolas FAUVERGUE CLA 2019-05-21 03:42:19 EDT
This works fine in 2019-03. I close this bug.