Project: JDT
Bug 40092 NPE in refactoring preview [refactoring]
Reported: 2003-07-15 06:54:46 | Status: resolved fixed

I20030710 + plugin export I20030710.from20030715_1145 [Does not occur on Windows 2k!] Setup: Smoke Test > Refactoring > Extract Method - open Rename Type refactoring for class Test - enter 'A' - press Preview - expand "Java changes" node - select first change so that compare viewer is populated - collapse "Java changes" node Observe: NPE !ENTRY org.eclipse.jface 4 2 Jul 15, 2003 12:19:13.788 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface". !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.showPreview(PreviewWizardPage.java:349) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage.access$2(PreviewWizardPage.java:347) at org.eclipse.jdt.internal.ui.refactoring.PreviewWizardPage$2.selectionChanged(PreviewWizardPage.j ava:341) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:159) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1015) at org.eclipse.core.runtime.Platform.run(Platform.java:420) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:157) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1282) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:652) at org.eclipse.jface.viewers.CheckboxTreeViewer.handleSelect(CheckboxTreeViewer.java:250) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:676) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:178) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:173) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:308) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1016) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2086) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1799) at org.eclipse.jface.window.Window.runEventLoop(Window.java:583) at org.eclipse.jface.window.Window.open(Window.java:563) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:55) at org.eclipse.jdt.internal.ui.refactoring.reorg.RenameRefactoringAction.run(RenameRefactoringActio n.java:196) at org.eclipse.jdt.ui.refactoring.RenameSupport.openDialog(RenameSupport.java:93) at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run(RenameJavaElementAct ion.java:145) at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run(RenameJavaElementAct ion.java:77) at org.eclipse.jdt.ui.actions.RenameAction.run(RenameAction.java:116) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:194) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:172) at org.eclipse.jface.action.Action.runWithEvent(Action.java:842) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java :542) at org.eclipse.jface.action.ActionContributionItem.access$4(ActionContributionItem.java:496) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:468) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1016) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2086) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1799) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1383) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1366) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:291) at org.eclipse.core.launcher.Main.run(Main.java:747) at org.eclipse.core.launcher.Main.main(Main.java:583)

Files changed in fix:
org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PreviewWizardPage.java