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

Hover/Navigation for types not working in module-info.java #397

Closed
fbricon opened this issue Oct 19, 2017 · 3 comments
Closed

Hover/Navigation for types not working in module-info.java #397

fbricon opened this issue Oct 19, 2017 · 3 comments

Comments

@fbricon
Copy link
Contributor

fbricon commented Oct 19, 2017

In a Java 9 project with a module-info.java like

import java.sql.Driver;
import foo.bar.MyDriver;

module org.java9.test {
  requires java.sql;
  exports foo.bar;
  provides Driver with MyDriver;
}

Hovering over Driver doesn't display the java.sql.Driver javadoc. Works for MyDriver, a class from the workspace.
ctrl+click navigation doesn't work at all for Driver or MyDriver.

Everything works for when hovering or clicking on the import definitions

@fbricon
Copy link
Contributor Author

fbricon commented Oct 20, 2017

This is caused by a bug in jdt, where compilationUnit.codeSelect returns several results. The import statements, giving context, are ignored instead of reducing the result list to 1 proper value. Hover and Navigation require 1 unambiguous result so they return nothing. The same bug exists in Eclipse IDE upstream: https://bugs.eclipse.org/bugs/show_bug.cgi?id=526326

@fbricon
Copy link
Contributor Author

fbricon commented Oct 20, 2017

One way to mitigate that issue is to avoid using imports and use FQCN for all types referenced in module-info.java

@fbricon fbricon self-assigned this Oct 24, 2017
fbricon added a commit to fbricon/eclipse.jdt.ls that referenced this issue Dec 13, 2017
Fixes eclipse-jdtls#397

Signed-off-by: Fred Bricon <fbricon@gmail.com>
@fbricon fbricon added this to the Mid December 2017 milestone Dec 13, 2017
fbricon added a commit that referenced this issue Dec 13, 2017
Fixes #397

Signed-off-by: Fred Bricon <fbricon@gmail.com>
@fbricon
Copy link
Contributor Author

fbricon commented Dec 15, 2017

Had to revert changes bringing the Oxygen.2 bits as they cause #501

@fbricon fbricon reopened this Dec 15, 2017
@fbricon fbricon removed this from the Mid December 2017 milestone Dec 15, 2017
@fbricon fbricon added this to the End January 2018 milestone Jan 25, 2018
@fbricon fbricon closed this as completed Jan 26, 2018
@fbricon fbricon added the hover label Feb 20, 2018
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

1 participant