Class missing_start_elementCodeAction
java.lang.Object
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.codeaction.missing_start_elementCodeAction
- All Implemented Interfaces:
IRNCCodeActionParticipant
Code action for the
missing-start-element error.
When a grammar has defines but no start = ... declaration,
this code action offers to insert start = <defineName> for each
existing define, at the beginning of the document (before the first define).
Use case: the user writes:
root = element root { text }
Jing reports "missing start element". The code action offers
"Add 'start = root'" which inserts start = root before the define.
-
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 one "Add 'start = ...'" code action per existing define, inserting the start declaration before the first define.
-
Constructor Details
-
missing_start_elementCodeAction
public missing_start_elementCodeAction()
-
-
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 one "Add 'start = ...'" code action per existing define, inserting the start declaration before the first define.- Specified by:
doCodeActionin interfaceIRNCCodeActionParticipant
-