Class missing_uriCodeAction
java.lang.Object
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.codeaction.AbstractRNCInsertCodeAction
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.codeaction.missing_uriCodeAction
- All Implemented Interfaces:
IRNCCodeActionParticipant
Code action for the
missing-uri error — inserts a URI string
literal after an include keyword.
Use case: the user writes include without a file path.
The code action inserts "" with the cursor inside the quotes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetInsertText(boolean snippetSupported) Returns the text to insert at the diagnostic's end position.protected StringgetTitle()Returns the human-readable title for the code action, displayed in the editor's quick-fix menu (e.g.Methods inherited from class org.eclipse.lemminx.extensions.relaxng.grammar.rnc.codeaction.AbstractRNCInsertCodeAction
doCodeAction
-
Constructor Details
-
missing_uriCodeAction
public missing_uriCodeAction()
-
-
Method Details
-
getTitle
Description copied from class:AbstractRNCInsertCodeActionReturns the human-readable title for the code action, displayed in the editor's quick-fix menu (e.g. "Add '='", "Add name", "Add URI").- Specified by:
getTitlein classAbstractRNCInsertCodeAction- Returns:
- the code action title.
-
getInsertText
Description copied from class:AbstractRNCInsertCodeActionReturns the text to insert at the diagnostic's end position.When
snippetSupportedistrue, the returned text may contain LSP snippet syntax ($0for final cursor,${1:placeholder}for editable placeholders) to guide the user after the fix is applied.- Specified by:
getInsertTextin classAbstractRNCInsertCodeAction- Parameters:
snippetSupported-trueif the client supports snippet syntax.- Returns:
- the text to insert (plain or snippet).
- See Also:
-