eclipse.jdt.ls icon indicating copy to clipboard operation
eclipse.jdt.ls copied to clipboard

Source.java is a non-project file, only syntax errors are reported

Open GNSubrahmanyam opened this issue 5 years ago • 10 comments

@fbricon We have only one single file Source.java. How to supress or resolve this?

Screenshot from 2020-07-13 22-07-02

GNSubrahmanyam avatar Jul 13 '20 16:07 GNSubrahmanyam

Can you try adding "java.errors.incompleteClasspath.severity": "ignore" to your settings?

fbricon avatar Jul 13 '20 17:07 fbricon

Screenshot from 2020-07-13 22-42-10 Still it is coming

GNSubrahmanyam avatar Jul 13 '20 17:07 GNSubrahmanyam

@GNSubrahmanyam what happens if you click on the quick fix, on the diagnostic marker?

@testforstephen @jdneo @Eskibear did we break "java.errors.incompleteClasspath.severity": "ignore" with the syntax server mechanism?

fbricon avatar Jul 13 '20 18:07 fbricon

Error: Command 'java.project.refreshDiagnostics' not found

GNSubrahmanyam avatar Jul 13 '20 18:07 GNSubrahmanyam

did we break "java.errors.incompleteClasspath.severity": "ignore" with the syntax server mechanism?

Previously this setting is used to control whether to display a notification message box for classpath incomplete, it's useful. When we discard the message box and display the non-project file as a warning diagnostics, since the PROBLEMS view is less disturbing, the new UX won't consume that setting.

testforstephen avatar Jul 14 '20 01:07 testforstephen

@testforstephen In which version you introduced this? and any alternative way to ignore that.

GNSubrahmanyam avatar Jul 14 '20 05:07 GNSubrahmanyam

@testforstephen any updates ?

GNSubrahmanyam avatar Jul 14 '20 18:07 GNSubrahmanyam

The PR https://github.com/eclipse/eclipse.jdt.ls/pull/1366 added this. No setting to turn it off.

testforstephen avatar Jul 15 '20 01:07 testforstephen

@testforstephen What does "java.errors.incompleteClasspath.severity": "ignore" do

GNSubrahmanyam avatar Jul 15 '20 18:07 GNSubrahmanyam

I am using this via eglot package of emacs. Getting the same problem.

The per project workspace folder is generated and whenever I open a Java file from the project, a corresponding class file is also generated inside workspace/jdt.ls-java-project also. But still the editor reports this,

Java [16]: FileName.java is a non-project file, only syntax errors are reported

jangid avatar Jun 17 '22 05:06 jangid