Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » I can´t create Relationship edge
I can´t create Relationship edge [message #1785825] Fri, 20 April 2018 10:20 Go to next message
Cristian Gómez is currently offline Cristian GómezFriend
Messages: 19
Registered: April 2018
Junior Member
Hi,

First, I'm sorry for my bad English. I need to create relationship edges between elements but I can't do this. When I click over the element origin, the console shows this:

ENTRY org.eclipse.ui 4 0 2018-04-20 11:51:30.458
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
at org.eclipse.sirius.business.internal.helper.task.ModelOperationToTask.createTask(ModelOperationToTask.java:171)
at org.eclipse.sirius.business.internal.helper.task.ExecuteToolOperationTask.createTask(ExecuteToolOperationTask.java:168)
at org.eclipse.sirius.business.internal.helper.task.ExecuteToolOperationTask.<init>(ExecuteToolOperationTask.java:95)
at org.eclipse.sirius.business.api.helper.task.TaskHelper.buildTaskFromModelOperation(TaskHelper.java:105)
at org.eclipse.sirius.diagram.tools.internal.command.builders.EdgeCreationCommandBuilder.buildCreateEdgeCommandFromTool(EdgeCreationCommandBuilder.java:213)
at org.eclipse.sirius.diagram.tools.internal.command.builders.EdgeCreationCommandBuilder.buildCommand(EdgeCreationCommandBuilder.java:94)
at org.eclipse.sirius.diagram.tools.internal.command.UndoRedoCapableEMFCommandFactory.buildCreateEdgeCommandFromTool(UndoRedoCapableEMFCommandFactory.java:357)
at org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusGraphicalNodeEditPolicy.buildCreateEdgeCommand(SiriusGraphicalNodeEditPolicy.java:1109)
at org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusGraphicalNodeEditPolicy.buildSiriusConnectionCreationCmd(SiriusGraphicalNodeEditPolicy.java:789)
at org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusGraphicalNodeEditPolicy.getConnectionCompleteCommand(SiriusGraphicalNodeEditPolicy.java:748)
at org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy.getCommand(GraphicalNodeEditPolicy.java:130)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy.getCommand(GraphicalNodeEditPolicy.java:602)
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.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.getCommand(GraphicalEditPart.java:477)
at org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramNodeEditPart.getCommand(AbstractDiagramNodeEditPart.java:371)
at org.eclipse.gef.tools.TargetingTool.getCommand(TargetingTool.java:123)
at org.eclipse.gef.tools.AbstractConnectionCreationTool.handleMove(AbstractConnectionCreationTool.java:321)
at org.eclipse.sirius.diagram.ui.tools.internal.palette.ConnectionCreationTool.handleMove(ConnectionCreationTool.java:56)
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:213)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4238)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3817)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
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:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
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:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)

This message appears ever when i click over the element origin for create the relationship and
when I want to link to the target element.

Some solution?

Thanks :)
  • Attachment: o.design1.png
    (Size: 46.23KB, Downloaded 148 times)
Re: I can´t create Relationship edge [message #1785959 is a reply to message #1785825] Mon, 23 April 2018 15:00 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
Hi,

The screenshot shows the mapping definition. The problem is probably in the tool definition. Could you provide us more details about this tool and the Sirius version?
Your target finder expression should be "[target/]". We recommend to use AQL expression instead of Acceleo3 expression (see https://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#aql)

Regards,

Florian
Re: I can´t create Relationship edge [message #1786087 is a reply to message #1785959] Wed, 25 April 2018 11:52 Go to previous messageGo to next message
Cristian Gómez is currently offline Cristian GómezFriend
Messages: 19
Registered: April 2018
Junior Member
Hi Florian,

Thanks for answer. I provide the metamodel(metamodel.png) and the definition edge(EdgeDefinition.png) and definition tool for the creation edge between figures in this post(edgedefinitiontool1.png and edgedefinitiontool2.png). My problem, is that i can't link the figure1 to figure2. Howewer, the tool allows the link (problem.png).

I dont understand the problem.

Thank you so much,

Cristian.
Re: I can´t create Relationship edge [message #1786088 is a reply to message #1785959] Wed, 25 April 2018 11:52 Go to previous messageGo to next message
Cristian Gómez is currently offline Cristian GómezFriend
Messages: 19
Registered: April 2018
Junior Member
No Message Body

[Updated on: Wed, 25 April 2018 11:54]

Report message to a moderator

Re: I can´t create Relationship edge [message #1786089 is a reply to message #1785959] Wed, 25 April 2018 11:52 Go to previous messageGo to next message
Cristian Gómez is currently offline Cristian GómezFriend
Messages: 19
Registered: April 2018
Junior Member
No Message Body

[Updated on: Wed, 25 April 2018 11:55]

Report message to a moderator

Re: I can´t create Relationship edge [message #1786090 is a reply to message #1785959] Wed, 25 April 2018 11:53 Go to previous messageGo to next message
Cristian Gómez is currently offline Cristian GómezFriend
Messages: 19
Registered: April 2018
Junior Member

[Updated on: Wed, 25 April 2018 11:55]

Report message to a moderator

Re: I can´t create Relationship edge [message #1786160 is a reply to message #1786090] Thu, 26 April 2018 09:26 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
Hi Cristian,

In your metamodel, the relation is based on an element of type "Connection" (a Message or an Association). I guess "Secuence" inherit from Connection ?
From what I see on your screenshots, your edge creation tool does not create any instance of type "Connection". As your edge is an "Element based edge", it is the responsibility of the edge creation tool to create a new Instance of this element. And next you set the "origin" and "target" values of the new "Connection" intance.

Regards,

Florian

Re: I can´t create Relationship edge [message #1786162 is a reply to message #1786160] Thu, 26 April 2018 10:06 Go to previous messageGo to next message
Cristian Gómez is currently offline Cristian GómezFriend
Messages: 19
Registered: April 2018
Junior Member
Hi Florian,

Thanks for your fast answer. I changed my edge creation tool and i added the create instance operation(createConnectionInstance.png). However, I have a problem when i write "object" in the Reference name box :
"Invalid feature 'object' for the following types: proyectoBPMN::Connection" (description error.png)
In my metamodel, Secuence inherit from Connection and Connection inherit from ObJect. Then Lane is composed of Object (metamodel.png).

Thank you so much,

Regards,

Cristian
Re: I can´t create Relationship edge [message #1786172 is a reply to message #1786162] Thu, 26 April 2018 12:41 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
The problem is the context. You change the context with "var:source". The reference "object" Is on the type "Lane". You have to retrieve to right context. If the context is the parent of the source figure, you will have aql:source.eContainer().
Re: I can´t create Relationship edge [message #1786439 is a reply to message #1786172] Thu, 03 May 2018 09:31 Go to previous messageGo to next message
Cristian Gómez is currently offline Cristian GómezFriend
Messages: 19
Registered: April 2018
Junior Member
Hi Florian,

Thanks for the answer. Obeo doesnt show me more problems in the "Problems" tab when i put "source.eContainer()" in the Browse Expression, However, I cant create the element "Connection" for link two elements "Figure".For example, I clicked the Secuence tool and I choose the first elemen Figure for represent the origin element but when i clicked in the second element Figure (target) for link with the origin, the IDE doesnt create the element Connection,
He shows me for console:
!ENTRY org.eclipse.sirius 4 0 2018-05-03 11:00:33.788
!MESSAGE Error while modifying model
!STACK 0
org.eclipse.sirius.ecore.extender.business.api.accessor.exception.MetaClassNotFoundException: proyectoBPMN.Connection
at org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor.createInstance(ModelAccessor.java:130)
at org.eclipse.sirius.business.internal.helper.task.operations.CreateInstanceTask.execute(CreateInstanceTask.java:76)
at org.eclipse.sirius.business.internal.helper.task.ExecuteToolOperationTask.executeTask(ExecuteToolOperationTask.java:127)
at org.eclipse.sirius.business.internal.helper.task.ExecuteToolOperationTask.executeTask(ExecuteToolOperationTask.java:138)
at org.eclipse.sirius.business.internal.helper.task.ExecuteToolOperationTask.execute(ExecuteToolOperationTask.java:111)
at org.eclipse.sirius.business.api.helper.task.TaskExecutor.execute(TaskExecutor.java:64)
at org.eclipse.sirius.tools.api.command.SiriusCommand.doExecute(SiriusCommand.java:80)
at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
at org.eclipse.sirius.diagram.ui.tools.api.command.GMFCommandWrapper.doExecuteWithResult(GMFCommandWrapper.java:102)
at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand.doExecute(AbstractTransactionalCommand.java:247)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
at org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:403)
at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134)
at org.eclipse.sirius.diagram.ui.tools.internal.commands.WrappingCommandIgnoringAffectedFiles.execute(WrappingCommandIgnoringAffectedFiles.java:124)
at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:488)
at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:71)

Im very desperate with this problem. I want only a Secuence,Message or Association element for link two Figures (You can see the Metamodel.png).

Thanks for all,

Cristian.
Re: I can´t create Relationship edge [message #1786449 is a reply to message #1786439] Thu, 03 May 2018 13:34 Go to previous messageGo to next message
Julien Dupont is currently offline Julien DupontFriend
Messages: 172
Registered: July 2009
Senior Member
Hi Cristian,

After an exchange with Florian, we think that the change context must be, Browse Expression: var:source and not source.eContainer().

Regards,
Re: I can´t create Relationship edge [message #1786689 is a reply to message #1786449] Wed, 09 May 2018 12:59 Go to previous messageGo to next message
WINNER WINNER is currently offline WINNER WINNERFriend
Messages: 22
Registered: March 2018
Junior Member
Hello,

I have the same problem, not yet resolved

Regards
Re: I can´t create Relationship edge [message #1817843 is a reply to message #1786689] Sat, 30 November 2019 16:31 Go to previous message
Burak Karaduman is currently offline Burak KaradumanFriend
Messages: 84
Registered: July 2018
Member
So i have the same problem. What is the solution?
Previous Topic:ELK layouts doesn't work on Element-Based Edge
Next Topic:Can't reference to an EClass which is not Composed of Root EClass
Goto Forum:
  


Current Time: Fri Mar 29 10:23:36 GMT 2024

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

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

Back to the top