java.lang.Object
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.AbstractRNCRequest
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.hover.RNCHoverRequest
All Implemented Interfaces:
ISharedSettingsRequest

public class RNCHoverRequest extends AbstractRNCRequest
Encapsulates all context needed to compute RNC hover information.

Created once per hover request, this class resolves the cursor offset, word at the cursor, and document text. It also exposes client capabilities (markdown support) via ISharedSettingsRequest.

  • Constructor Details

    • RNCHoverRequest

      public RNCHoverRequest(RNCDocument rncDocument, org.eclipse.lsp4j.Position position, SharedSettings sharedSettings) throws BadLocationException
      Creates a new hover request.
      Parameters:
      rncDocument - the parsed RNC document.
      position - the cursor position.
      sharedSettings - the shared client settings.
      Throws:
      BadLocationException - if the position cannot be converted to an offset.
  • Method Details

    • getOffset

      public int getOffset()
      Overrides:
      getOffset in class AbstractRNCRequest
    • getWord

      public String getWord()
    • canSupportMarkdown

      public boolean canSupportMarkdown()
    • canSupportMarkupKind

      public boolean canSupportMarkupKind(String kind)
      Description copied from interface: ISharedSettingsRequest
      Returns true if the client can support the given Markup kind for documentation and false otherwise.
      Parameters:
      kind - the markup kind
      Returns:
      true if the client can support the given Markup kind for documentation and false otherwise.