Class QuickFixCodeActionProvider

java.lang.Object
org.mule.weave.extension.api.extension.action.QuickFixCodeActionProvider
All Implemented Interfaces:
WeaveCodeActionProvider

public abstract class QuickFixCodeActionProvider extends Object implements WeaveCodeActionProvider
Base class for creating CodeAction for quick fixes. It takes care of the checking if there is a Diagnostic reported for the current location were the code action is requested. Implementation that would like to contribute with code actions as quick fixes should extend from this class.
  • Constructor Details

    • QuickFixCodeActionProvider

      public QuickFixCodeActionProvider()
  • Method Details

    • handles

      public final boolean handles(org.eclipse.lsp4j.CodeActionParams params, @Nullable ContextMetadata context)
      Specified by:
      handles in interface WeaveCodeActionProvider
    • getDiagnostic

      protected Optional<org.eclipse.lsp4j.Diagnostic> getDiagnostic(org.eclipse.lsp4j.CodeActionParams params, List<org.eclipse.lsp4j.Diagnostic> diagnostics)
    • getKind

      protected abstract String getKind()