- Timestamp:
- 12/16/10 17:57:47 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.DebugEngine/3.3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DebugEngine/3.3/DebugEngine.cs
r5114 r5117 161 161 lastUpdateTime = DateTime.Now; 162 162 timer.Start(); 163 ProcessNextOperation( );163 ProcessNextOperation(true); 164 164 while (skipStackOperations && !(CurrentOperation is IAtomicOperation) && CanContinue) 165 ProcessNextOperation( );165 ProcessNextOperation(true); 166 166 timer.Stop(); 167 167 ExecutionTime += DateTime.Now - lastUpdateTime; … … 215 215 timer.Start(); 216 216 if (!pausePending && !stopPending && CanContinue) 217 ProcessNextOperation( );217 ProcessNextOperation(false); 218 218 while (!pausePending && !stopPending && CanContinue && !IsAtBreakpoint) 219 ProcessNextOperation( );219 ProcessNextOperation(false); 220 220 timer.Stop(); 221 221 ExecutionTime += DateTime.Now - lastUpdateTime; … … 247 247 /// is pushed on the stack again.<br/> 248 248 /// If the execution was successful <see cref="EngineBase.OnOperationExecuted"/> is called.</remarks> 249 protected virtual void ProcessNextOperation( ) {249 protected virtual void ProcessNextOperation(bool logOperations) { 250 250 try { 251 251 IAtomicOperation atomicOperation = CurrentOperation as IAtomicOperation; … … 255 255 256 256 if (atomicOperation != null) { 257 Log.LogMessage(string.Format("Performing atomic operation {0}", Utils.Name(atomicOperation))); 257 if (logOperations) 258 Log.LogMessage(string.Format("Performing atomic operation {0}", Utils.Name(atomicOperation))); 258 259 PerformAtomicOperation(atomicOperation); 259 260 } else if (operations != null) { 260 Log.LogMessage("Expanding operation collection"); 261 if (logOperations) 262 Log.LogMessage("Expanding operation collection"); 261 263 ExecutionStack.AddRange(operations.Reverse()); 262 264 CurrentOperation = null; 263 265 } else if (ExecutionStack.Count > 0) { 264 Log.LogMessage("Popping execution stack"); 266 if (logOperations) 267 Log.LogMessage("Popping execution stack"); 265 268 CurrentOperation = ExecutionStack.Last(); 266 269 ExecutionStack.RemoveAt(ExecutionStack.Count - 1); 267 270 } else { 268 Log.LogMessage("Nothing to do"); 271 if (logOperations) 272 Log.LogMessage("Nothing to do"); 269 273 } 270 274 OperatorTrace.Regenerate(CurrentAtomicOperation); -
trunk/sources/HeuristicLab.DebugEngine/3.3/DebugEngineView.Designer.cs
r5114 r5117 77 77 // executionStackView 78 78 // 79 this.executionStackView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 80 | System.Windows.Forms.AnchorStyles.Left)81 79 this.executionStackView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 80 | System.Windows.Forms.AnchorStyles.Left) 81 | System.Windows.Forms.AnchorStyles.Right))); 82 82 this.executionStackView.Caption = "Execution Stack View"; 83 83 this.executionStackView.Content = null; … … 124 124 this.skipStackOpsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 125 125 this.skipStackOpsCheckBox.AutoSize = true; 126 this.skipStackOpsCheckBox.Checked = true; 127 this.skipStackOpsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; 126 128 this.skipStackOpsCheckBox.Location = new System.Drawing.Point(63, 516); 127 129 this.skipStackOpsCheckBox.Name = "skipStackOpsCheckBox"; … … 146 148 // splitContainer3 147 149 // 148 this.splitContainer3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 149 | System.Windows.Forms.AnchorStyles.Left)150 150 this.splitContainer3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 151 | System.Windows.Forms.AnchorStyles.Left) 152 | System.Windows.Forms.AnchorStyles.Right))); 151 153 this.splitContainer3.Location = new System.Drawing.Point(0, 0); 152 154 this.splitContainer3.Name = "splitContainer3"; -
trunk/sources/HeuristicLab.DebugEngine/3.3/OperatorTrace.cs
r5114 r5117 36 36 [Storable] 37 37 protected Dictionary<IAtomicOperation, IAtomicOperation> parents; 38 39 [Storable] 40 protected bool isEnabled; 38 41 #endregion 39 42 … … 90 93 91 94 public virtual void RegisterParenthood(IAtomicOperation parent, IOperation children) { 95 if (!isEnabled) 96 return; 92 97 OperationCollection operations = children as OperationCollection; 93 98 if (operations != null) … … 117 122 } 118 123 124 public bool IsEnabled { 125 get { return isEnabled; } 126 set { 127 if (isEnabled == value) 128 return; 129 isEnabled = value; 130 if (!isEnabled) 131 Reset(); 132 } 133 } 134 119 135 #endregion 120 136 } -
trunk/sources/HeuristicLab.DebugEngine/3.3/OperatorTraceView.Designer.cs
r5116 r5117 50 50 this.listViewColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 51 51 this.imageList = new System.Windows.Forms.ImageList(this.components); 52 this.isEnabledCheckbox = new System.Windows.Forms.CheckBox(); 52 53 this.operatorTraceGroupBox.SuspendLayout(); 53 54 this.SuspendLayout(); … … 55 56 // operatorTraceGroupBox 56 57 // 58 this.operatorTraceGroupBox.Controls.Add(this.isEnabledCheckbox); 57 59 this.operatorTraceGroupBox.Controls.Add(this.listView); 58 60 this.operatorTraceGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; … … 73 75 this.listView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; 74 76 this.listView.HideSelection = false; 75 this.listView.Location = new System.Drawing.Point(6, 19);77 this.listView.Location = new System.Drawing.Point(6, 43); 76 78 this.listView.Name = "listView"; 77 79 this.listView.ShowItemToolTips = true; 78 this.listView.Size = new System.Drawing.Size(140, 4 64);80 this.listView.Size = new System.Drawing.Size(140, 440); 79 81 this.listView.SmallImageList = this.imageList; 80 82 this.listView.TabIndex = 0; … … 89 91 this.imageList.TransparentColor = System.Drawing.Color.Transparent; 90 92 // 93 // isEnabledCheckbox 94 // 95 this.isEnabledCheckbox.AutoSize = true; 96 this.isEnabledCheckbox.Location = new System.Drawing.Point(7, 20); 97 this.isEnabledCheckbox.Name = "isEnabledCheckbox"; 98 this.isEnabledCheckbox.Size = new System.Drawing.Size(65, 17); 99 this.isEnabledCheckbox.TabIndex = 1; 100 this.isEnabledCheckbox.Text = "Enabled"; 101 this.isEnabledCheckbox.UseVisualStyleBackColor = true; 102 this.isEnabledCheckbox.CheckedChanged += new System.EventHandler(this.isEnabledCheckbox_CheckedChanged); 103 // 91 104 // OperatorTraceView 92 105 // … … 97 110 this.Size = new System.Drawing.Size(152, 489); 98 111 this.operatorTraceGroupBox.ResumeLayout(false); 112 this.operatorTraceGroupBox.PerformLayout(); 99 113 this.ResumeLayout(false); 100 114 … … 107 121 private System.Windows.Forms.ImageList imageList; 108 122 private System.Windows.Forms.ColumnHeader listViewColumnHeader; 123 private System.Windows.Forms.CheckBox isEnabledCheckbox; 109 124 } 110 125 } -
trunk/sources/HeuristicLab.DebugEngine/3.3/OperatorTraceView.cs
r5114 r5117 101 101 } 102 102 103 protected override void SetEnabledStateOfControls() { 104 base.SetEnabledStateOfControls(); 105 isEnabledCheckbox.Enabled = Content != null; 106 } 107 103 108 #region Event Handlers (child controls) 104 109 private void listView_ItemActivate(object sender, EventArgs e) { … … 111 116 } 112 117 #endregion 118 119 private void isEnabledCheckbox_CheckedChanged(object sender, EventArgs e) { 120 Content.IsEnabled = isEnabledCheckbox.Checked; 121 } 113 122 } 114 123
Note: See TracChangeset
for help on using the changeset viewer.