-
Notifications
You must be signed in to change notification settings - Fork 408
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
Provide diagnostics and quickfix when open non-project java file #1366
Provide diagnostics and quickfix when open non-project java file #1366
Conversation
510aa04
to
a843a07
Compare
...jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/text/correction/NonProjectFixProcessor.java
Show resolved
Hide resolved
So if I open ./mvn/wrapper/MavenWrapperDownloader.java in a Maven project, I get no warning, no compilation error, no syntax error, no code action, even though this is technically a "Java file not on the classpath of the active project" |
a843a07
to
5c2c371
Compare
I figured out why I didn't get anything. If the Maven wrapper is under the parent project (so non-java) of other Maven Java projects, then, we end up returning no CU: This is the case of https://github.com/eclipse/eclipse.jdt.ls/blob/master/.mvn/wrapper/MavenWrapperDownloader.java I think this is a use case we can fix later though |
...jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/handlers/DocumentLifeCycleHandlerTest.java
Show resolved
Hide resolved
org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/correction/NonProjectFixTest.java
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/DiagnosticsHandler.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/DiagnosticsHandler.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/DiagnosticsHandler.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/DiagnosticsHandler.java
Outdated
Show resolved
Hide resolved
...e.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/text/correction/ActionMessages.properties
Outdated
Show resolved
Hide resolved
...e.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/text/correction/ActionMessages.properties
Outdated
Show resolved
Hide resolved
Signed-off-by: Jinbo Wang <[email protected]>
Signed-off-by: Jinbo Wang <[email protected]>
5c2c371
to
6046eb6
Compare
PR updated. And create a new PR #1377 to fix the no CU issue about opening file from non-java maven module. |
Merged as 5165dbf. |
Signed-off-by: Jinbo Wang [email protected]
Fix redhat-developer/vscode-java#1270
two kinds of non-project file:
Improve syntax mode for the non-project Java file:
Enable semantic errors:
Disable semantic errors: