Class AbstractDeclarativeIdeQuickfixProvider

java.lang.Object
org.eclipse.xtext.ide.editor.quickfix.AbstractDeclarativeIdeQuickfixProvider
All Implemented Interfaces:
IQuickFixProvider

@Beta public class AbstractDeclarativeIdeQuickfixProvider extends Object implements IQuickFixProvider
Since:
2.24
Author:
Heinrich Weichert
  • Constructor Details

    • AbstractDeclarativeIdeQuickfixProvider

      public AbstractDeclarativeIdeQuickfixProvider()
  • Method Details

    • getResolutions

      public List<DiagnosticResolution> getResolutions(ICodeActionService2.Options options, org.eclipse.lsp4j.Diagnostic diagnostic)
      Description copied from interface: IQuickFixProvider
      Collects all possible quickfixes for the given issue. If there are none, returns an empty list
      Specified by:
      getResolutions in interface IQuickFixProvider
      Parameters:
      options - Contextual action options
      diagnostic - the diagnostic
      Returns:
      0..n resolutions for the given issue
    • handlesDiagnostic

      public boolean handlesDiagnostic(org.eclipse.lsp4j.Diagnostic diagnostic)
      Description copied from interface: IQuickFixProvider
      If the provider handles (it has code to produce resolutions for) the given diagnostic.
      Specified by:
      handlesDiagnostic in interface IQuickFixProvider
      Parameters:
      diagnostic - the diagnostic
      Returns:
      true if the provider handles the given diagnostic
    • getFixMethods

      public List<Method> getFixMethods(org.eclipse.lsp4j.Diagnostic diagnostic)
    • createTextEdit

      protected List<org.eclipse.lsp4j.TextEdit> createTextEdit(org.eclipse.lsp4j.Diagnostic diagnostic, String text)
      Creates a singleton list with only one TextEdit that replaces the region of the diagnostic with the given text
      Parameters:
      diagnostic - the Diagnostic
      text - the text
      Returns:
      a singleton list with only one TextEdit
      Since:
      2.27