Class BslValueReevaluationService
java.lang.Object
com._1c.g5.v8.dt.internal.debug.ui.variables.BslValueReevaluationService
- All Implemented Interfaces:
IManagedService
,org.eclipse.debug.core.IDebugEventSetListener
public class BslValueReevaluationService
extends Object
implements IManagedService, org.eclipse.debug.core.IDebugEventSetListener
BSL value reevaluation service. The service listens debug events and reevaluates variables when it is needed.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
Starts service work.void
Stops service work.protected void
evaluate
(IBslStackFrame stackFrame, IEvaluationChain reevaluation) Evaluates the provided re-evaluation on the provided BSL stack frame.protected IRuntimeDebugElement
Finds the currently selected context in the UI.protected IBslStackFrame
getStackFrame
(IRuntimeDebugElement context) Returns BSL stack frame by the provided 1C:Enterprise runtime debug model element, that can be used for expression evaluation.void
handleDebugEvents
(org.eclipse.debug.core.DebugEvent[] events) protected boolean
Returns whether 1C:Enterprise Runtime BSL debug process is active.protected void
Reevaluates all existing enabled expressions in the current context.protected void
Reevaluates all existing BSL variables in the current context.
-
Constructor Details
-
BslValueReevaluationService
public BslValueReevaluationService()
-
-
Method Details
-
activate
public void activate()Starts service work. The service begins to listen debug events. Clients are intended to deactivate service when service work is no longer needed.- Specified by:
activate
in interfaceIManagedService
-
deactivate
public void deactivate()Stops service work. The service stops to listen debug events.- Specified by:
deactivate
in interfaceIManagedService
-
handleDebugEvents
public void handleDebugEvents(org.eclipse.debug.core.DebugEvent[] events) - Specified by:
handleDebugEvents
in interfaceorg.eclipse.debug.core.IDebugEventSetListener
-
isBslDebugActive
protected boolean isBslDebugActive()Returns whether 1C:Enterprise Runtime BSL debug process is active.- Returns:
- whether 1C:Enterprise Runtime BSL debug process is active
-
reevaluateVariables
protected void reevaluateVariables()Reevaluates all existing BSL variables in the current context. Variables will be collected in the next way:- All threads of the current context debug target.
- All stack frames of each thread.
- All evaluated local variables, all module variables and all properties of each stack frame.
So, all already evaluated variables will be reevaluated.
-
reevaluateExpressions
protected void reevaluateExpressions()Reevaluates all existing enabled expressions in the current context. -
evaluate
Evaluates the provided re-evaluation on the provided BSL stack frame.- Parameters:
stackFrame
- the BSL stack frame to perform re-evaluation on, cannot benull
-
getContext
Finds the currently selected context in the UI. Can returnnull
if none.- Returns:
- the current debug context or
null
if none
-
getStackFrame
Returns BSL stack frame by the provided 1C:Enterprise runtime debug model element, that can be used for expression evaluation.- Parameters:
context
- the context 1C:Enterprise runtime debug model element, cannot benull
- Returns:
- BSL the stack frame, that can be used for expression evaluation, or
null
if cannot get
-