Class include_not_overridingCodeAction

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

public class include_not_overridingCodeAction extends Object implements IRNCCodeActionParticipant
Code action for the include-not-overriding error — offers "Did you mean" suggestions and a list of overridable defines from the included file.

Use case: the user writes xparagraph = ... inside an include body but the included file defines paragraph, not xparagraph. The code action offers "Did you mean 'paragraph'?" and lists all other overridable defines (start, header, etc.).

 include "base.rnc" {
   xparagraph = element p { text }   ← error: does not override anything
 }
 
See Also:
  • Constructor Details

    • include_not_overridingCodeAction

      public include_not_overridingCodeAction()
  • 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 "Did you mean" and "Replace with" code actions by resolving the included file and comparing its defines with the misspelled name.
      Specified by:
      doCodeAction in interface IRNCCodeActionParticipant