Class RemoteSource

java.lang.Object
org.eclipse.lsp4j.debug.Source
io.quarkus.qute.debug.agent.source.RemoteSource
Direct Known Subclasses:
FileSource, JarSource

public abstract class RemoteSource extends org.eclipse.lsp4j.debug.Source
Represents a remote Qute template source used in the debug agent.

This class extends the standard DAP Source to include additional information relevant to Qute templates, such as:

  • The original URI of the template (if available)
  • The Qute templateId used to identify the template within the engine

Both fields are marked transient because they are not meant to be serialized through the DAP protocol — only the standard Source properties are transmitted to the client.

  • Constructor Summary

    Constructors
    Constructor
    Description
    RemoteSource(URI uri, String templateId)
     
    RemoteSource(URI uri, String templateId, int startLine)
    Creates a new remote source associated with the given template.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    Computes a human-readable name for this source, based on its URI.
    int
     
    Returns the Qute template identifier.
    Returns the URI of this template source.

    Methods inherited from class org.eclipse.lsp4j.debug.Source

    equals, getAdapterData, getChecksums, getName, getOrigin, getPath, getPresentationHint, getSourceReference, getSources, hashCode, setAdapterData, setChecksums, setName, setOrigin, setPath, setPresentationHint, setSourceReference, setSources, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • RemoteSource

      public RemoteSource(URI uri, String templateId)
    • RemoteSource

      public RemoteSource(URI uri, String templateId, int startLine)
      Creates a new remote source associated with the given template.
      Parameters:
      uri - the URI of the template source, or null if not applicable
      templateId - the template ID used by the Qute engine (never null)
  • Method Details

    • computeName

      protected String computeName(URI uri)
      Computes a human-readable name for this source, based on its URI.

      The default implementation extracts the last segment (file name) from the URI. Subclasses may override this method to provide a more descriptive name.

      Parameters:
      uri - the source URI
      Returns:
      a display name for the source
    • getUri

      public URI getUri()
      Returns the URI of this template source.
      Returns:
      the URI, or null if not applicable
    • getTemplateId

      public String getTemplateId()
      Returns the Qute template identifier.
      Returns:
      the template ID (never null)
    • getStartLine

      public int getStartLine()