7 Replies Latest reply: Jun 16, 2013 4:54 AM by Alan.mreshet RSS

    Flash Builder 4.7 refactoring is broken

    tconkling

      I'm unable to rename methods or classes in Flash Builder 4.7. Attempting to refactor gives this error:

       

      "An unexpected exception occurred while performing the refactoring. See the error log for more details."

       

      This happens in all my projects. I've recreated my workspace from scratch and the error persists.

       

      I recently overlaid the AIR 3.6 SDK in Flash Builder. I tried reverting to AIR 3.5, which I'd backed up, but that did not fix the problem either.

       

      The error in the log follows:

       

      java.lang.reflect.InvocationTargetException

                at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)

                at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.run(RefactoringWizardDia log2.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(RefactoringWiz ardDialog2.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:4128)

                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:3974)

                at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)

                at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

                at org.eclipse.jface.window.Window.open(Window.java:801)

                at com.adobe.flexbuilder.editors.derived.refactoring.FlexOpenRefactoringWizardOperation$1.ru n(FlexOpenRefactoringWizardOperation.java:144)

                at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)

                at com.adobe.flexbuilder.editors.derived.refactoring.FlexOpenRefactoringWizardOperation.run( FlexOpenRefactoringWizardOperation.java:157)

                at com.adobe.flexbuilder.as.editor.ui.actions.refactoring.SimpleRenameRefactorAction.run(Sim pleRenameRefactorAction.java:78)

                at com.adobe.flexbuilder.as.editor.ui.actions.refactoring.RenameRefactorAction.run(RenameRef actorAction.java:89)

                at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)

                at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185)

                at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:1 09)

                at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)

                at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.jav a:508)

                at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)

                at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)

                at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)

                at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885 )

                at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboar d.java:567)

                at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)

                at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboar d.java:123)

                at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

                at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1069)

                at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4127)

                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.sendKeyEvent(Widget.java:1494)

                at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1490)

                at org.eclipse.swt.widgets.Canvas.sendKeyEvent(Canvas.java:463)

                at org.eclipse.swt.widgets.Composite.keyDown(Composite.java:594)

                at org.eclipse.swt.widgets.Display.windowProc(Display.java:5473)

                at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)

                at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:220)

                at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2092)

                at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2252)

                at org.eclipse.swt.widgets.Display.windowProc(Display.java:5535)

                at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)

                at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:4989)

                at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5138)

                at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)

                at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128)

                at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3610)

                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 com.adobe.flexbuilder.standalone.FlashBuilderApplication.start(FlashBuilderApplication.ja va:79)

                at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110)

                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a: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.NullPointerException

                at org.eclipse.core.runtime.Path.isPrefixOf(Path.java:632)

                at org.eclipse.core.internal.localstore.FileSystemResourceManager.resourceForLocation(FileSy stemResourceManager.java:286)

                at org.eclipse.core.internal.localstore.FileSystemResourceManager.containerForLocation(FileS ystemResourceManager.java:266)

                at org.eclipse.core.internal.resources.WorkspaceRoot.getContainerForLocation(WorkspaceRoot.j ava:120)

                at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.loadProject(Search IndexGateway.java:414)

                at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.loadProject(Search IndexGateway.java:422)

                at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.createQuery(Search IndexGateway.java:376)

                at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.getOccurrences(Sea rchIndexGateway.java:188)

                at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.access$4(SearchInd exGateway.java:172)

                at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway$SearchIndex.getOcc urrences(SearchIndexGateway.java:556)

                at com.adobe.flexide.refactoring.core.ASRenameProcessor.checkFinalConditions(ASRenameProcess or.java:199)

                at com.adobe.flexide.refactoring.core.VariableRenameProcessor.checkFinalConditions(VariableR enameProcessor.java:139)

                at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditi ons(ProcessorBasedRefactoring.java:224)

                at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.ja va:85)

                at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121 )

                at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:2 09)

                at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)

                at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAda pter.java:87)

                at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

        • 1. Re: Flash Builder 4.7 refactoring is broken
          katopz@sleepydesign.com Community Member

          confirm this issue, i can reproduce by try to refactoring by move folder to other folder e.g.

           

          at first

          /com

          /something/manythinghere

          then and want to refectoring to...

          /com/somthing/manythinghere

          then error throw up, 100% reproduce able here.

           

          Thanks

          • 2. Re: Flash Builder 4.7 refactoring is broken
            Guriya Kalyani Community Member

            Hi,

             

            I just overlaid the 3.6 SDK and tried reproducing the issue, with the steps mentioned above. But refactoring seems to work fine for me.

             

            Are you using some other plugins with Flash Builder 4.7 ?

            Can you try switching to a new workspace and try the scenario in a newly created project?

             

            If it still happens. Kindly provide the steps to reproduce the issue and we'll look into it. Thanks.

            • 3. Re: Flash Builder 4.7 refactoring is broken
              katopz@sleepydesign.com Community Member

              Hi Guriya,

               

              i also can't reproduce this at my home computer, but 2 of office computers still have this issue, seem like it happend only will deep nested package in some certain case

               

              fyi : i had http://sourceforge.net/projects/flexformatter/

              installed all of 3 computers

               

              btw, make sure you check "Include subpackages" while moving to reproduce (Just in case you didn't check it) and try it with more complex and deep neted folder e.g.

               

              i attach reproducable project here http://www.sendspace.com/file/cmltm8

              and here's how to reproduce (move "data" folder to "com" folder and checked "Include subpackages")

               

              bug-refactoring-2.jpg

              Thanks for assit

              • 4. Re: Flash Builder 4.7 refactoring is broken
                Alan.mreshet

                I'm experiencing the same issue with FB 4.7 x64 - a fresh install with AIR updated to 3.7.   Anyone from Adobe able to comment on this?  Will there be a patch released to fix it?

                 

                Stack trace:

                java.lang.reflect.InvocationTargetException

                    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)

                    at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.run(RefactoringWizardDia log2.java:331)

                    at org.eclipse.ltk.ui.refactoring.RefactoringWizard.createChange(RefactoringWizard.java:631)

                    at org.eclipse.ltk.ui.refactoring.RefactoringWizard.computeUserInputSuccessorPage(Refactorin gWizard.java:470)

                    at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.computeSuccessorPage(UserInputWizardPa ge.java:74)

                    at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.getNextPage(UserInputWizardPage.java:1 14)

                    at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.nextOrPreviewPressed(Ref actoringWizardDialog2.java:497)

                    at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.access$2(RefactoringWiza rdDialog2.java:494)

                    at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2$1.widgetSelected(Refacto ringWizardDialog2.java:693)

                    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.Widget.sendEvent(Widget.java:1053)

                    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)

                    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)

                    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

                    at org.eclipse.jface.window.Window.open(Window.java:801)

                    at com.adobe.flexbuilder.editors.derived.refactoring.FlexOpenRefactoringWizardOperation$1.ru n(FlexOpenRefactoringWizardOperation.java:144)

                    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)

                    at com.adobe.flexbuilder.editors.derived.refactoring.FlexOpenRefactoringWizardOperation.run( FlexOpenRefactoringWizardOperation.java:157)

                    at com.adobe.flexbuilder.as.editor.ui.navigator.FlexPackageExplorerRenameAction.run(FlexPack ageExplorerRenameAction.java:141)

                    at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerActi on.java:168)

                    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionI tem.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.Widget.sendEvent(Widget.java:1053)

                    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)

                    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)

                    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 com.adobe.flexbuilder.standalone.FlashBuilderApplication.start(FlashBuilderApplication.ja va:79)

                    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

                    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110)

                    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a: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(Unknown Source)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

                    at java.lang.reflect.Method.invoke(Unknown Source)

                    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.NullPointerException

                    at org.eclipse.core.runtime.Path.isPrefixOf(Path.java:636)

                    at org.eclipse.core.internal.localstore.FileSystemResourceManager.resourceForLocation(FileSy stemResourceManager.java:286)

                    at org.eclipse.core.internal.localstore.FileSystemResourceManager.containerForLocation(FileS ystemResourceManager.java:266)

                    at org.eclipse.core.internal.resources.WorkspaceRoot.getContainerForLocation(WorkspaceRoot.j ava:120)

                    at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.loadProject(Search IndexGateway.java:414)

                    at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.loadProject(Search IndexGateway.java:422)

                    at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.loadProject(Search IndexGateway.java:422)

                    at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.createQuery(Search IndexGateway.java:376)

                    at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.getOccurrences(Sea rchIndexGateway.java:188)

                    at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.access$4(SearchInd exGateway.java:172)

                    at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway$SearchIndex.getOcc urrences(SearchIndexGateway.java:556)

                    at com.adobe.flexide.refactoring.core.ASRenameProcessor.checkFinalConditions(ASRenameProcess or.java:199)

                    at com.adobe.flexide.refactoring.core.TypeRenameProcessor.checkFinalConditions(TypeRenamePro cessor.java:199)

                    at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditi ons(ProcessorBasedRefactoring.java:224)

                    at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.ja va:85)

                    at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121 )

                    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)

                    at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAda pter.java:87)

                    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

                Root exception:

                java.lang.NullPointerException

                    at org.eclipse.core.runtime.Path.isPrefixOf(Path.java:636)

                    at org.eclipse.core.internal.localstore.FileSystemResourceManager.resourceForLocation(FileSy stemResourceManager.java:286)

                    at org.eclipse.core.internal.localstore.FileSystemResourceManager.containerForLocation(FileS ystemResourceManager.java:266)

                    at org.eclipse.core.internal.resources.WorkspaceRoot.getContainerForLocation(WorkspaceRoot.j ava:120)

                    at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.loadProject(Search IndexGateway.java:414)

                    at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.loadProject(Search IndexGateway.java:422)

                    at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.loadProject(Search IndexGateway.java:422)

                    at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.createQuery(Search IndexGateway.java:376)

                    at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.getOccurrences(Sea rchIndexGateway.java:188)

                    at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway.access$4(SearchInd exGateway.java:172)

                    at com.adobe.flexbuilder.codemodel.internal.as.indices.SearchIndexGateway$SearchIndex.getOcc urrences(SearchIndexGateway.java:556)

                    at com.adobe.flexide.refactoring.core.ASRenameProcessor.checkFinalConditions(ASRenameProcess or.java:199)

                    at com.adobe.flexide.refactoring.core.TypeRenameProcessor.checkFinalConditions(TypeRenamePro cessor.java:199)

                    at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditi ons(ProcessorBasedRefactoring.java:224)

                    at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.ja va:85)

                    at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121 )

                    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)

                    at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAda pter.java:87)

                    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

                • 5. Re: Flash Builder 4.7 refactoring is broken
                  tconkling Community Member

                  I'm convinced that Adobe just doesn't give a ****. Buggy, beta-quality releases are par for the course for Flash Builder.  Maybe they'll fix 4.7's issues in the next paid release.

                  • 6. Re: Flash Builder 4.7 refactoring is broken
                    Alan.mreshet Community Member

                    Hopefully someone from Adobe disagrees?  This issue is almost a showstopper - it's something that needs to be dealt with via a patch or at least a FAQ entry with instructions on how to fix it, not the next version.

                    • 7. Re: Flash Builder 4.7 refactoring is broken
                      Alan.mreshet Community Member

                      Creating a fresh workspace solved the issue.  Turns out if the workspace points to directories outside (not under) its root this happens.