Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Exception when creating connections with Feature Seq Initializer value other than the default value
Exception when creating connections with Feature Seq Initializer value other than the default value [message #157730] Tue, 30 October 2007 12:48 Go to next message
Eclipse UserFriend
Im my toy example I am trying to create connections between nodes. These
connections can be of different "types" (essentially an enumeration,
possible values of which are "creates" (=0), "reads" (=1), "updates"
(=2), "deletes" (=3)) and these types are assigned in the Link Mapping
using a "Feature Seq Initializer". If during runtime I create "creates"
connections (corresponding to value '0' which also happens to be the
default value) this works fine - the connection is drawn and properly
labeld. If, however, I create a connection of one of the other types,
nothing visually happens and instead I get the below exception (see
stackdump below).

Any idea what I am doing wrong?

Michael

org.eclipse.core.commands.ExecutionException: While executing the
operation, an exception occurred
at
org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:519)
at
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack .execute(DiagramCommandStack.java:205)
at
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack .execute(DiagramCommandStack.java:168)
at
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack .execute(DiagramCommandStack.java:155)
at
org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTo ol.java:388)
at
org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(Abs tractTool.java:400)
at
org.eclipse.gmf.runtime.diagram.ui.tools.ConnectionCreationT ool.handleCreateConnection(ConnectionCreationTool.java:346)
at
org.eclipse.gmf.runtime.diagram.ui.tools.ConnectionCreationT ool.handleButtonUp(ConnectionCreationTool.java:183)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java :1053)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:259)
at
org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouse Released(DomainEventDispatcher.java:374)
at
org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(Li ghtweightSystem.java:538)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:206)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
Caused by: org.eclipse.jface.util.Assert$AssertionFailedException: null
argument;failed to create a view
at org.eclipse.jface.util.Assert.isNotNull(Assert.java:153)
at
org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand.do ExecuteWithResult(CreateCommand.java:99)
at
org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doExecute(AbstractTransactionalCommand.ja va:246)
at
org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:137)
at
org.eclipse.gmf.runtime.common.core.command.CompositeCommand .doExecuteWithResult(CompositeCommand.java:406)
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:406)
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:406)
at
org.eclipse.gmf.runtime.common.core.command.AbstractCommand. execute(AbstractCommand.java:134)
at
org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:511)
... 37 more
Re: Exception when creating connections with Feature Seq Initializer value other than the default va [message #157740 is a reply to message #157730] Tue, 30 October 2007 13:50 Go to previous message
Eclipse UserFriend
I apparently found the reason for these exceptions: Comparing step by
step with the Tutorial part 2 I found, that I needed to add a constraint
to each link mapping, namely a "Constraint self.type =
RelationshipType::<value>" to each Link Mapping. After adding these the
creation of all connection types now works.

Couldn't this be checked or validated during creation instead of
throwing run-time exceptions? It's not exactly self-evident that this is
required...

Michael
Previous Topic:Problem view and IMarker
Next Topic:Odd behavior of labels when creating a new object
Goto Forum:
  


Current Time: Fri May 09 16:05:50 EDT 2025

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

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

Back to the top