Project: JDT
Bug 347389 [move member type] IllegalArgumentException on Refactor: Move Type to new File..
Reported: 2011-05-26 21:33:45 | Status: resolved fixed

I don't think there was anything unusual happening when I tried this. java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421) at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.run(RefactoringWizardDialog2.java:331) at org.eclipse.ltk.ui.refactoring.RefactoringWizard.internalPerformFinish(RefactoringWizard.java:605) at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.performFinish(UserInputWizardPage.java:153) at org.eclipse.ltk.ui.refactoring.RefactoringWizard.performFinish(RefactoringWizard.java:678) at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.okPressed(RefactoringWizardDialog2.java:455) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4123) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3969) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3608) 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.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:181) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:193) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:116) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:38) at org.eclipse.jdt.internal.corext.refactoring.RefactoringExecutionStarter.startMoveInnerRefactoring(RefactoringExecutionStarter.java:378) at org.eclipse.jdt.ui.actions.ConvertNestedToTopAction.run(ConvertNestedToTopAction.java:170) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:279) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4123) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3969) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3608) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) 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:344) 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:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410) Caused by: java.lang.IllegalArgumentException at org.eclipse.jdt.core.dom.SimpleName.setIdentifier(SimpleName.java:187) at org.eclipse.jdt.core.dom.AST.newSimpleName(AST.java:1303) at org.eclipse.jdt.internal.corext.refactoring.structure.MoveInnerToTopRefactoring$TypeReferenceQualifier.visit(MoveInnerToTopRefactoring.java:323) at org.eclipse.jdt.core.dom.ThisExpression.accept0(ThisExpression.java:137) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2482) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2530) at org.eclipse.jdt.core.dom.SynchronizedStatement.accept0(SynchronizedStatement.java:164) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2482) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2553) at org.eclipse.jdt.core.dom.Block.accept0(Block.java:136) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2482) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2530) at org.eclipse.jdt.core.dom.IfStatement.accept0(IfStatement.java:190) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2482) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2553) at org.eclipse.jdt.core.dom.Block.accept0(Block.java:136) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2482) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2530) at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:504) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2482) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2553) at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:484) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2482) at org.eclipse.jdt.internal.corext.refactoring.structure.MoveInnerToTopRefactoring.createCompilationUnitRewrite(MoveInnerToTopRefactoring.java:912) at org.eclipse.jdt.internal.corext.refactoring.structure.MoveInnerToTopRefactoring.createChangeManager(MoveInnerToTopRefactoring.java:842) at org.eclipse.jdt.internal.corext.refactoring.structure.MoveInnerToTopRefactoring.checkFinalConditions(MoveInnerToTopRefactoring.java:736) at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:85) at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121) at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:209) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Root exception: java.lang.IllegalArgumentException at org.eclipse.jdt.core.dom.SimpleName.setIdentifier(SimpleName.java:187) at org.eclipse.jdt.core.dom.AST.newSimpleName(AST.java:1303) at org.eclipse.jdt.internal.corext.refactoring.structure.MoveInnerToTopRefactoring$TypeReferenceQualifier.visit(MoveInnerToTopRefactoring.java:323) at org.eclipse.jdt.core.dom.ThisExpression.accept0(ThisExpression.java:137) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2482) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2530) at org.eclipse.jdt.core.dom.SynchronizedStatement.accept0(SynchronizedStatement.java:164) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2482) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2553) at org.eclipse.jdt.core.dom.Block.accept0(Block.java:136) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2482) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2530) at org.eclipse.jdt.core.dom.IfStatement.accept0(IfStatement.java:190) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2482) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2553) at org.eclipse.jdt.core.dom.Block.accept0(Block.java:136) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2482) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2530) at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:504) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2482) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2553) at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:484) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2482) at org.eclipse.jdt.internal.corext.refactoring.structure.MoveInnerToTopRefactoring.createCompilationUnitRewrite(MoveInnerToTopRefactoring.java:912) at org.eclipse.jdt.internal.corext.refactoring.structure.MoveInnerToTopRefactoring.createChangeManager(MoveInnerToTopRefactoring.java:842) at org.eclipse.jdt.internal.corext.refactoring.structure.MoveInnerToTopRefactoring.checkFinalConditions(MoveInnerToTopRefactoring.java:736) at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:85) at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121) at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:209) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test43/in/A.java org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test43/out/A.java org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test43/out/B.java org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test44/in/A.java org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test44/out/A.java org.eclipse.jdt.ui.tests.refactoring/resources/MoveInnerToTopLevel/test44/out/B.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/MoveInnerToTopLevelTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInnerToTopRefactoring.java