Use destination URI when creating resource during copy refactoring#3588
Open
mx990 wants to merge 2 commits intoeclipse-xtext:mainfrom
Open
Use destination URI when creating resource during copy refactoring#3588mx990 wants to merge 2 commits intoeclipse-xtext:mainfrom
mx990 wants to merge 2 commits intoeclipse-xtext:mainfrom
Conversation
When performing a COPY refactoring, the ResourceRelocationContext created the resource with the original URI and then changed the URI of the resource after loading. This left any proxy URIs in the loaded resource still pointing to the original file. When later resolving the proxies, a second resource for the original file was created on demand and any local references were resolved into that resource and not the copy. This avoids the problem by creating the resource with the destination URI instead, so that any proxies will be created with the correct URI.
Test Results 6 465 files + 1 614 6 465 suites +1 614 3h 37m 47s ⏱️ + 1h 14m 38s Results for commit f871b91. ± Comparison against base commit d53cb3c. ♻️ This comment has been updated with latest results. |
Contributor
|
Wonder if this can somehow be tested |
Contributor
|
@mx990 just for confirmation: are the added tests FAIL without your patch? |
Contributor
Author
|
Yes, (most of) the added tests fail without my patch when running them locally against main. |
a69c9c0 to
d083cf6
Compare
cdietrich
reviewed
Jan 29, 2026
| @@ -0,0 +1,175 @@ | |||
| /** | |||
| * Copyright (c) 2017, 2020 TypeFox GmbH (http://www.typefox.io) and others. | |||
cdietrich
reviewed
Jan 29, 2026
| import org.junit.runner.RunWith; | ||
|
|
||
| /** | ||
| * @author koehnlein - Initial contribution and API |
This adds tests for the copy resource refactoring based on the Java copy processor.
d083cf6 to
f871b91
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When performing a
COPYrefactoring, theResourceRelocationContextcreated the resource with the original URI and then changed the URI of the resource after loading. This left any proxy URIs in the loaded resource still pointing to the original file. When later resolving the proxies, a second resource for the original file was created on demand and any local references were resolved into that resource and not the copy.This avoids the problem by creating the resource with the destination URI instead, so that any proxies will be created with the correct URI.
Fixes #3587