[EuGENia] Issue with the generated editor [message #981591] |
Mon, 12 November 2012 14:41 |
Mirco Franzago Messages: 12 Registered: November 2012 |
Junior Member |
|
|
Hi all,
I'm new here and I hope this is the right place to say my problem.
This is the Emfatic source of my metamodel with the annotating elements:
@gmf(foo="bar")
@namespace(uri="mandml", prefix="mandml")
package mandml;
@gmf.diagram(foo="bar")
class MandML {
attr String[1] name;
val Element[*] elements;
}
abstract class Element {
attr String[1] name;
}
@gmf.link(label="name", source="source", target="target", target.decoration="arrow")
class Connector extends AreaElement, Element {
attr String condition;
ref Linkable[1] source;
ref Linkable[1] target;
attr ConnectorType[1] type;
}
abstract class Linkable extends Element {
}
@gmf.node(label="name")
class AreaDefinition extends Element {
@gmf.compartment(foo="bar")
val AreaElement[*] innerElements;
@gmf.affixed(foo="bar")
val InteractionPoint[*] interactionPoints;
}
@gmf.node(label="name", figure="rectangle", border.width="2", border.style="solid", label.placement="internal", size="100,50")
class View extends Linkable, AreaLinkableElement {
}
@gmf.node(label="name", label.placement="external", figure="polygon", polygon.x="0 100 80 20", polygon.y="20 20 0 0")
class ConditionalBranch extends Linkable, AreaLinkableElement {
}
abstract class AreaElement {
}
@gmf.node(label="name")
class Area extends Linkable {
ref AreaDefinition[1] def;
}
enum ConnectorType {
unidirectional = 0;
bidirectional = 1;
forcedUnidirectional = 2;
}
class AreaConnector extends Connector {
ref InteractionPoint[1] interactionPoint;
}
abstract class InteractionPoint {
attr String[1] name;
}
@gmf.node(figure="rectangle", size="20,20", label="name", label.placement="external", label.icon="false")
class EntryPoint extends InteractionPoint {
ref AreaLinkableElement[1] target;
}
@gmf.node(figure="rectangle", size="20,20", label="name", label.placement="external", label.icon="false")
class ExitPoint extends InteractionPoint {
ref AreaLinkableElement[1] source;
}
abstract class AreaLinkableElement extends AreaElement {
}
I can generate the diagram editor with no errors, but using the diagram editor I have the issue showed here
I wanna draw an AreaDefinition and inside it I would to draw a Connector (gmf.link) between two Views (gmf.node), but the editor show to me two different choices (instead of only one) of the Create Connector context menu.
1) If I click on the first one the editor draws two Connectors as shown here
2) If I click on the second one the editor draws nothing and the eclipse console show to me the follow exception:
!ENTRY org.eclipse.gmf.runtime.diagram.ui 4 4 2012-11-10 01:04:29.047
!MESSAGE execute
!STACK 0
org.eclipse.core.commands.ExecutionException: While executing the operation, an exception occurred
at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:521)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:206)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:169)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:156)
at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:425)
at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:438)
at org.eclipse.gmf.runtime.diagram.ui.tools.ConnectionCreationTool.handleCreateConnection(ConnectionCreationTool.java:342)
at org.eclipse.gmf.runtime.diagram.ui.tools.ConnectionCreationTool.handleButtonUp(ConnectionCreationTool.java:182)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1200)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:301)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:380)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:548)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:220)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:923)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
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:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:failed to create a view
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
at org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand.doExecuteWithResult(CreateCommand.java:96)
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.gmf.runtime.diagram.ui.commands.ICommandProxy.execute(ICommandProxy.java:68)
at org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy.doExecuteWithResult(CommandProxy.java:50)
at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134)
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.gmf.runtime.diagram.ui.commands.ICommandProxy.execute(ICommandProxy.java:68)
at org.eclipse.gef.commands.CompoundCommand.execute(CompoundCommand.java:111)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy$PromptAndCreateConnectionCommand.doExecuteWithResult(GraphicalNodeEditPolicy.java:154)
at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134)
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.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
... 38 more
I don't know why that happens and I don't know if the problem went from my metamodel or if there is something wrong in the generated code. I hope someone can help me.
Thank you so much!
PS I'm using this distributions: http://www.eclipse.org/epsilon/download/
-
Attachment: Capture1.JPG
(Size: 31.49KB, Downloaded 772 times) -
Attachment: Capture2.JPG
(Size: 28.99KB, Downloaded 788 times)
|
|
|
|
|
Re: [EuGENia] Issue with the generated editor [message #981686 is a reply to message #981616] |
Mon, 12 November 2012 16:13 |
Mirco Franzago Messages: 12 Registered: November 2012 |
Junior Member |
|
|
Modifing the .gmfmap manually as you suggested, the editor don't show anymore the double choices in a context menu, perhaps the editor draws two links between the nodes anyway. After some attemps I noticed that selecting a new "create tool" (from the right side of the editor) one of the two links disappears. What a strange behaviour! Do you have the same?
[Updated on: Tue, 13 November 2012 00:14] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03182 seconds