Module io.quarkus.qute.debug
Class CompletionContext
java.lang.Object
io.quarkus.qute.debug.agent.completions.CompletionContext
- All Implemented Interfaces:
ValueResolverContext
Context for collecting code completions in the debugger.
Implements ValueResolverContext and is used when the debugger
needs to provide completion suggestions in Qute templates.
Collects properties (fields and string-named) and methods (reflection
or string-named) of the base object, storing them as
CompletionItem. Can be converted into a CompletionsResponse.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.eclipse.lsp4j.debug.CompletionItem[]Empty array of completion items for DAP responses. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(org.eclipse.lsp4j.debug.CompletionItem item) Adds a completion item if it is not already present.voidRegisters a method to the context (for completion or variable tracking).voidRegisters a method by name.voidaddProperty(Field field) Registers a field as a property in the context.voidaddProperty(String property) Registers a property by name.getBase()Returns the base object being inspected.Returns the current stack frame for the debugger.booleanReturns true if the context is collecting methods.booleanReturns true if the context is collecting properties.org.eclipse.lsp4j.debug.CompletionsResponseConverts collected items to a DAPCompletionsResponse.
-
Field Details
-
EMPTY_COMPLETION_ITEMS
public static final org.eclipse.lsp4j.debug.CompletionItem[] EMPTY_COMPLETION_ITEMSEmpty array of completion items for DAP responses.
-
-
Constructor Details
-
CompletionContext
-
-
Method Details
-
getBase
Description copied from interface:ValueResolverContextReturns the base object being inspected.- Specified by:
getBasein interfaceValueResolverContext
-
getStackFrame
Description copied from interface:ValueResolverContextReturns the current stack frame for the debugger.- Specified by:
getStackFramein interfaceValueResolverContext
-
toResponse
public org.eclipse.lsp4j.debug.CompletionsResponse toResponse()Converts collected items to a DAPCompletionsResponse. -
addMethod
Description copied from interface:ValueResolverContextRegisters a method to the context (for completion or variable tracking).- Specified by:
addMethodin interfaceValueResolverContext
-
addProperty
Description copied from interface:ValueResolverContextRegisters a field as a property in the context.- Specified by:
addPropertyin interfaceValueResolverContext
-
addProperty
Description copied from interface:ValueResolverContextRegisters a property by name.- Specified by:
addPropertyin interfaceValueResolverContext
-
addMethod
Description copied from interface:ValueResolverContextRegisters a method by name.- Specified by:
addMethodin interfaceValueResolverContext
-
add
public void add(org.eclipse.lsp4j.debug.CompletionItem item) Adds a completion item if it is not already present. -
isCollectProperty
public boolean isCollectProperty()Description copied from interface:ValueResolverContextReturns true if the context is collecting properties.- Specified by:
isCollectPropertyin interfaceValueResolverContext
-
isCollectMethod
public boolean isCollectMethod()Description copied from interface:ValueResolverContextReturns true if the context is collecting methods.- Specified by:
isCollectMethodin interfaceValueResolverContext
-