NPE if an AF3 project is deleted while the annotation view is visible
Current Status
A null pointer exception is thrown if an AF3 project is deleted while the annotation view shows the annotations of a model element of the deleted project (only then).
Steps to reproduce
1. Open AF3 and load an arbitrary example project.
2. Open the Annotation View, if not already open, and ensure it is
visible.
3. Select one model element from the model navigator, e.g. a Component
Architecture.
4. Delete the AF3 project and observe the NPE.
Stacktrace
!ENTRY org.eclipse.jface 4 2 2016-03-22 14:56:12.874
!MESSAGE Problems occurred when invoking code from plug-in:
“org.eclipse.jface”.
!STACK 0
java.lang.NullPointerException
at
org.fortiss.tooling.base.ui.annotation.editingsupport.AnnotationEditingSupportBase.setValue(AnnotationEditingSupportBase.java:103)
at
org.eclipse.jface.viewers.EditingSupport.saveCellEditorValue(EditingSupport.java:113)
at
org.eclipse.jface.viewers.ColumnViewerEditor.saveEditorValue(ColumnViewerEditor.java:456)
at
org.eclipse.jface.viewers.ColumnViewerEditor.applyEditorValue(ColumnViewerEditor.java:312)
at
org.eclipse.jface.viewers.ColumnViewerEditor$2.applyEditorValue(ColumnViewerEditor.java:154)
at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:335)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at
org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(CellEditor.java:333)
at org.eclipse.jface.viewers.CellEditor.focusLost(CellEditor.java:718)
at
org.eclipse.jface.viewers.TextCellEditor$5.focusLost(TextCellEditor.java:186)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:143)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2842)
at org.eclipse.swt.widgets.Widget.wmKillFocus(Widget.java:1939)
at org.eclipse.swt.widgets.Control.WM_KILLFOCUS(Control.java:4983)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4645)
at org.eclipse.swt.widgets.Text.windowProc(Text.java:2597)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4990)
at org.eclipse.swt.internal.win32.OS.SetFocus(Native Method)
at org.eclipse.swt.widgets.Table.sendMouseDownEvent(Table.java:3852)
at org.eclipse.swt.widgets.Table.WM_LBUTTONDOWN(Table.java:6143)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4647)
at org.eclipse.swt.widgets.Table.windowProc(Table.java:5919)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4990)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at
org.fortiss.af3.rcapplication.AF3Application.start(AF3Application.java:48)
at
org.eclipse.equinox.internal.apEclipseAppHandle.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:354)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
(from redmine: issue id 2536, created on 2016-03-22, closed on 2016-07-18)