netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

LSP API Diagnostic should support an unique ID

Open sdedic opened this issue 1 year ago • 0 comments

Description

An ErrorProvider must create Diagnostic objects through its Builder, so it cannot control (maintain) the identity easily. But it needs to somehow allow to pair previous and current objects, so that LSP core knows what diagnostics are just published again, and which Diagnostic are not "duplicates".

For Java errors and hints, a line-column info is embeded into Diagnostic.code property, which is not good, as the code is displayed in the UI - and for example line:column information is duplicated.

The SPI implementor should be able to provide an ID which will be used for matching, separately from the diagnostic code.

Use case/motivation

No response

Related issues

No response

Are you willing to submit a pull request?

Yes

sdedic avatar Jan 18 '24 15:01 sdedic