Interface IQuickFixProvider

All Known Implementing Classes:
AbstractDeclarativeIdeQuickfixProvider

@Beta public interface IQuickFixProvider
Quickfix 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.
Author:
Heinrich Weichert
  • Method Summary

    Modifier and Type
    Method
    Description
    getResolutions(ICodeActionService2.Options options, org.eclipse.lsp4j.Diagnostic diagnostic)
    Collects all possible quickfixes for the given issue.
    default boolean
    handlesDiagnostic(org.eclipse.lsp4j.Diagnostic diagnostic)
    If the provider handles (it has code to produce resolutions for) the given diagnostic.
  • Method Details

    • getResolutions

      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 options
      diagnostic - 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