A sequence diagram can get into a bad state when trying
to delete components of the diagram. Throws a null
pointer exception:
java.lang.NullPointerException
at
net.java.amateras.uml.sequencediagram.editpart.MessageComponentEditPolicy.createDeleteInstaciateCommand(MessageComponentEditPolicy.java:84)
at
net.java.amateras.uml.sequencediagram.editpart.MessageComponentEditPolicy.createDeleteMessageCommand(MessageComponentEditPolicy.java:68)
at
net.java.amateras.uml.sequencediagram.editpart.MessageComponentEditPolicy.createDeleteActivationCommand(MessageComponentEditPolicy.java:41)
at
net.java.amateras.uml.sequencediagram.editpart.MessageComponentEditPolicy.createDeleteMessageCommand(MessageComponentEditPolicy.java:62)
at
net.java.amateras.uml.sequencediagram.editpart.MessageComponentEditPolicy.createDeleteCommand(MessageComponentEditPolicy.java:32)
at
org.eclipse.gef.editpolicies.ComponentEditPolicy.getDeleteCommand(ComponentEditPolicy.java:67)
at
org.eclipse.gef.editpolicies.ComponentEditPolicy.getCommand(ComponentEditPolicy.java:56)
at
org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:485)
at
org.eclipse.gef.ui.actions.DeleteAction.createDeleteCommand(DeleteAction.java:99)
at
org.eclipse.gef.ui.actions.DeleteAction.calculateEnabled(DeleteAction.java:74)
at
org.eclipse.gef.ui.actions.WorkbenchPartAction.refresh(WorkbenchPartAction.java:119)
at
org.eclipse.gef.ui.actions.SelectionAction.handleSelectionChanged(SelectionAction.java:85)
at
org.eclipse.gef.ui.actions.SelectionAction.setSelection(SelectionAction.java:96)
at
org.eclipse.gef.ui.actions.SelectionAction.update(SelectionAction.java:115)
at
net.java.amateras.uml.DiagramEditor$1.selectionChanged(DiagramEditor.java:244)
at
org.eclipse.gef.ui.parts.AbstractEditPartViewer.fireSelectionChanged(AbstractEditPartViewer.java:242)
at
org.eclipse.gef.ui.parts.AbstractEditPartViewer.appendSelection(AbstractEditPartViewer.java:173)
at
org.eclipse.gef.ui.parts.AbstractEditPartViewer.select(AbstractEditPartViewer.java:564)
at
org.eclipse.gef.tools.SelectEditPartTracker.performSelection(SelectEditPartTracker.java:213)
at
org.eclipse.gef.tools.SelectEditPartTracker.performConditionalSelection(SelectEditPartTracker.java:159)
at
org.eclipse.gef.tools.SelectEditPartTracker.handleButtonDown(SelectEditPartTracker.java:90)
at
org.eclipse.gef.tools.AbstractTool.mouseDown(AbstractTool.java:964)
at
org.eclipse.gef.tools.SelectionTool.mouseDown(SelectionTool.java:491)
at
org.eclipse.gef.EditDomain.mouseDown(EditDomain.java:215)
at
org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMousePressed(DomainEventDispatcher.java:342)
at
org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown(LightweightSystem.java:522)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:133)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
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.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
to delete components of the diagram. Throws a null
pointer exception:
java.lang.NullPointerException
at
net.java.amateras.uml.sequencediagram.editpart.MessageComponentEditPolicy.createDeleteInstaciateCommand(MessageComponentEditPolicy.java:84)
at
net.java.amateras.uml.sequencediagram.editpart.MessageComponentEditPolicy.createDeleteMessageCommand(MessageComponentEditPolicy.java:68)
at
net.java.amateras.uml.sequencediagram.editpart.MessageComponentEditPolicy.createDeleteActivationCommand(MessageComponentEditPolicy.java:41)
at
net.java.amateras.uml.sequencediagram.editpart.MessageComponentEditPolicy.createDeleteMessageCommand(MessageComponentEditPolicy.java:62)
at
net.java.amateras.uml.sequencediagram.editpart.MessageComponentEditPolicy.createDeleteCommand(MessageComponentEditPolicy.java:32)
at
org.eclipse.gef.editpolicies.ComponentEditPolicy.getDeleteCommand(ComponentEditPolicy.java:67)
at
org.eclipse.gef.editpolicies.ComponentEditPolicy.getCommand(ComponentEditPolicy.java:56)
at
org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:485)
at
org.eclipse.gef.ui.actions.DeleteAction.createDeleteCommand(DeleteAction.java:99)
at
org.eclipse.gef.ui.actions.DeleteAction.calculateEnabled(DeleteAction.java:74)
at
org.eclipse.gef.ui.actions.WorkbenchPartAction.refresh(WorkbenchPartAction.java:119)
at
org.eclipse.gef.ui.actions.SelectionAction.handleSelectionChanged(SelectionAction.java:85)
at
org.eclipse.gef.ui.actions.SelectionAction.setSelection(SelectionAction.java:96)
at
org.eclipse.gef.ui.actions.SelectionAction.update(SelectionAction.java:115)
at
net.java.amateras.uml.DiagramEditor$1.selectionChanged(DiagramEditor.java:244)
at
org.eclipse.gef.ui.parts.AbstractEditPartViewer.fireSelectionChanged(AbstractEditPartViewer.java:242)
at
org.eclipse.gef.ui.parts.AbstractEditPartViewer.appendSelection(AbstractEditPartViewer.java:173)
at
org.eclipse.gef.ui.parts.AbstractEditPartViewer.select(AbstractEditPartViewer.java:564)
at
org.eclipse.gef.tools.SelectEditPartTracker.performSelection(SelectEditPartTracker.java:213)
at
org.eclipse.gef.tools.SelectEditPartTracker.performConditionalSelection(SelectEditPartTracker.java:159)
at
org.eclipse.gef.tools.SelectEditPartTracker.handleButtonDown(SelectEditPartTracker.java:90)
at
org.eclipse.gef.tools.AbstractTool.mouseDown(AbstractTool.java:964)
at
org.eclipse.gef.tools.SelectionTool.mouseDown(SelectionTool.java:491)
at
org.eclipse.gef.EditDomain.mouseDown(EditDomain.java:215)
at
org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMousePressed(DomainEventDispatcher.java:342)
at
org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown(LightweightSystem.java:522)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:133)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
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.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)