Index: branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ResultCorrelationView.cs
===================================================================
--- branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ResultCorrelationView.cs	(revision 9380)
+++ branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ResultCorrelationView.cs	(revision 9382)
@@ -49,4 +49,6 @@
     }
 
+    private Dictionary<string, ResultParameterType> resultsParameters;
+
     protected override void OnContentChanged() {
       base.OnContentChanged();
@@ -54,4 +56,5 @@
 
       if (Content != null) {
+        resultsParameters = GetRowNames();
         UpdateResultComboBox();
       }
@@ -64,11 +67,5 @@
       Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
       Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
-
-      RegisterRunEvents(Content);
-    }
-
-    private void RegisterRunEvents(IEnumerable<IRun> runs) {
-      foreach (IRun run in runs)
-        run.Changed += new EventHandler(run_Changed);
+      Content.UpdateOfRunsInProgressChanged += Content_UpdateOfRunsInProgressChanged;
     }
 
@@ -78,69 +75,95 @@
       Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
       Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
-
-      DeregisterRunEvents(Content);
-    }
-
-    private void DeregisterRunEvents(IEnumerable<IRun> runs) {
-      foreach (IRun run in runs)
-        run.Changed -= new EventHandler(run_Changed);
+      Content.UpdateOfRunsInProgressChanged -= Content_UpdateOfRunsInProgressChanged;
     }
 
     private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
-      DeregisterRunEvents(e.OldItems);
-      RegisterRunEvents(e.Items);
-      //RebuildInfluenceDataTable();
+      RebuildCorrelationTable();
     }
 
     private void Content_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
-      DeregisterRunEvents(e.Items);
-      //RebuildInfluenceDataTable();
+      RebuildCorrelationTable();
     }
 
     private void Content_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
-      RegisterRunEvents(e.Items);
-      //RebuildInfluenceDataTable();
-    }
-
-    private void run_Changed(object sender, EventArgs e) {
-      if (InvokeRequired)
-        this.Invoke(new EventHandler(run_Changed), sender, e);
-      else {
-        IRun run = (IRun)sender;
-        UpdateRun(run);
+      RebuildCorrelationTable();
+    }
+
+    void Content_UpdateOfRunsInProgressChanged(object sender, EventArgs e) {
+      if (!Content.UpdateOfRunsInProgress) {
+        RebuildCorrelationTable();
       }
     }
     #endregion
-
-    private void UpdateRun(IRun run) {
-      //TODO: hacky di hack... this is baaaadddd
-      RebuildCorrelationTable();
-    }
 
     private void UpdateResultComboBox() {
       resultComboBox.Items.Clear();
+
+      resultComboBox.Items.AddRange(resultsParameters.Keys.ToArray());
+      if (resultComboBox.Items.Count > 0) resultComboBox.SelectedItem = resultComboBox.Items[0];
+    }
+
+    private List<string> GetResultRowNames() {
       var results = (from run in Content
+                     where run.Visible
                      from result in run.Results
-                     select result.Key).Distinct().ToArray();
-
-      resultComboBox.Items.AddRange(results);
-      if (resultComboBox.Items.Count > 0) resultComboBox.SelectedItem = resultComboBox.Items[0];
-    }
-
-
-    private List<string> GetRowNames() {
-      string resultName = (string)resultComboBox.SelectedItem;
-      var runs = Content.Where(x => x.Results.ContainsKey(resultName) && x.Visible);
-      List<string> ret = new List<string>();
+                     where result.Value is DoubleValue || result.Value is IntValue
+                     select result.Key).Distinct().ToList();
+
+      return results;
+    }
+
+    private List<string> GetParameterRowNames() {
+      var parameters = (from run in Content
+                        where run.Visible
+                        from parameter in run.Parameters
+                        where parameter.Value is DoubleValue || parameter.Value is IntValue
+                        select parameter.Key).Distinct().ToList();
+
+      return parameters;
+    }
+
+    private Dictionary<string, ResultParameterType> GetRowNames() {
+      Dictionary<string, ResultParameterType> ret = new Dictionary<string, ResultParameterType>();
+
+      var results = GetResultRowNames();
+      var parameters = GetParameterRowNames();
+
+      foreach (var r in results) {
+        ret.Add(r, ResultParameterType.Result);
+      }
+      foreach (var p in parameters) {
+        if (!ret.ContainsKey(p)) {
+          ret.Add(p, ResultParameterType.Parameter);
+        }
+      }
+
+      return ret;
+    }
+
+    private List<double> GetDoublesFromResults(List<IRun> runs, string key) {
+      List<double> res = new List<double>();
 
       foreach (var r in runs) {
-        var ress = r.Results.Where(y => y.Value is DoubleValue).Select(z => z.Key);
-        foreach (var s in ress) {
-          if (!ret.Contains(s))
-            ret.Add(s);
-        }
-      }
-
-      return ret;
+        if (r.Results[key] is DoubleValue) {
+          res.Add(((DoubleValue)r.Results[key]).Value);
+        } else {
+          res.Add(((IntValue)r.Results[key]).Value);
+        }
+      }
+      return res;
+    }
+
+    private List<double> GetDoublesFromParameters(List<IRun> runs, string key) {
+      List<double> res = new List<double>();
+
+      foreach (var r in runs) {
+        if (r.Parameters[key] is DoubleValue) {
+          res.Add(((DoubleValue)r.Parameters[key]).Value);
+        } else {
+          res.Add(((IntValue)r.Parameters[key]).Value);
+        }
+      }
+      return res;
     }
 
@@ -151,16 +174,22 @@
       columnNames[0] = "Pearson product-moment correlation coefficient";
       columnNames[1] = "Spearman's rank correlation coefficient";
-      var rowNames = GetRowNames();
+
 
       var runs = Content.Where(x => x.Results.ContainsKey(resultName) && x.Visible);
 
-      DoubleMatrix dt = new DoubleMatrix(rowNames.Count(), columnNames.Count());
-      dt.RowNames = rowNames;
+      DoubleMatrix dt = new DoubleMatrix(resultsParameters.Count(), columnNames.Count());
+      dt.RowNames = resultsParameters.Keys.ToArray();
       dt.ColumnNames = columnNames;
 
       int j = 0;
-      foreach (var rowName in rowNames) {
-        var resultRowVals = runs.Where(x => x.Results.ContainsKey(rowName)).Where(x => x.Results[rowName] is DoubleValue).Select(x => ((DoubleValue)x.Results[rowName]).Value);
-        var resultVals = runs.Where(x => x.Results.ContainsKey(resultName)).Where(x => x.Results[resultName] is DoubleValue).Select(x => ((DoubleValue)x.Results[resultName]).Value);
+      foreach (var rowName in resultsParameters) {
+        var resultVals = GetDoublesFromResults(runs.Where(x => x.Results.ContainsKey(resultName)).Where(x => x.Results[resultName] is DoubleValue || x.Results[resultName] is IntValue).ToList(), resultName);
+
+        List<double> resultRowVals = new List<double>();
+        if (rowName.Value == ResultParameterType.Result) {
+          resultRowVals = GetDoublesFromResults(runs.Where(x => x.Results.ContainsKey(rowName.Key)).Where(x => x.Results[rowName.Key] is DoubleValue || x.Results[rowName.Key] is IntValue).ToList(), rowName.Key);
+        } else {
+          resultRowVals = GetDoublesFromParameters(runs.Where(x => x.Parameters.ContainsKey(rowName.Key)).Where(x => x.Parameters[rowName.Key] is DoubleValue || x.Parameters[rowName.Key] is IntValue).ToList(), rowName.Key);
+        }
 
         if (resultVals.Contains(double.NaN)
@@ -184,4 +213,9 @@
       RebuildCorrelationTable();
     }
+
+    private enum ResultParameterType {
+      Result,
+      Parameter
+    }
   }
 }
Index: branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ResultCorrelationView.designer.cs
===================================================================
--- branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ResultCorrelationView.designer.cs	(revision 9380)
+++ branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/ResultCorrelationView.designer.cs	(revision 9382)
@@ -60,5 +60,5 @@
       this.stringConvertibleMatrixView.Location = new System.Drawing.Point(3, 30);
       this.stringConvertibleMatrixView.Name = "stringConvertibleMatrixView";
-      this.stringConvertibleMatrixView.ReadOnly = false;
+      this.stringConvertibleMatrixView.ReadOnly = true;
       this.stringConvertibleMatrixView.ShowRowsAndColumnsTextBox = true;
       this.stringConvertibleMatrixView.ShowStatisticalInformation = true;
