java.lang.Object
org.eclipse.lsp4j.debug.Scope
io.quarkus.qute.debug.agent.scopes.RemoteScope
- All Implemented Interfaces:
VariablesProvider
- Direct Known Subclasses:
GlobalsScope,LocalsScope,NamespaceResolversScope
public abstract class RemoteScope
extends org.eclipse.lsp4j.debug.Scope
implements VariablesProvider
Represents a scope in the Qute debugger (e.g., locals, globals, namespace resolvers).
A RemoteScope wraps a RemoteStackFrame and exposes its variables.
The variables are lazily computed and cached.
Subclasses must implement createVariables() to define how variables
are collected from the underlying context (locals, globals, or other resolvers).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.eclipse.lsp4j.debug.Scope[]Empty scope array constant for convenience. -
Constructor Summary
ConstructorsConstructorDescriptionRemoteScope(String name, RemoteStackFrame frame, VariablesRegistry variablesRegistry) Creates a new remote scope. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Collection<org.eclipse.lsp4j.debug.Variable> Subclasses must implement this method to create the list of variables for the scope.protected static voidfillVariables(RemoteStackFrame frame, io.quarkus.qute.ResolutionContext context, Collection<org.eclipse.lsp4j.debug.Variable> variables, VariablesRegistry variablesRegistry) Helper to fill a collection of variables from aResolutionContext.Returns the stack frame associated with this scope.Collection<org.eclipse.lsp4j.debug.Variable> Returns the variables contained in this scope.Returns the registry used to manage variables in this scope.Methods inherited from class org.eclipse.lsp4j.debug.Scope
equals, getColumn, getEndColumn, getEndLine, getIndexedVariables, getLine, getName, getNamedVariables, getPresentationHint, getSource, getVariablesReference, hashCode, isExpensive, setColumn, setEndColumn, setEndLine, setExpensive, setIndexedVariables, setLine, setName, setNamedVariables, setPresentationHint, setSource, setVariablesReference, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.quarkus.qute.debug.agent.variables.VariablesProvider
getVariablesReference, setVariablesReference
-
Field Details
-
EMPTY_SCOPES
public static final org.eclipse.lsp4j.debug.Scope[] EMPTY_SCOPESEmpty scope array constant for convenience.
-
-
Constructor Details
-
RemoteScope
Creates a new remote scope.- Parameters:
name- the name of the scope (e.g., "Locals", "Globals")frame- the stack frame associated with this scopevariablesRegistry- the registry that manages all debugger variables
-
-
Method Details
-
getVariables
Returns the variables contained in this scope.Variables are lazily created via
createVariables()and cached.- Specified by:
getVariablesin interfaceVariablesProvider- Returns:
- a collection of
Variableobjects
-
createVariables
Subclasses must implement this method to create the list of variables for the scope.- Returns:
- a collection of
Variableobjects
-
fillVariables
protected static void fillVariables(RemoteStackFrame frame, io.quarkus.qute.ResolutionContext context, Collection<org.eclipse.lsp4j.debug.Variable> variables, VariablesRegistry variablesRegistry) Helper to fill a collection of variables from aResolutionContext.Supports
MapandMapperdata sources. Each entry is converted into aVariableusing.invalid reference
VariablesHelper#fillVariable- Parameters:
frame- the stack framecontext- the resolution context containing the datavariables- the collection to fillvariablesRegistry- the registry managing variables
-
getVariablesRegistry
Returns the registry used to manage variables in this scope. -
getStackFrame
Returns the stack frame associated with this scope.
-