eclipse-jdt / eclipse-jdt/eclipse.jdt.ui

Make SelectionConverter resolve all highlighted IJavaElements

Open
#1,173 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
59
Forks
127
Avg merge
23h 30m
Merged PRs (30d)
35

Description

## Current Situation
SelectionConverter can be used to highlight a piece of code and resolve it to get a context of all the IJavaElement in it. However, the method SelectionConverter.codeResolve returns an empty array if the highlighted section consists of more than one IJavaElement. This operation directly affects Self Encapsulate Fields and Create Getter and Setter operations, since the dialog opened for these operations should already have marked the highlighted fields .

## Expected Behavior
SelectionConverter.codeResolve should return an array consisting of all the IJavaElement which are highlighted by the user.

## Proposed Solution
TBD

Contributor guide

Open the contributing guide

Research direction

Start by locating SelectionConverter.codeResolve and trace how highlighted selections are converted into IJavaElements. Verify the behavior through the Self Encapsulate Fields and Create Getter and Setter operations; done means a selection containing multiple highlighted elements resolves to all of them and the dialogs mark those fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.