Project: JDT
Bug 199013 [refactoring scripts] NPE when selecting node in refactoring history dialog
Reported: 2007-08-07 04:14:05 | Status: verified fixed

I20070807-0010 In my dev workspace 1. Restart eclipse 2. Refactor>Create Script.. 3. I have a root node '2007' even if sorted by project, the node has no children 4. Select the node: java.lang.NullPointerException at org.eclipse.ltk.ui.refactoring.history.RefactoringHistoryContentProvider.getRefactoringDescriptorProxies(RefactoringHistoryContentProvider. java:215) at org.eclipse.ltk.ui.refactoring.history.RefactoringHistoryContentProvider.getChildren(RefactoringHistoryContentProvider.java:134) at org.eclipse.ltk.internal.ui.refactoring.history.BrowseRefactoringHistoryContentProvider.getChildren(BrowseRefactoringHistoryContentProvider .java:85) at org.eclipse.ltk.internal.ui.refactoring.history.RefactoringHistoryControl.getCoveredDescriptors(RefactoringHistoryControl.java:583) at org.eclipse.ltk.internal.ui.refactoring.history.RefactoringHistoryControl.getCoveredDescriptors(RefactoringHistoryControl.java:561) at org.eclipse.ltk.internal.ui.refactoring.history.RefactoringHistoryControl.handleSelectionChanged(RefactoringHistoryControl.java:680) at org.eclipse.ltk.internal.ui.refactoring.history.RefactoringHistoryControl$4.selectionChanged(RefactoringHistoryControl.java:396) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:857) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:193) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2045) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1138) at org.eclipse.jface.viewers.CheckboxTreeViewer.handleSelect(CheckboxTreeViewer.java:271) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1168) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:227) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:221) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:388) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3708) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3319) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ltk.ui.refactoring.actions.CreateRefactoringScriptAction.showCreateScriptWizard(CreateRefactoringScriptAction.java:96) at org.eclipse.ltk.ui.refactoring.actions.CreateRefactoringScriptAction.run(CreateRefactoringScriptAction.java:121) at org.eclipse.jdt.internal.ui.refactoring.actions.CreateRefactoringScriptAction.run(CreateRefactoringScriptAction.java:50) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:256) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3708) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3319) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) 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:508) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447) at org.eclipse.equinox.launcher.Main.run(Main.java:1173) at org.eclipse.equinox.launcher.Main.main(Main.java:1148) at org.eclipse.core.launcher.Main.main(Main.java:30)

Files changed in fix:
org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/history/RefactoringHistoryContentProvider.java