Add setting to exclude files from diagnostic publishing. #3723
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes Allow for excluding files from the problem tab #2150
Requires Add java.diagnostic.filter to exclude files from diagnostic publishing. eclipse-jdtls/eclipse.jdt.ls#3218
Suggest project reload when the setting changes.
The language server side supports clearing diagnostics from documents when they are excluded due to setting update. This is easily done by getting the list of documents that have any diagnostics, and comparing against the updated filter. Any new matches can have their diagnostics cleared. However, it does not support restoring diagnostics on documents that are no longer filtered. The main reason is because finding all documents and comparing them to the filters might be a lot more expensive for large projects. The diagnostics would be restored as soon as the document is modified. As a result we let this setting trigger the notification that recommends reloading the project.