eclipse-xtext / eclipse-xtext/xtext

Stale proxy URIs after changing resource URI during copy refactoring

Open
#3,587 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
831
Forks
330
Avg merge
3d 7h
Merged PRs (30d)
12

Description

When performing a COPY refactoring, the ResourceRelocationContext currently creates the resource with the original URI and then changes the URI of the resource after loading: https://github.com/eclipse-xtext/xtext/blob/d53cb3c4bb4ab04e55de5617f4a29922c04c68f0/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/refactoring/ResourceRelocationContext.java#L67-L75

This leaves 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 will be created on demand and any local references will be resolved into that resource and not the copy.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/refactoring/ResourceRelocationContext.java at lines 67–75 and trace the COPY refactoring resource-loading flow. Reproduce proxy resolution after a resource URI changes, then verify that local references resolve to the copied resource rather than creating or using a resource for the original URI.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.