Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Error creating element
Error creating element [message #508962] Wed, 20 January 2010 16:28 Go to next message
Eclipse UserFriend
Hi,

I created a new element, which is actually a SVGFigure, and everything works and generates fine, however, when I try to put this element in my diagram (from toolbar) I get this exception:


!ENTRY org.eclipse.gmf.runtime.diagram.ui 4 4 2010-01-20 22:09:44.890
!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:519)
	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:399)
	at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:411)
	at org.eclipse.gmf.runtime.diagram.ui.tools.CreationTool.performCreation(CreationTool.java:133)
	at org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTool.java:178)
	at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1064)
	at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:263)
	at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:374)
	at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:538)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:207)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	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:368)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
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:99)
	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:135)
	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:135)
	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:135)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:511)
	... 37 more


Anyone knows what is the cause of this exception?

--
thanks, Milan
Re: Error creating element [message #508964 is a reply to message #508962] Wed, 20 January 2010 17:08 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I don't know exactly but perhaps you give the wrong path for the SVG, so it can't create the view.
What is sure is that it can't create a view, now in order to know why you may need to step into the createView.

Regards,
Re: Error creating element [message #508967 is a reply to message #508964] Wed, 20 January 2010 17:17 Go to previous messageGo to next message
Eclipse UserFriend
Dear Aurelien,

Aurelien Pupier wrote on Wed, 20 January 2010 17:08
Hi,

I don't know exactly but perhaps you give the wrong path for the SVG, so it can't create the view.
What is sure is that it can't create a view, now in order to know why you may need to step into the createView.

Regards,



I think that this is not a problem, because I checked the path multiple times and it is O.K. Which createView?

The wierd thing is that I have an Element which creates fine, and this NewElement extends in my model the Element, and when I try to put NewElement in the diagram I get the exception from the first message. However, then when I move any other element in the diagram, the NewElement I created shows but it looks graphically just like the Element ? In addition, when I click save, it is saved fine, but is shown graphically not as NewElement. but as Element, and I also tried to change its figure to some existing (working) non-svg figure, but the exception remains!

The same thing is asked here, but I'm not sure how is it solved.

btw - I taught that I made some mistake, and removed this element completely, from the graph, tooling, map and code, and defined it again...however the exception is the same.

--
Regrads, Milan



[Updated on: Wed, 20 January 2010 18:45] by Moderator

Re: Error creating element [message #509024 is a reply to message #508967] Thu, 21 January 2010 03:29 Go to previous messageGo to next message
Eclipse UserFriend
Milan wrote on Wed, 20 January 2010 23:17
Dear Aurelien,
Which createView?



I talked about the one inside CreateCommand.doExecuteWithResult()
Re: Error creating element [message #509204 is a reply to message #509024] Thu, 21 January 2010 11:37 Go to previous messageGo to next message
Eclipse UserFriend
I found what is the problem, but I don't know why it is happening. I have three Task elements, which are already defined with java constraints in gmfmap:

-- flowElements:Task/Task
---- constraint (java): loopCharacteristics == null <- I implemented this in code, as GMF didn't generate it.
-- flowElements:Task/Task
---- constraint (java): loopCharacteristics instanceof StandardLoopCharacteristics
-- flowElements: Task/Task
---- constraint (java): loopCharacteristics instanceof MultiInstanceLoopCharacteristics

this works fine. However, when I define a simple mapping for the ServiceTask which extends Task:

-- flowElements:ServiceTask/ServiceTask

I get the exception from the first message. It holds for any domain element that extends Task.

I think that this is some GMF-related problem.

--
Regrads,Milan

[Updated on: Thu, 21 January 2010 14:33] by Moderator

Re: Error creating element [message #509322 is a reply to message #509204] Thu, 21 January 2010 18:20 Go to previous message
Eclipse UserFriend
I finally found what is the problem...In class RBPMNVisualIDRegistry, method getNodeVisualID, have following definition:

...
switch (containerVisualID) {
...
if (ActivitiesPackage.eINSTANCE.getTask().isSuperTypeOf(
					domainElement.eClass())
					&& isTask_3004((Task) domainElement)) {
				return TaskEditPart.VISUAL_ID;
			}


and then later in this switch it checks for the subclass:

if (TasksPackage.eINSTANCE.getServiceTask().isSuperTypeOf(
					domainElement.eClass())) {
				return ServiceTaskEditPart.VISUAL_ID;
			}


As is came first to the ServiceTasks' superclass called Task, it checks whether
the element is Task, and as ServiceTask is actually a Task, the TaskEditPart.VISUAL_ID
is returned.

I'm not sure if this is a GMF bug.

--
Milan
Previous Topic:DiagramEventThreadSafe referenced by DefaultOperationHistory inside EMFOperations
Next Topic:[XPand/GMF] templates import statements
Goto Forum:
  


Current Time: Sun Jul 13 08:51:44 EDT 2025

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

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

Back to the top