Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Lost EditingDomain after "save"
Lost EditingDomain after "save" [message #225145] Thu, 09 April 2009 11:29 Go to next message
Eclipse UserFriend
Originally posted by: jiezi506.gmail.com

I have try to share domain between multi editor for one model file, and
overwrited the DocumentProvider.createEditingDomain() to my
Registry.getEditingDomain("").

then when I edited one editor and save it .Then when I wanted to add a
Node, the error is:

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:399)
at
org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(Abs tractTool.java:411)
at
org.eclipse.gmf.runtime.diagram.ui.tools.CreationTool.perfor mCreation(CreationTool.java:133)
at org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTo ol.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.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: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.ja va:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 00)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:490)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
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(EclipseS tarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.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: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Caused by: java.lang.NullPointerException
at
org.eclipse.emf.workspace.AbstractEMFOperation.inheritedOpti ons(AbstractEMFOperation.java:240)
at
org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:149)
at
org.eclipse.gmf.runtime.diagram.ui.commands.SemanticCreateCo mmand.doExecuteWithResult(SemanticCreateCommand.java:71)
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.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
Re: Lost EditingDomain after "save" [message #225172 is a reply to message #225145] Thu, 09 April 2009 12:14 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello jiezi,

Looks like the reason is: TransactionUtil.getEditingDomain() returns null
for EObject corresponding to the diagram element/domain element. The reason,
I suppose, is: eObject.eResource() == null. This means all the EObjects on
a diagram was unloaded after the save..

looks like by modifying ???DocumentProvider you've broken refresh process
(new input will not be correctly set for diagram editor or content of the
model will be unloaded by one of listeners in ???DocumentProvider).

-----------------
Alex Shatalin
Previous Topic:Use a provider by only a specific plugin/editor
Next Topic:Start/activate label editor from custom action
Goto Forum:
  


Current Time: Fri Apr 26 12:25:49 GMT 2024

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

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

Back to the top