Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/22/10 14:08:18 (13 years ago)
Author:
epitzer
Message:

Many small improvements to DebugEngine (#47)

  • suppress logging during execution
  • add refresh button
  • optionally skip over execution stack operators
  • expand all tree views and scroll to top node
  • show operator on click on atomic operation
  • add build.cmd
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DebugEngine/DebugEngine.cs

    r4871 r4903  
    2222using System;
    2323using System.Linq;
    24 using System.Collections.Generic;
     24using System.Threading;
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using HeuristicLab.Collections;
    29 using System.Threading;
    3028
    3129namespace HeuristicLab.DebugEngine {
     
    3533  public class DebugEngine : Executable, IEngine {
    3634
    37 
    3835    #region Construction and Cloning
    39    
     36
    4037    [StorableConstructor]
    41     protected DebugEngine(bool deserializing) : base(deserializing) {
     38    protected DebugEngine(bool deserializing)
     39      : base(deserializing) {
    4240      pausePending = stopPending = false;
    4341      timer = new System.Timers.Timer(100);
     
    4543      timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
    4644    }
    47     protected DebugEngine(DebugEngine original, Cloner cloner) : base(original, cloner) {
     45    protected DebugEngine(DebugEngine original, Cloner cloner)
     46      : base(original, cloner) {
    4847      if (original.ExecutionState == ExecutionState.Started) throw new InvalidOperationException(string.Format("Clone not allowed in execution state \"{0}\".", ExecutionState));
    4948      Log = cloner.Clone(original.Log);
     
    8483    private DateTime lastUpdateTime;
    8584    private System.Timers.Timer timer;
    86      
     85
    8786    [Storable]
    8887    private IOperator currentOperator;
     
    108107
    109108    public virtual IExecutionContext CurrentExecutionContext {
    110       get { return CurrentOperation as IExecutionContext;  }
     109      get { return CurrentOperation as IExecutionContext; }
    111110    }
    112111
     
    153152      ignoreNextBreakpoint = true;
    154153      timer.Start();
    155       ProcessNextOperation();     
     154      ProcessNextOperation();
    156155      timer.Stop();
    157156      ExecutionTime += DateTime.Now - lastUpdateTime;
     
    165164      ThreadPool.QueueUserWorkItem(new WaitCallback(Run), null);
    166165    }
    167    
     166
    168167    protected override void OnStarted() {
    169168      Log.LogMessage("Engine started");
     
    190189      if (ExecutionState == ExecutionState.Paused) OnStopped();
    191190    }
    192    
     191
    193192    protected override void OnStopped() {
    194193      Log.LogMessage("Engine stopped");
Note: See TracChangeset for help on using the changeset viewer.