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

public class missing_uriCodeAction extends AbstractRNCInsertCodeAction
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 Details

    • missing_uriCodeAction

      public missing_uriCodeAction()
  • Method Details

    • getTitle

      protected String getTitle()
      Description copied from class: AbstractRNCInsertCodeAction
      Returns 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:
      getTitle in class AbstractRNCInsertCodeAction
      Returns:
      the code action title.
    • getInsertText

      protected String getInsertText(boolean snippetSupported)
      Description copied from class: AbstractRNCInsertCodeAction
      Returns the text to insert at the diagnostic's end position.

      When snippetSupported is true, the returned text may contain LSP snippet syntax ($0 for final cursor, ${1:placeholder} for editable placeholders) to guide the user after the fix is applied.

      Specified by:
      getInsertText in class AbstractRNCInsertCodeAction
      Parameters:
      snippetSupported - true if the client supports snippet syntax.
      Returns:
      the text to insert (plain or snippet).
      See Also: