Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support go to implementation for method/function #886

Closed
khsing opened this issue Apr 16, 2019 · 4 comments · Fixed by eclipse-jdtls/eclipse.jdt.ls#1149
Closed

Support go to implementation for method/function #886

khsing opened this issue Apr 16, 2019 · 4 comments · Fixed by eclipse-jdtls/eclipse.jdt.ls#1149
Assignees

Comments

@khsing
Copy link

khsing commented Apr 16, 2019

go to implementation just to works on import/definition section. It's not work for method of entity.

how to make it works.

Environment
  • Operating System: macOS 10.14.4 (18E226)
  • JDK version: java version "1.8.0_201"
  • Visual Studio Code version: 1.33.1 (1.33.1)
  • Java extension version: 0.42.1
Steps To Reproduce
  1. move cursor to a method of entity object.
  2. cmd+F12 will display no implementation found, but actually it exists.
Current Result
Expected Result

cmd+F12 should go to method of implementation directly.

Additional Informations
@fbricon
Copy link
Collaborator

fbricon commented Apr 16, 2019

Works for me. Can you give us more details on your setup? Maven, Gradle, Eclipse project or standalone Java files? Do you use lombok? Providing a sample project to reproduce the issue would help.
Can you enable verbose logging and attach the content of the Output view (select Language support for Java in the view menu)?

@fbricon
Copy link
Collaborator

fbricon commented Apr 16, 2019

Apr-16-2019 09-17-18

@khsing
Copy link
Author

khsing commented Apr 18, 2019

Hi @fbricon

for example:

public interface FoobarInterface {
    public String foo();
}

Implementation

public class Foobar implements FoobarInterface {
    public String foo(){
        return "hello";
    }
}

Other service

public class FoobarService {
    private FoobarInterface foobar;
    
    public void bar(){
        foobar.foo(); // if my cursor at foo() and go to implementation, it should jump to FooBar.foo directly, but no implementation found error appears.
    }
}

It's a maven based sprint-boot project and not using lombok.

@testforstephen testforstephen self-assigned this Aug 13, 2019
@testforstephen
Copy link
Collaborator

This is a bug of eclipse.jdt.ls. Go to implementation only works when selecting a method declaration, and doesn't handle well for the method invocation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants