Class missing_patternCodeAction
java.lang.Object
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.codeaction.missing_patternCodeAction
- All Implemented Interfaces:
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 contentempty— empty contentelement name { }— nested elementattribute 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 -
Method Summary
Modifier and TypeMethodDescriptionvoiddoCodeAction(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).
-
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:
doCodeActionin interfaceIRNCCodeActionParticipant
-