Community
Participate
Working Groups
Currently it is not possible to delete any items from a graph that is in the workspace or in the repository, e.g. if one would want to delete an edge that is part of a STEM graph. If one tries (right mouse click and then selection of delete) it will throw the following error message: !SESSION 2012-01-26 17:16:42.519 ----------------------------------------------- eclipse.buildId=unknown java.version=1.7.0_01 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86_64 !ENTRY org.eclipse.stem.ui 4 0 2012-01-26 17:17:50.628 !MESSAGE !STACK 0 java.lang.NullPointerException at org.eclipse.stem.ui.handlers.DeleteHandler.execute(DeleteHandler.java:94) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:820) at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:806) at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:796) 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:4066) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657) 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.stem.ui.launcher.WorkbenchLauncher.launch(WorkbenchLauncher.java:47) at org.eclipse.stem.core.common.presentation.CoreEditorAdvisor$Application.start(CoreEditorAdvisor.java:403) 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(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: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) !ENTRY org.eclipse.ui 4 4 2012-01-26 17:18:04.583 !MESSAGE Reference item find.ext not found for action null !ENTRY org.eclipse.ui 4 4 2012-01-26 17:18:04.585 !MESSAGE Reference item find.ext not found for action null !ENTRY org.eclipse.ui 4 4 2012-01-26 17:18:04.586 !MESSAGE Reference item find.ext not found for action null !ENTRY org.eclipse.ui 4 4 2012-01-26 17:18:04.587 !MESSAGE Reference item find.ext not found for action null
A partial fix for this has been checked in. When you drag a model from the STEM library into the models folder of a STEM project, a deep copy is made of all contained models and graphs. This makes them editable in the generated EMF model editor so you can change things like edge label values etc. However, the nodes and edges reference attributes in the Graph EMF model (implemented as a 0 to many reference to a Map.Entry<URI, ...>) for some reason does not allow deletion. It does allow adding new entries entries (but this is not really working correctly the way it is supposed to). Will investigate this next, but not before the 1.3.1 release.
Thanks Stefan, Does this link to the refactor bug 258989 ?
test, please ignore
Was looking at this again and was unable to figure out why the generated editor code doesn't allow deleting from a Map.Entry<URI, ...> attribute inside an EObject. Remove the item for this release and will schedule it for a future release. The workaround is to use the graph editor to remove nodes/edges in a graph.