Project: JDT
Bug 229031 [quick fix] NPE when fixing project setup
Reported: 2008-04-28 09:44:13 | Status: verified fixed

I20080427-2000 1. Create a new _java_ project 2. Add package test; public class Krass { public void foo() { org.eclipse.jdt.internal.ui.text.java.hover.AbstractAnnotationHover hover; } } 3. Quick Fix error 4. Invoke 'Fix project settup...' 5. Add 'org.jdt.ui' to BP Is: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:401) at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:758) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:755) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2465) at org.eclipse.jdt.internal.ui.wizards.buildpaths.ClasspathFixSelectionDialog.openClasspathFixSelectionDialog(ClasspathFix SelectionDialog.java:95) at org.eclipse.jdt.internal.ui.text.correction.ReorgCorrectionsSubProcessor$ClasspathFixCorrectionProposal.apply(ReorgCorr ectionsSubProcessor.java:243) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal(CompletionProposalPopup.java:898) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertSelectedProposalWithMask(CompletionProposalPopup.jav a:844) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey(CompletionProposalPopup.java:1252) at org.eclipse.jface.text.contentassist.ContentAssistant$InternalListener.verifyKey(ContentAssistant.java:801) at org.eclipse.jface.text.TextViewer$VerifyKeyListenersManager.verifyKey(TextViewer.java:474) at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:60) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1026) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1011) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:769) at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5157) at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:4863) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1026) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1011) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1039) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1035) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1351) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3888) at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:338) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3781) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:334) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4485) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2346) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3377) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2351) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2315) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2181) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:477) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:472) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:112) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) 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:379) 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:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212) at org.eclipse.core.launcher.Main.main(Main.java:30) Caused by: java.lang.NullPointerException at org.eclipse.jdt.internal.ui.wizards.buildpaths.ClasspathFixSelectionDialog$2.run(ClasspathFixSelectionDialog.java:103) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119) Root exception: java.lang.NullPointerException at org.eclipse.jdt.internal.ui.wizards.buildpaths.ClasspathFixSelectionDialog$2.run(ClasspathFixSelectionDialog.java:103) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119) Should: No fix available? Oooops, same happens in Plugin Project.

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathFixSelectionDialog.java