Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 486968 - Corrupted model: unable to create some connectors, duplicated entries in model explorer, unresolved reference
Summary: Corrupted model: unable to create some connectors, duplicated entries in mode...
Status: CLOSED FIXED
Alias: None
Product: Papyrus-rt
Classification: Modeling
Component: tool (show other bugs)
Version: 0.7.2   Edit
Hardware: PC Mac OS X
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-01 16:15 EST by Ernesto Posse CLA
Modified: 2016-11-07 08:37 EST (History)
2 users (show)

See Also:


Attachments
Screenshot showing problems (236.63 KB, image/png)
2016-02-01 16:15 EST, Ernesto Posse CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ernesto Posse CLA 2016-02-01 16:15:42 EST
Created attachment 259475 [details]
Screenshot showing problems

Creating a new model resulted in what seems to be a corrupted model.

The model models/tests/RelayPortWithPassThroughIsNotExternalPort available in the git repo at 

git://git.eclipse.org/r/papyrus-rt/org.eclipse.papyrus-rt/models/tests/RelayPortWithPassThroughIsNotExternalPort

has several problems:

1) Unable to create connectors in some capsules, in this model, I cannot create connectors inside the "Mediator" capsule

2) As shown in the screenshot, the "RootElement" package appears twice in the Model Explorer

3) The main editor says that the diagram contained an unresolved resource "platform:/resource/RelayPortWithPassThroughIsNotExternalPort/RelayPortWithPassThroughIsNotExternalPort.notation" but that resource exists in the same folder and is still there when the project is imported in the workspace.

The model was created by copying and pasting two capsules (Sender and Receiver) from another model (but not the Mediator capsule). Pasting the capsules didn't copy stereotypes so they were manually reapplied, and references where updated to point to elements in the same model only.


This has been tested on the latest successful build (Feb 1, 2016 at 16:00 EST) with

  Papyrus RT Core Feature (Incubation)	0.7.2.201602012018
  Papyrus RT Core Feature (Incubation) Developer Resources	0.7.2.201602012018
  Papyrus RT Feature (Incubation)	0.7.2.201602012018
  Papyrus RT Feature (Incubation) Developer Resources	0.7.2.201602012018
  Papyrus RT Profile Feature (Incubation)	0.7.2.201602012018
  Papyrus RT Profile Feature (Incubation) Developer Resources	0.7.2.201602012018
  Papyrus RT Tooling Feature (Incubation)	0.7.2.201602012018
  Papyrus RT Tooling Feature (Incubation) Developer Resources	0.7.2.201602012018
  Papyrus UML	1.1.3.201511250900	
  Papyrus UML Developer Resources	1.1.3.201511250900
  Eclipse SDK	4.5.1.M20150904-0015

under Mac OS X.
Comment 1 Ernesto Posse CLA 2016-02-01 16:31:13 EST
More on the connectors:

If I add parts to the "Mediator" capsule, I can add connectors for the parts.

If I try to move a connector end to one of the outer ports of the "Mediator" capsule, the move fails with the following exception (which occurs about 6 times):

eclipse.buildId=4.5.1.M20150904-0015
java.version=1.7.0_72
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.sdk.ide
Command-line arguments:  -product org.eclipse.sdk.ide -data /Users/epp/Development/PapyrusRT/workspaces/runtime -dev file:/Users/epp/Development/PapyrusRT/workspaces/dev/.metadata/.plugins/org.eclipse.pde.core/papyrusrt/dev.properties -os macosx -ws cocoa -arch x86_64 -consoleLog

org.eclipse.ui
Error
Mon Feb 01 16:27:25 EST 2016
Unhandled event loop exception

java.lang.NullPointerException
	at org.eclipse.papyrus.uml.service.types.command.ConnectorReorientSemanticCommand.deduceParentConnector(ConnectorReorientSemanticCommand.java:279)
	at org.eclipse.papyrus.uml.service.types.command.ConnectorReorientSemanticCommand.canReorient(ConnectorReorientSemanticCommand.java:161)
	at org.eclipse.papyrus.uml.service.types.command.ConnectorReorientSemanticCommand.canExecute(ConnectorReorientSemanticCommand.java:130)
	at org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper.getEditCommand(AbstractEditHelper.java:191)
	at org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper.getEditCommand(AbstractEditHelper.java:137)
	at org.eclipse.gmf.runtime.emf.type.core.MetamodelType.getEditCommand(MetamodelType.java:107)
	at org.eclipse.papyrus.infra.services.edit.internal.ElementEditService.getEditCommand(ElementEditService.java:85)
	at org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy.getReorientRelationshipCommand(DefaultSemanticEditPolicy.java:181)
	at org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy.getSemanticCommandSwitch(DefaultSemanticEditPolicy.java:105)
	at org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy.getSemanticCommand(DefaultSemanticEditPolicy.java:76)
	at org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy.getReorientRelationshipSourceCommand(SemanticEditPolicy.java:296)
	at org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy.getCommand(SemanticEditPolicy.java:78)
	at org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy.getCommand(DefaultSemanticEditPolicy.java:70)
	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:270)
	at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.getCommand(GraphicalEditPart.java:477)
	at org.eclipse.papyrus.infra.gmfdiag.common.snap.copy.TargetingTool.getCommand(TargetingTool.java:128)
	at org.eclipse.papyrus.infra.gmfdiag.common.snap.copy.ConnectionEndpointTracker.handleDragInProgress(ConnectionEndpointTracker.java:200)
	at org.eclipse.papyrus.infra.gmfdiag.common.snap.copy.AbstractTool.mouseDrag(AbstractTool.java:1114)
	at org.eclipse.gef.tools.SelectionTool.mouseDrag(SelectionTool.java:538)
	at org.eclipse.gef.EditDomain.mouseDrag(EditDomain.java:259)
	at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseMoved(DomainEventDispatcher.java:363)
	at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseMove(LightweightSystem.java:543)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:212)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4230)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1491)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1514)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1499)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1299)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3698)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
Comment 2 Peter Cigehn CLA 2016-02-04 05:05:34 EST
I tried opening this model in the latest Papyrus-RT build (0.7.2.201602021220) and I cannot get any any of these issues to repeat. No duplication of the "RootElement", and I was able to create a part in Mediator and create a delegation connector from the port on the border of the Mediator further on to a port on a newly added capsule part inside Mediator.
Comment 3 Charles Rivet CLA 2016-10-31 14:57:06 EDT
Closed as per Comment #2
Comment 4 Ernesto Posse CLA 2016-11-01 16:47:59 EDT
(In reply to Charles Rivet from comment #3)
> Closed as per Comment #2

I don't get the exceptions anymore but I am still unable to create "pass-through" connectors. Should we reopen it?
Comment 5 Peter Cigehn CLA 2016-11-07 07:36:13 EST
(In reply to Ernesto Posse from comment #4)
> (In reply to Charles Rivet from comment #3)
> > Closed as per Comment #2
> 
> I don't get the exceptions anymore but I am still unable to create
> "pass-through" connectors. Should we reopen it?

The creation of "pass-through" connectors, i.e. relay-to-relay, are tracked separately by Bug 502424 (including relay-to-internal-behavior). No need to reopen this one.