Class missing_patternCodeAction

java.lang.Object
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.codeaction.missing_patternCodeAction
All Implemented Interfaces:
IRNCCodeActionParticipant

public class missing_patternCodeAction extends Object implements IRNCCodeActionParticipant
Code action for the missing-pattern error — offers quick fixes to fill an empty block with a pattern.

Generates code actions to insert common patterns inside an empty { } block:

  • text — text content
  • empty — empty content
  • element name { } — nested element
  • attribute name { text } — nested attribute

Use case: the user writes element root { } and sees a "missing-pattern" warning. The code action offers to fill it with text or a nested element/attribute.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doCodeAction(RNCDocument rncDocument, org.eclipse.lsp4j.Diagnostic diagnostic, org.eclipse.lsp4j.TextDocumentItem document, boolean snippetSupported, List<org.eclipse.lsp4j.CodeAction> codeActions, IRNCDocumentProvider documentProvider, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)
    Generates code actions to fill an empty block with common patterns (text, empty, nested element, nested attribute).

    Methods inherited from class java.lang.Object

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

    • missing_patternCodeAction

      public missing_patternCodeAction()
  • Method Details

    • doCodeAction

      public void doCodeAction(RNCDocument rncDocument, org.eclipse.lsp4j.Diagnostic diagnostic, org.eclipse.lsp4j.TextDocumentItem document, boolean snippetSupported, List<org.eclipse.lsp4j.CodeAction> codeActions, IRNCDocumentProvider documentProvider, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)
      Generates code actions to fill an empty block with common patterns (text, empty, nested element, nested attribute).
      Specified by:
      doCodeAction in interface IRNCCodeActionParticipant