Shared Editing Domain - Errors after saving diagram changes [message #742737] |
Thu, 20 October 2011 15:34  |
Eclipse User |
|
|
|
Hi all,
I followed this article to create a project with two diagrams that use a
shared editing domain and model:
http://wiki.eclipse.org/Graphical_Modeling_Framework/Tips#Sharing_single_EditingDomain_instance_across_several_diagrams
This seems to work in that I can make changes in either diagram (both
become marked as dirty). I can reference new items from one to another.
Overall it seems to work. However when I save it is as though the
transactional editing becomes 'detached' from the diagram.
For example:
I open super Diagram A
then sub Diagram B
move a node on Diagram B (both marked dirty)
hit Ctrl-S to save
Now I try and move a node on Diagram B but it 'snaps back', I cannot
move it (no stack trace but it's clearly broken). If I try and open a
context menu on the diagram I get a stack trace (see below) and only the
global parts of a contexct menu.
Attempting different things and sequences can result in different
symptoms but all seemingly driven by the same cause. It seems that when
a call is made to get the transactional editing domain using the static
call to:
TransactionUtil.getEditingDomain(EObject eObject)
(or similar) it turns out that the DiagramImpl passed has a null
Resource or ResourceSet, depending on what I tried to do.
The problem is that I have no idea where the Resource or ResouceSet is
going missing? It looks like it was there before I saved. Any help or
advice on what could be going on will be very welcome.
Thanks, Nigel
Stack trace :
!ENTRY net.london3d.gmf.diagramB 4 0 2011-10-20 20:23:04.218
!MESSAGE Error building context menu
!STACK 0
java.lang.NullPointerException
at
testmodel.diagramB.part.DiagramEditorContextMenuProvider.buildContextMenu(DiagramEditorContextMenuProvider.java:58)
at
org.eclipse.gef.ContextMenuProvider.menuAboutToShow(ContextMenuProvider.java:63)
at
org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:338)
at
org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:469)
at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:465)
at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:491)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:241)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3783)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1398)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1379)
at org.eclipse.swt.widgets.Menu.menuWillOpen(Menu.java:689)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5037)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSMenu.popUpContextMenu(NSMenu.java:68)
at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:235)
at org.eclipse.swt.widgets.Display.runPopups(Display.java:3706)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3277)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
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:369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04769 seconds