Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EuGENia] Issue with the generated editor(Two gmf.links (instead of one) between two gmf.nodes )
[EuGENia] Issue with the generated editor [message #978292] Sat, 10 November 2012 00:38 Go to next message
Mirco Franzago is currently offline Mirco FranzagoFriend
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

index.php/fa/12244/0/

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

index.php/fa/12245/0/

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: 42.48KB, Downloaded 908 times)
  • Attachment: Capture2.JPG
    (Size: 36.90KB, Downloaded 682 times)

[Updated on: Sun, 11 November 2012 14:17]

Report message to a moderator

Re: [EuGENia] Issue with the generated editor [message #981667 is a reply to message #978292] Mon, 12 November 2012 15:50 Go to previous message
Mirco Franzago is currently offline Mirco FranzagoFriend
Messages: 12
Registered: November 2012
Junior Member
For the administators:

This is a duplicated topic. It's possible to delete it.
Thank you.
Previous Topic:Generate entity annotations in orm file
Next Topic:[Teneo] Use objects in a query later on
Goto Forum:
  


Current Time: Sat Apr 27 04:10:40 GMT 2024

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

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

Back to the top