Class missing_assignCodeAction

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

public class missing_assignCodeAction extends AbstractRNCInsertCodeAction
Code action for the missing-assign error — inserts = after a define or start keyword.

Use case: the user writes start root instead of start = root. The code action inserts " = " after start.

  • Constructor Details

    • missing_assignCodeAction

      public missing_assignCodeAction()
  • 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: