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 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 interface IManagedService
    • deactivate

      public void deactivate()
      Stops service work. The service stops to listen debug events.
      Specified by:
      deactivate in interface IManagedService
    • handleDebugEvents

      public void handleDebugEvents(org.eclipse.debug.core.DebugEvent[] events)
      Specified by:
      handleDebugEvents in interface org.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:
      1. All threads of the current context debug target.
      2. All stack frames of each thread.
      3. 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

      protected void evaluate(IBslStackFrame stackFrame, IEvaluationChain reevaluation)
      Evaluates the provided re-evaluation on the provided BSL stack frame.
      Parameters:
      stackFrame - the BSL stack frame to perform re-evaluation on, cannot be null
    • getContext

      protected IRuntimeDebugElement getContext()
      Finds the currently selected context in the UI. Can return null if none.
      Returns:
      the current debug context or null if none
    • getStackFrame

      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.
      Parameters:
      context - the context 1C:Enterprise runtime debug model element, cannot be null
      Returns:
      BSL the stack frame, that can be used for expression evaluation, or null if cannot get