<< Back to previous view

[FDT-1612] Refactoring of packages fails Created: 26/Nov/10  Updated: 22/Jun/12

Status: Closed
Project: FDT
Component/s: Refactoring
Affects Version/s: FDT 4.0
Fix Version/s: FDT 4.1
Security Level: public

Type: Bug Priority: Major
Reporter: Uwe Holland Assignee: FDT Team
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: osx 10.6.5, fdt 4


 Description   
If I try to rename a package the following error occurs very often:

Errorwindow:
http://d.pr/HOFj

Errorlog:
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:330)
at org.eclipse.ltk.ui.refactoring.RefactoringWizard.internalPerformFinish(RefactoringWizard.java:557)
at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.performFinish(UserInputWizardPage.java:153)
at org.eclipse.ltk.ui.refactoring.RefactoringWizard.performFinish(RefactoringWizard.java:621)
at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.okPressed(RefactoringWizardDialog2.java:453)
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:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3542)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1247)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1270)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1255)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1076)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3440)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3099)
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:143)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:155)
at com.powerflasher.fdt.internal.ui.editor.actions.RenameActionDelegate.run(RenameActionDelegate.java:70)
at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:289)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:470)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:824)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:880)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:569)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:510)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:125)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:965)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3541)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1247)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1270)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1255)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1284)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1280)
at org.eclipse.swt.widgets.Tree.sendKeyEvent(Tree.java:2330)
at org.eclipse.swt.widgets.Control.keyDown(Control.java:2019)
at org.eclipse.swt.widgets.Composite.keyDown(Composite.java:529)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4654)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:202)
at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:1750)
at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:1821)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4712)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:4284)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:4351)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:101)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3096)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
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:368)
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:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Caused by: org.eclipse.text.edits.MalformedTreeException: Overlapping text edits
at org.eclipse.text.edits.TextEdit$InsertionComparator.compare(TextEdit.java:121)
at java.util.Collections.indexedBinarySearch(Collections.java:319)
at java.util.Collections.binarySearch(Collections.java:307)
at org.eclipse.text.edits.TextEdit.computeInsertionIndex(TextEdit.java:796)
at org.eclipse.text.edits.TextEdit.internalAdd(TextEdit.java:781)
at org.eclipse.text.edits.TextEdit.addChild(TextEdit.java:335)
at com.powerflasher.fdt.core.refactoring2.MoveTypeProcessorForPackageRename.addTextEdit(MoveTypeProcessorForPackageRename.java:33)
at com.powerflasher.fdt.core.refactoring2.MoveTypeProcessorForPackageRename.addCompilationUnitChange(MoveTypeProcessorForPackageRename.java:24)
at com.powerflasher.fdt.core.refactoring2.MoveMasterProcessor.doCheckFinalConditions(MoveMasterProcessor.java:309)
at com.powerflasher.fdt.core.refactoring2.MoveMasterProcessor.checkFinalConditions(MoveMasterProcessor.java:125)
at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:224)
at com.powerflasher.fdt.core.refactoring2.RenamePackageProcessor.addPackage(RenamePackageProcessor.java:250)
at com.powerflasher.fdt.core.refactoring2.RenamePackageProcessor.addPackage(RenamePackageProcessor.java:261)
at com.powerflasher.fdt.core.refactoring2.RenamePackageProcessor.addPackage(RenamePackageProcessor.java:261)
at com.powerflasher.fdt.core.refactoring2.RenamePackageProcessor.doCheckFinalConditions(RenamePackageProcessor.java:208)
at com.powerflasher.fdt.internal.core.refactoring.FDTRenameProcessor.checkFinalConditions(FDTRenameProcessor.java:47)
at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:224)
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:211)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
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:
org.eclipse.text.edits.MalformedTreeException: Overlapping text edits
at org.eclipse.text.edits.TextEdit$InsertionComparator.compare(TextEdit.java:121)
at java.util.Collections.indexedBinarySearch(Collections.java:319)
at java.util.Collections.binarySearch(Collections.java:307)
at org.eclipse.text.edits.TextEdit.computeInsertionIndex(TextEdit.java:796)
at org.eclipse.text.edits.TextEdit.internalAdd(TextEdit.java:781)
at org.eclipse.text.edits.TextEdit.addChild(TextEdit.java:335)
at com.powerflasher.fdt.core.refactoring2.MoveTypeProcessorForPackageRename.addTextEdit(MoveTypeProcessorForPackageRename.java:33)
at com.powerflasher.fdt.core.refactoring2.MoveTypeProcessorForPackageRename.addCompilationUnitChange(MoveTypeProcessorForPackageRename.java:24)
at com.powerflasher.fdt.core.refactoring2.MoveMasterProcessor.doCheckFinalConditions(MoveMasterProcessor.java:309)
at com.powerflasher.fdt.core.refactoring2.MoveMasterProcessor.checkFinalConditions(MoveMasterProcessor.java:125)
at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:224)
at com.powerflasher.fdt.core.refactoring2.RenamePackageProcessor.addPackage(RenamePackageProcessor.java:250)
at com.powerflasher.fdt.core.refactoring2.RenamePackageProcessor.addPackage(RenamePackageProcessor.java:261)
at com.powerflasher.fdt.core.refactoring2.RenamePackageProcessor.addPackage(RenamePackageProcessor.java:261)
at com.powerflasher.fdt.core.refactoring2.RenamePackageProcessor.doCheckFinalConditions(RenamePackageProcessor.java:208)
at com.powerflasher.fdt.internal.core.refactoring.FDTRenameProcessor.checkFinalConditions(FDTRenameProcessor.java:47)
at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:224)
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:211)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)



 Comments   
Comment by Philipp Arnolds [ 29/Nov/10 11:22 AM ]
We have fixed that issue for FDT 4.1, do you maybe have a hello world project that we could use to verify the fix?
Comment by Uwe Holland [ 29/Nov/10 11:36 AM ]
Checked with FDT 4.1. Refactoring is way faster there and it works without any issues now. Thanks!
Generated at Thu Aug 28 05:05:34 CEST 2014 using JIRA Enterprise Edition, Version: 3.13.5-#360.