Community
Participate
Working Groups
When the Internal Web Browser View is open, the Rename-Type refactoring wizard won't show. After a click on the Refactor->Rename context menu entry, nothing happens. Steps to Reproduce: 1. Create a new Java Project e.g. TestProject 2. Create a new class in the default package, e.g. TestClass 3. Open the Internal Web Browser View via the Window -> Show View -> Other -> General -> Internal Web Browser menu. 4. Open TestClass.java with the Java Editor. 5. Select the class name, and select Refactor -> Rename from the context menu. When the Internal Web Browser View is closed, the Rename-Type wizard will open again. Im using Eclipse SDK 3.2 RC7 Build id: I20060602-1317
Problem is that that site.getSelectionProvider() from the Internal Web Browser View is null and the refactoring initialziation routine isn't testing this. This is allowed by spec but very uncommon. There's no workaround to do a rename except for closing the Internal Web Browser. Bring it to the background is not working. That means the browser could somewhere in the background and you have no idea why rename isn't showing a wizard. Philippe, I think this is a late 3.2 candidate. I can't say how often the Internal Web Browser View is used, but maybe other views have the same behaviour with site.getSelectionProvider(). As the fix is trivial and safe (add a null check) I'd be happy if you could bring this up in discussion with the PMC. Interstingly is the bug in the code for over 3 years. We haven't heard from this problem at all (good catch, Andreas). java.lang.NullPointerException at org.eclipse.jdt.internal.ui.refactoring.reorg.RenameUserInterfaceStarter$SelectionState.consider(RenameUserInterfaceStarter.java:83) at org.eclipse.jdt.internal.ui.refactoring.reorg.RenameUserInterfaceStarter$SelectionState.init(RenameUserInterfaceStarter.java:65) at org.eclipse.jdt.internal.ui.refactoring.reorg.RenameUserInterfaceStarter$SelectionState.<init>(RenameUserInterfaceStarter.java:53) at org.eclipse.jdt.internal.ui.refactoring.reorg.RenameUserInterfaceStarter.activate(RenameUserInterfaceStarter.java:150) at org.eclipse.jdt.ui.refactoring.RenameSupport.openDialog(RenameSupport.java:114) at org.eclipse.jdt.internal.corext.refactoring.RefactoringExecutionStarter.startRenameRefactoring(RefactoringExecutionStarter.java:382) at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run(RenameJavaElementAction.java:172) at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run(RenameJavaElementAction.java:102) at org.eclipse.jdt.ui.actions.RenameAction.run(RenameAction.java:108) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:267) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:243) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) 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:928) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) 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:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)
*** Bug 152703 has been marked as a duplicate of this bug. ***
Fixed in HEAD for 3.3 M1.
Fixed in R3_2_maintenance.
*** Bug 153559 has been marked as a duplicate of this bug. ***
Starting verification...
verifying...
...sorry Dani, it's all yours...
Verified in M20060830-0800.
*** Bug 157771 has been marked as a duplicate of this bug. ***