Skip navigation links

Introduction

This document lists changes made to the LSP APIs. Please ask on the dev@netbeans.apache.org mailing list if you have any questions about the details of a change, or are wondering how to convert existing code to be compatible.


Index of APIs

Incompatible changes by date

Fuller descriptions of all changes can be found below (follow links).

Not all deprecations are listed here, assuming that the deprecated APIs continue to essentially work. For a full deprecation list, please consult the Javadoc.

All changes by date

Changes by version

These API specification versions may be used to indicate that a module requires a certain API feature in order to function. For example, if you see here a feature you need which is labelled 1.20, your manifest should contain in its main attributes the line:

OpenIDE-Module-Module-Dependencies: org.netbeans.api.lsp/1 > 1.20

Changes by affected class

org.netbeans.api.lsp.CallHierarchyEntry

org.netbeans.spi.lsp.CallHierarchyProvider

org.netbeans.api.lsp.CodeAction

org.netbeans.spi.lsp.CodeActionProvider

org.netbeans.api.lsp.CodeLens

org.netbeans.spi.lsp.CodeLensProvider

org.netbeans.spi.lsp.CommandProvider

org.netbeans.api.lsp.Completion

org.netbeans.spi.lsp.CompletionCollector

org.netbeans.api.lsp.Diagnostic

org.netbeans.spi.lsp.DiagnosticReporter

org.netbeans.spi.lsp.ErrorProvider

org.netbeans.api.lsp.Hover

org.netbeans.spi.lsp.HoverProvider

org.netbeans.spi.lsp.HyperlinkTypeDefLocationProvider

org.netbeans.api.lsp.LazyCodeAction

org.netbeans.api.lsp.SignatureInformation

org.netbeans.spi.lsp.SignatureInformationCollector

org.netbeans.api.lsp.StructureElement

org.netbeans.spi.lsp.StructureProvider


Details of all changes by API and date


LSP APIs

Added Completion.getLabelDetail() and Completion.getLabelDescription() methods.

Jan 2 '24; API spec. version: 1.24; affected top-level classes: Completion CompletionCollector; made by: dbalek
Completion.getLabelDetail() to get an optional string describing function signatures or type annotations. Completion.getLabelDescription() to get an optional string describing fully qualified names or file path.

Adding ErrorProvider.Context.getHintsConfigFile() method

Dec 14 '23; API spec. version: 1.25; affected top-level classes: ErrorProvider; made by: Achal1607
An ErrorProvider.Context.getHintsConfigFile() method introduced that allows to get hints preference file config.

Added CodeActionProvider interface

Dec 1 '23; API spec. version: 1.23; affected top-level classes: CodeAction LazyCodeAction CodeActionProvider; made by: dbalek
CodeActionProvider has been added to allow server provide arbitrary code actions for a given document and range.

Added CommandProvider interface

Nov 30 '23; API spec. version: 1.22; affected top-level classes: CommandProvider; made by: jlahoda
CommandProvider has been added to allow server provide arbitrary commands runnable from a client.

Added SignatureInformation and SignatureInformationCollector

Sep 21 '23; API spec. version: 1.20; affected top-level classes: SignatureInformation SignatureInformationCollector; made by: dbalek
A SignatureInformation class and SignatureInformationCollector interface introduced that allows to compute and collect signature information.

Added CodeAction with lazy edit computation

Jul 17 '23; API spec. version: 1.18; affected top-level classes: LazyCodeAction; made by: dbalek
LazyCodeAction allows for lazy edit computation.

Added Completion.getCommand() to get an optional command

May 23 '23; API spec. version: 1.17; affected top-level classes: Completion; made by: dbalek
Completion.getCommand() to get an optional command that is executed after inserting the completion.

Added URL to diagnostic code description

Aug 3 '22; API spec. version: 1.12; affected top-level classes: Diagnostic; made by: sdedic
Diagnostic can link to the details of the error code using URL.

Added CodeLensProvider and relevant elements

Jul 2 '22; API spec. version: 1.12; affected top-level classes: CodeLens CodeLensProvider; made by: jlahoda
CodeLensProvider SPI allows to provide code lens for a given document.

Added DiagnosticReporter to trigger diagnostic collection

May 30 '22; API spec. version: 1.11; affected top-level classes: Diagnostic DiagnosticReporter; made by: sdedic
DiagnosticReporter SPI should be implemented to allow alerting the LSP server core that diagnostics for certain file(s) may have changed. The core implementation should then poll ErrorProviders to collect the diagnostics. API clients should call Diagnostic.findReporterControl to obtain an accessor which can fire the alert.

Added CallHierarchyProvider and relevant elements

Mar 9 '22; API spec. version: 1.9; affected top-level classes: CallHierarchyEntry CallHierarchyProvider; made by: sdedic
CallHierarchyProvider SPI allows to trace incoming and outgoing calls. CallHierarchyEntry describes a specific call site or target.

Adding StructeProvider and StructureElement

Jan 24 '22; API spec. version: 1.8; affected top-level classes: StructureElement StructureProvider; made by: ppisl
A StructureProvider interface allows to compute structure (tree of SourceElements) of the given file.

Adding ErrorProvider.Context.getOffset() method

Jun 21 '21; API spec. version: 1.4; affected top-level classes: ErrorProvider; made by: balek
An ErrorProvider.Context.getOffset() method introduced that allows to compute hint for a given file offset.

Adding ErrorProvider

Jun 10 '21; API spec. version: 1.3; affected top-level classes: ErrorProvider; made by: jlahoda
An ErrorProvider interface introduced that allows to compute errors/warnings for a given file.

Adding Hover and HoverProvider

May 13 '21; API spec. version: 1.2; affected top-level classes: Hover HoverProvider; made by: dbalek
A Hover class and HoverProvider interface introduced that allows to resolve a hover information at a given document offset and return its content.

Adding HyperlinkTypeDefLocationProvider

May 5 '21; API spec. version: 1.1; affected top-level classes: HyperlinkTypeDefLocationProvider; made by: dbalek
A HyperlinkTypeDefLocationProvider interface introduced that allows to compute hyperlinks to type definition locations.