When renaming a folder, the refactoring fails with the following 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:377) at java.util.Collections.binarySearch(Collections.java:365) 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 org.teiid.designer.ui.refactor.RefactorResourcesUtils.calculateModelImportsElementLChanges(RefactorResourcesUtils.java:645) at org.teiid.designer.ui.refactor.rename.RenameResourceRefactoring$RelatedResourceCallback.indexFile(RenameResourceRefactoring.java:70) at org.teiid.designer.ui.refactor.RefactorResourcesUtils.calculateRelatedResources(RefactorResourcesUtils.java:1068) at org.teiid.designer.ui.refactor.rename.RenameResourceRefactoring.checkFinalConditions(RenameResourceRefactoring.java:248) 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:2313) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122) Steps to reproduce: # create a project with one folder 'sources' # create a source model 's1' in that folder # create a view model 'v1' in the root of the project, transform from s1 # do Refactor > Rename on the *folder* # the Rename Resource dialog shows an error message "A fatal error occurred while performing the refactoring", "Overlapping text edits" (see screenshot)
Created attachment 1027201 [details] screenshot
Fix for DV 6.2, but recommend push to 9.0.3 patch release
Barry LaFond <blafond> updated the status of jira TEIIDDES-2534 to Resolved
Andrej Šmigala <asmigala> updated the status of jira TEIIDDES-2534 to Closed
Andrej Šmigala <asmigala> updated the status of jira TEIIDDES-2534 to Reopened