eclipse-jdt / eclipse-jdt/eclipse.jdt.core

With import Ctrl+Click opens incorrect fully-qualified class until line is complete.

Open
#1,176 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

I'm using Ecilpse EE 2023-06 with Java 17 on Windows 10.

I'm using my own library which eons ago added `com.example.model.Consumer`:

```java
public interface Consumer { … }
```

In a class in my new application I have an import:

```java
import com.example.model.Consumer;
```

Let's say I have a line of code with the following inside a method:

```java
java.util.function.Consumer foo;
```

If I `Ctrl+Click` on `Consumer`, it correctly opens the source code for `java.util.function.Consumer`.

But let's say I haven't completed the line yet:

```java
java.util.function.Consumer
```

In this case, if I `Ctrl+Click` on `Consumer`, it incorrectly opens the source code for `com.example.model.Consumer`, even though the text on the line for `Consumer` is fully qualify with path and class name.

This is a low-priority ticket; it does not significantly affect my work. Still it bears investigating, and may reveal some larger bug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.