Class AbstractDeclarativeIdeQuickfixProvider

  • All Implemented Interfaces:
    IQuickFixProvider

    @Beta
    public class AbstractDeclarativeIdeQuickfixProvider
    extends java.lang.Object
    implements IQuickFixProvider
    Since:
    2.24
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.List<org.eclipse.lsp4j.TextEdit> createTextEdit​(org.eclipse.lsp4j.Diagnostic diagnostic, java.lang.String text)
      Creates a singleton list with only one TextEdit that replaces the region of the diagnostic with the given text
      java.util.List<java.lang.reflect.Method> getFixMethods​(org.eclipse.lsp4j.Diagnostic diagnostic)  
      java.util.List<DiagnosticResolution> getResolutions​(ICodeActionService2.Options options, org.eclipse.lsp4j.Diagnostic diagnostic)
      Collects all possible quickfixes for the given issue.
      boolean handlesDiagnostic​(org.eclipse.lsp4j.Diagnostic diagnostic)
      If the provider handles (it has code to produce resolutions for) the given diagnostic.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractDeclarativeIdeQuickfixProvider

        public AbstractDeclarativeIdeQuickfixProvider()
    • Method Detail

      • getResolutions

        public java.util.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 java.util.List<java.lang.reflect.Method> getFixMethods​(org.eclipse.lsp4j.Diagnostic diagnostic)
      • createTextEdit

        protected java.util.List<org.eclipse.lsp4j.TextEdit> createTextEdit​(org.eclipse.lsp4j.Diagnostic diagnostic,
                                                                            java.lang.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