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

Bug 330374

Summary: Annotation property view throws an NPE when nothing is selected in TS explorer
Product: [Technology] Tigerstripe Reporter: Richard Craddock <rcraddoc>
Component: AnnotationsAssignee: Navid Mehregani <nmehrega>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: nmehrega, yshmulev, yuri
Version: unspecified   
Target Milestone: 0.5M0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
330374 patch none

Description Richard Craddock CLA 2010-11-16 11:18:37 EST
When I try to use the Annotation Prprty View, I getthe folowing error :

java.lang.NullPointerException
at org.eclipse.tigerstripe.annotation.ui.internal.view.property.PropertiesBrowserPage$1.run(PropertiesBrowserPage.java:160)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
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.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
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(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Comment 1 Navid Mehregani CLA 2010-11-17 00:45:49 EST
NPE is thrown when nothing in TS explorer is selected and user clicks on 'Add' toolbar button of Annotation property view.
Comment 2 Navid Mehregani CLA 2010-11-18 19:10:39 EST
Updating title and downgrading to normal.  The view does work.  This NPE is thrown when nothing is selected in TS explorer.  Defect has been scheduled for I27.
Comment 3 Yossi Shmulevitch CLA 2010-11-18 23:50:19 EST
I bumped into similar exception when trying to add annotations,
even if TS explorer is open and the relevant java file is selected.

Is there a workaround for adding annotations using another view/right click?

If not, suggest to raise priority of this bug.
Comment 4 Navid Mehregani CLA 2010-12-01 16:30:46 EST
Yossi, I've raised the severity per your request.  We'll schedule this defect in I27.
Comment 5 Anton Salnik CLA 2010-12-02 03:08:37 EST
Created attachment 184323 [details]
330374 patch

Patch added. Now editing buttons for annotation properties are disabled by default.
Comment 6 Yuri Strot CLA 2010-12-06 09:32:04 EST
Anton's patch applied.
Comment 7 Navid Mehregani CLA 2010-12-06 16:52:42 EST
Verified. Thanks!
Richard, you might also want to verify this to make sure the issue is resolved on your end.