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

Autocomplete does not work since 2024-06 with "Completion Overwrites"

Open
#1,804 3 comments 0 reactions 0 assignees View on GitHub
bug help wanted regression
Dominant language
Java
Stars
59
Forks
127
Avg merge
23h 30m
Merged PRs (30d)
35

Description

I recently upgraded from Eclipse 2020-06 to 2024-06 and noticed an issue.

Let's start with the following class:

```
public class Block {

public static Block stone = new Block(0);
public static Block dirt = new Block(1);
public static Block wood = new Block(2);
public static Block sand = new Block(3);

public int id;

public Block(int id) {
this.id = id;
}

}
```
And now I'm going to put some of the IDs into an array:
```
public static void main(String[] args) {
int[] ids = new int[] {
Block.stone.id,
Block.dirt.id,
Block.sand.id
};
}
```
Everything fine here, but now I want to change one of the blocks.
Here's what happens in Eclipse 2020-06:

https://github.com/user-attachments/assets/8f2ad9ce-d44e-4008-8665-155bbc67f0cd

I remove the old name, I choose the new name in the menu, and I press Enter to auto-complete it.

Here's what happens in Eclipse 2024-06:

https://github.com/user-attachments/assets/a3ca4b74-03ee-49d7-9477-7cd89c3b28c5

When I type ``woo`` to filter the list, it auto-completes to ``wwood``, which I then have to manually fix.
If I don't type anything and scroll down the list, it doesn't autocomplete anything.

Do note that I am using ``Completion Inserts`` instead of ``Completion Overwrites`` in both cases, which is the default setting in 2020-06 but not in 2024-06. But even when using the default ``Completion Overwrites`` in 2024-06, it doesn't work properly
![image](https://github.com/user-attachments/assets/684e745e-4ee5-4093-9ff7-6c0bd580a985)

Contributor guide

Open the contributing guide

Research direction

Reproduce the autocomplete behavior in Eclipse 2024-06 using the supplied Block example, comparing Completion Inserts and Completion Overwrites while filtering and selecting entries. The payload names no source file or test, so locate the JDT UI completion entry point first; done means replacement behaves correctly without duplicated or missing text in both settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
developer-experience
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.