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

No completion documentation for source methods with parameters #669

Closed
tsmaeder opened this issue May 24, 2018 · 3 comments
Closed

No completion documentation for source methods with parameters #669

tsmaeder opened this issue May 24, 2018 · 3 comments

Comments

@tsmaeder
Copy link
Contributor

tsmaeder commented May 24, 2018

When invoking completion for a method defined in the same class, the completion UI never shows documentation when the method has a parameter (or more). The same thing works for methods without parameters.
This can be reoproduced with both Che and VSCode

@tsmaeder
Copy link
Contributor Author

To reproduce:

  1. create the following class:
public class Foo {

    public static void main(String[] args) {
	    // write your code here
	    System.out.println("Hello World!");
	    
    }
    
    /**
     * This method has Javadoc
     */
    public static void foo(String bar) {
        
    }

    /**
     * This one does, too.
     */
    public static void bar() {

    }
}
  1. Put the cursor on empty line after the println
  2. invoke code assist
  3. move the menu highlight to "bar()".
  4. observer: you see the method javadoc
  5. now move the menu highlight to "foo(String bar)"
  6. observer: you do not see the Javadoc for "foo".

@tsmaeder
Copy link
Contributor Author

The problem seem to lie with CompletionResolveHandler#resolve(...). On line 114, "method.exists()" returns false for methods with parameters.

@fbricon
Copy link
Contributor

fbricon commented May 24, 2018

Most likely, we don't translate the parameters properly around https://github.com/eclipse/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/CompletionResolveHandler.java#L107, so no matching method is found.

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

No branches or pull requests

3 participants