Bug 369825 - Enable deletion of single or multiple elements (edges, nodes) from a graph in designer view
Summary: Enable deletion of single or multiple elements (edges, nodes) from a graph in...
Status: ASSIGNED
Alias: None
Product: STEM
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Stefan Edlund CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-26 11:20 EST by Matthias Filter CLA
Modified: 2012-09-14 16:43 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Filter CLA 2012-01-26 11:20:09 EST
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
Comment 1 Stefan Edlund CLA 2012-04-10 19:58:25 EDT
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.
Comment 2 James Kaufman CLA 2012-04-13 12:12:22 EDT
Thanks Stefan, 
Does this link to the refactor bug 258989 ?
Comment 3 Stefan Edlund CLA 2012-04-25 16:03:14 EDT
test, please ignore
Comment 4 Stefan Edlund CLA 2012-09-14 16:43:08 EDT
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.