Bug 1222948 - Model Refactoring: renaming folder fails when it contains a source model that has a dependent view model
Summary: Model Refactoring: renaming folder fails when it contains a source model that...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Tooling
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Barry LaFond
QA Contact: Andrej Smigala
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-19 13:20 UTC by Andrej Smigala
Modified: 2015-11-17 18:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-17 18:06:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
screenshot (15.83 KB, image/png)
2015-05-19 13:20 UTC, Andrej Smigala
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker TEIIDDES-2534 0 Major Closed Model Refactoring: renaming folder fails when it contains a source model that has a dependent view model 2015-08-03 10:48:43 UTC

Description Andrej Smigala 2015-05-19 13:20:02 UTC
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)

Comment 1 Andrej Smigala 2015-05-19 13:20:33 UTC
Created attachment 1027201 [details]
screenshot

Comment 3 Barry LaFond 2015-05-28 15:25:30 UTC
Fix for DV 6.2, but recommend push to 9.0.3 patch release

Comment 4 JBoss JIRA Server 2015-07-16 20:53:51 UTC
Barry LaFond <blafond> updated the status of jira TEIIDDES-2534 to Resolved

Comment 5 JBoss JIRA Server 2015-08-03 09:51:53 UTC
Andrej Šmigala <asmigala> updated the status of jira TEIIDDES-2534 to Closed

Comment 6 JBoss JIRA Server 2015-08-03 10:48:26 UTC
Andrej Šmigala <asmigala> updated the status of jira TEIIDDES-2534 to Reopened

Comment 7 JBoss JIRA Server 2015-08-03 10:48:44 UTC
Andrej Šmigala <asmigala> updated the status of jira TEIIDDES-2534 to Closed


Note You need to log in before you can comment on or make changes to this bug.