Interface IQuickFixProvider
-
- All Known Implementing Classes:
AbstractDeclarativeIdeQuickfixProvider
@Beta public interface IQuickFixProviderQuickfix for code actions in files.
The quickfix itself is applied to a temporary resource.
The textual edit can be composed by calling DiagnosticResolution#apply().- Since:
- 2.24 Contributors: Rubén Porras Campo (Avaloq Evolution AG) - Add method to get fix methods.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.List<DiagnosticResolution>getResolutions(ICodeActionService2.Options options, org.eclipse.lsp4j.Diagnostic diagnostic)Collects all possible quickfixes for the given issue.default booleanhandlesDiagnostic(org.eclipse.lsp4j.Diagnostic diagnostic)If the provider handles (it has code to produce resolutions for) the given diagnostic.
-
-
-
Method Detail
-
getResolutions
java.util.List<DiagnosticResolution> getResolutions(ICodeActionService2.Options options, org.eclipse.lsp4j.Diagnostic diagnostic)
Collects all possible quickfixes for the given issue. If there are none, returns an empty list- Parameters:
options- Contextual action optionsdiagnostic- the diagnostic- Returns:
- 0..n resolutions for the given issue
-
handlesDiagnostic
default boolean handlesDiagnostic(org.eclipse.lsp4j.Diagnostic diagnostic)
If the provider handles (it has code to produce resolutions for) the given diagnostic.- Parameters:
diagnostic- the diagnostic- Returns:
- true if the provider handles the given diagnostic
- Since:
- 2.28
-
-