Project: JDT
Bug 97468 AFE during preview in Use Supertype Refactoring [refactoring]
Reported: 2005-05-31 09:36:15 | Status: verified fixed

3.1 RC1 Steps to reproduce: - Create JUnit project - Invoke Use SuperType on TestCaseClassLoader -> In the preview page, drill down to the TestCaseClassLoader change -> Following assertion failure occurs org.eclipse.ltk.internal.core.refactoring.AssertionFailedException: assertion failed: Wrong root edit at org.eclipse.ltk.internal.core.refactoring.Assert.isTrue (Assert.java:102) at org.eclipse.ltk.core.refactoring.TextChange.getPreviewContent (TextChange.java:621) at org.eclipse.ltk.internal.ui.refactoring.TextChangePreviewViewer.setInput (TextChangePreviewViewer.java:184) at org.eclipse.ltk.internal.ui.refactoring.PseudoLanguageChangeElement.feedInput (PseudoLanguageChangeElement.java:52) at org.eclipse.ltk.internal.ui.refactoring.PreviewWizardPage.showPreview (PreviewWizardPage.java:376) at org.eclipse.ltk.internal.ui.refactoring.PreviewWizardPage.access$2 (PreviewWizardPage.java:355) at org.eclipse.ltk.internal.ui.refactoring.PreviewWizardPage$2.selectionChanged (PreviewWizardPage.java:346) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:1038) at org.eclipse.core.runtime.Platform.run(Platform.java:775) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:160) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1784) at org.eclipse.jface.viewers.StructuredViewer.handleSelect (StructuredViewer.java:1027) at org.eclipse.jface.viewers.CheckboxTreeViewer.handleSelect (CheckboxTreeViewer.java:267) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected (StructuredViewer.java:1053) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent (OpenStrategy.java:209) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:204) at org.eclipse.jface.util.OpenStrategy$1.handleEvent (OpenStrategy.java:364) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:844) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2929) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2562) at org.eclipse.jface.window.Window.runEventLoop(Window.java:809) at org.eclipse.jface.window.Window.open(Window.java:787) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run (RefactoringWizardOpenOperation.java:125) at org.eclipse.swt.custom.BusyIndicator.showWhile (BusyIndicator.java:69) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run (RefactoringWizardOpenOperation.java:138) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:40) at org.eclipse.jdt.internal.corext.refactoring.RefactoringExecutionStarter.startUs eSupertypeRefactoring(RefactoringExecutionStarter.java:350) at org.eclipse.jdt.ui.actions.UseSupertypeAction.run (UseSupertypeAction.java:148) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:226) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:198) at org.eclipse.jface.action.Action.runWithEvent(Action.java:996) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:538) at org.eclipse.jface.action.ActionContributionItem.access$2 (ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent (ActionContributionItem.java:400) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:844) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2929) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2562) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1694) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1658) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:366) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:375) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:162) 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.core.launcher.Main.invokeFramework(Main.java:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948)

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/UseSuperTypeProcessor.java