eclipse-xtext / eclipse-xtext/xtext

Move classes needed by AbstractBuilderState from ui to core plug-in

Open
#2,486 2 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

The class AbstractBuilderState uses these three classes which are defined in an UI plugin,
import org.eclipse.xtext.ui.resource.IStorage2UriMapper;
import org.eclipse.xtext.ui.resource.IStorage2UriMapperExtension;
import org.eclipse.xtext.ui.workspace.WorkspaceLockAccess;

all of this classes reference only classes from org.eclipse.core (no UI references).

We have subclassed org.eclipse.xtext.builder.clustering.ClusteringBuilderState and because of these three references we need to include org.eclipse.xtext.ui as dependency, which we would like to avoid.

I would propose that we create three new classes
org.eclipse.xtext.resource.IStorage2UriMapper;
org.eclipse.xtext.resource.IStorage2UriMapperExtension;
org.eclipse.xtext.workspace.WorkspaceLockAccess;
with exactly the same content but in the org.eclipse.xtext plug-in.
The three existing classes would just extend the new ones (same pattern as with org.eclipse.core.resources.IWorkspaceRunnable and org.eclipse.core.runtime.ICoreRunnable.

If you would agree with the changes, I would like to do them. Maybe it does not have much benefits for Xtext code base but it would be nice for us and the changes are easy to do and to mantain.

What do you think?

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 by locating AbstractBuilderState and the three referenced UI classes: IStorage2UriMapper, IStorage2UriMapperExtension, and WorkspaceLockAccess. Review how the existing core/UI interface pattern is organized, then verify the proposed core-package classes and UI compatibility layer can remove the UI dependency without breaking existing references.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.