Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341225

Summary: NPE when undoing link creation
Product: [Modeling] GMF-Runtime Reporter: Christian Waniek <chris.waniek>
Component: GeneralAssignee: Project Inbox <gmf-runtime-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 2.3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Christian Waniek CLA 2011-03-29 08:47:22 EDT
I found this bug in the component diagrams of the uml2 tools (HEAD).

* Create two classes or components.
* Create an association between them
* Try to remove the association by pressing Ctrl-Z (the undo menu item is disabled)

I got the Error: Abnormal Workbench Condition
with the following Stacktrace

java.lang.NullPointerException
at org.eclipse.gmf.runtime.diagram.core.commands.SetConnectionEndsCommand.getAffectedFiles(SetConnectionEndsCommand.java:56)
at org.eclipse.gmf.runtime.common.core.command.CompositeCommand.getAffectedFiles(CompositeCommand.java:791)
at org.eclipse.gmf.runtime.common.core.command.CompositeCommand.getAffectedFiles(CompositeCommand.java:791)
at org.eclipse.gmf.runtime.common.core.internal.command.FileModificationApprover.approveFileModification(FileModificationApprover.java:88)
at org.eclipse.gmf.runtime.common.core.internal.command.FileModificationApprover.proceedUndoing(FileModificationApprover.java:73)
at org.eclipse.core.commands.operations.DefaultOperationHistory.getUndoApproval(DefaultOperationHistory.java:822)
at org.eclipse.core.commands.operations.DefaultOperationHistory.doUndo(DefaultOperationHistory.java:411)
at org.eclipse.core.commands.operations.DefaultOperationHistory.undo(DefaultOperationHistory.java:1280)
at org.eclipse.ui.operations.UndoActionHandler.runCommand(UndoActionHandler.java:78)
[..]