Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj	(revision 6692)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj	(revision 6693)
@@ -128,4 +128,10 @@
       <DependentUpon>BatchRunView.cs</DependentUpon>
     </Compile>
+    <Compile Include="RunCollectionModifierListView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="RunCollectionModifierListView.Designer.cs">
+      <DependentUpon>RunCollectionModifierListView.cs</DependentUpon>
+    </Compile>
     <Compile Include="RunCollectionContentConstraintView.cs">
       <SubType>UserControl</SubType>
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionModifierListView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionModifierListView.Designer.cs	(revision 6693)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionModifierListView.Designer.cs	(revision 6693)
@@ -0,0 +1,84 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+
+namespace HeuristicLab.Optimization.Views {
+  partial class RunCollectionModifiersListView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing) {
+        if (components != null) components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      components = new System.ComponentModel.Container();
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.evaluateButton = new System.Windows.Forms.Button();
+      this.SuspendLayout();
+      //
+      // splitContainer.Panel1
+      //
+      this.splitContainer.Panel1.Controls.Add(this.evaluateButton);
+      //
+      // showDetailsCheckBox 
+      //
+      this.showDetailsCheckBox.Location = new System.Drawing.Point(153, 3);
+      this.showDetailsCheckBox.TabIndex = 5;
+      //
+      // evaluateButton
+      //
+      this.evaluateButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Play;
+      this.evaluateButton.Location = new System.Drawing.Point(123, 3);
+      this.evaluateButton.Name = "evaluateButton";
+      this.evaluateButton.Size = new System.Drawing.Size(24, 24);
+      this.evaluateButton.TabIndex = 4;
+      this.toolTip.SetToolTip(this.evaluateButton, "Evaluate");
+      this.evaluateButton.UseVisualStyleBackColor = true;
+      this.evaluateButton.Click += new System.EventHandler(this.evaluateButton_Click);
+      //
+      // itemListView
+      //
+      this.itemsListView.TabIndex = 6;
+      this.ResumeLayout(false);
+    }
+
+    protected System.Windows.Forms.Button evaluateButton;
+
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionModifierListView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionModifierListView.cs	(revision 6693)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionModifierListView.cs	(revision 6693)
@@ -0,0 +1,75 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.ComponentModel;
+using System.Drawing;
+using System.Windows.Forms;
+using HeuristicLab.Core;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Optimization.Views {
+
+  [View("Modifier View")]
+  [Content(typeof(ICheckedItemList<IRunCollectionModifier>), false)]
+  public partial class RunCollectionModifiersListView : CheckedItemListView<IRunCollectionModifier> {
+
+    public Action Evaluator { get; set; }
+
+    public RunCollectionModifiersListView() {
+      InitializeComponent();
+      itemsGroupBox.Text = "RunCollection Modifiers";
+    }
+
+    protected override IRunCollectionModifier CreateItem() {
+      if (typeSelectorDialog == null) {
+        typeSelectorDialog = new TypeSelectorDialog();
+        typeSelectorDialog.Caption = "Select RunCollection Modifiers";
+        typeSelectorDialog.TypeSelector.Caption = "Available Modifiers";
+        typeSelectorDialog.TypeSelector.Configure(typeof(IRunCollectionModifier), false, true);
+      }
+
+      if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
+        try {
+          return (IRunCollectionModifier)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
+        } catch (Exception ex) {
+          ErrorHandling.ShowErrorDialog(this, ex);
+        }
+      }
+      return null;
+    }
+
+    private void evaluateButton_Click(object sender, EventArgs e) {
+      var evaluator = Evaluator;
+      evaluateButton.Enabled = false;
+      var worker = new BackgroundWorker();
+      worker.DoWork += (s, a) => evaluator();
+      worker.RunWorkerCompleted += (s, a) => {
+        evaluateButton.Enabled = Content != null;
+        if (a.Error != null)
+          new ErrorDialog("Evaluation Failed", a.Error).ShowDialog(ParentForm);
+      };
+      worker.RunWorkerAsync();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.Designer.cs	(revision 6692)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.Designer.cs	(revision 6693)
@@ -65,4 +65,6 @@
       this.constraintPage = new System.Windows.Forms.TabPage();
       this.runCollectionConstraintCollectionView = new HeuristicLab.Optimization.Views.RunCollectionConstraintCollectionView();
+      this.modifiersPage = new System.Windows.Forms.TabPage();
+      this.runCollectionModifiersListView = new HeuristicLab.Optimization.Views.RunCollectionModifiersListView();
       this.splitContainer.Panel1.SuspendLayout();
       this.splitContainer.Panel2.SuspendLayout();
@@ -74,4 +76,5 @@
       this.runPage.SuspendLayout();
       this.constraintPage.SuspendLayout();
+      this.modifiersPage.SuspendLayout();
       this.SuspendLayout();
       // 
@@ -235,4 +238,5 @@
       this.tabControl.Controls.Add(this.runPage);
       this.tabControl.Controls.Add(this.constraintPage);
+      this.tabControl.Controls.Add(this.modifiersPage);
       this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
       this.tabControl.Location = new System.Drawing.Point(0, 0);
@@ -274,4 +278,28 @@
       this.runCollectionConstraintCollectionView.Size = new System.Drawing.Size(518, 351);
       this.runCollectionConstraintCollectionView.TabIndex = 0;
+      // 
+      // modifiersPage
+      // 
+      this.modifiersPage.Controls.Add(this.runCollectionModifiersListView);
+      this.modifiersPage.Location = new System.Drawing.Point(4, 22);
+      this.modifiersPage.Name = "modifiersPage";
+      this.modifiersPage.Padding = new System.Windows.Forms.Padding(3);
+      this.modifiersPage.Size = new System.Drawing.Size(524, 357);
+      this.modifiersPage.TabIndex = 2;
+      this.modifiersPage.Text = "Modification";
+      this.modifiersPage.UseVisualStyleBackColor = true;
+      // 
+      // runCollectionModifiersListView
+      // 
+      this.runCollectionModifiersListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.runCollectionModifiersListView.Caption = "Modifier View";
+      this.runCollectionModifiersListView.Content = null;
+      this.runCollectionModifiersListView.Location = new System.Drawing.Point(3, 6);
+      this.runCollectionModifiersListView.Name = "runCollectionModifiersListView";
+      this.runCollectionModifiersListView.ReadOnly = false;
+      this.runCollectionModifiersListView.Size = new System.Drawing.Size(515, 345);
+      this.runCollectionModifiersListView.TabIndex = 0;
       // 
       // RunCollectionView
@@ -291,4 +319,5 @@
       this.runPage.ResumeLayout(false);
       this.constraintPage.ResumeLayout(false);
+      this.modifiersPage.ResumeLayout(false);
       this.ResumeLayout(false);
 
@@ -314,4 +343,6 @@
     private Button clearButton;
     private CheckBox showDetailsCheckBox;
+    private TabPage modifiersPage;
+    private RunCollectionModifiersListView runCollectionModifiersListView;
   }
 }
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs	(revision 6692)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs	(revision 6693)
@@ -58,4 +58,5 @@
       itemsGroupBox.Text = "Runs";
       itemListViewItemMapping = new Dictionary<IRun, List<ListViewItem>>();
+      runCollectionModifiersListView.Evaluator = EvaluateModifications;
     }
 
@@ -98,8 +99,4 @@
         }
       }
-      var modifierMenuItem = new ToolStripMenuItem();
-      modifierMenuItem.Text = "Modify RunCollection";
-      modifierMenuItem.Click += ModifierMenuItem_OnClick;
-      analyzeRunsToolStripDropDownButton.DropDownItems.Add(modifierMenuItem);
     }
 
@@ -122,4 +119,7 @@
           runCollectionConstraintCollectionView.Content = RunCollection.Constraints;
           runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
+          if (!tabControl.TabPages.Contains(modifiersPage))
+            tabControl.TabPages.Add(modifiersPage);
+          runCollectionModifiersListView.Content = RunCollection.Modifiers;
         }
         foreach (IRun item in Content) {
@@ -134,4 +134,6 @@
         if (tabControl.TabPages.Contains(constraintPage))
           tabControl.TabPages.Remove(constraintPage);
+        if (tabControl.TabPages.Contains(modifiersPage))
+          tabControl.TabPages.Remove(modifiersPage);
       }
     }
@@ -340,9 +342,4 @@
       }
     }
-    private void ModifierMenuItem_OnClick(object sender, EventArgs args) {
-      var modifier = new RunCollectionModificationEvaluator();
-      modifier.RunCollection.AddRange(Content.Select(r => (IRun)r.Clone()));
-      MainFormManager.MainForm.ShowContent(modifier);
-    }
     private void removeButton_Click(object sender, EventArgs e) {
       if (itemsListView.SelectedItems.Count > 0) {
@@ -357,5 +354,5 @@
     #endregion
 
-    #region CheckBox Events
+    #region Control Events
     private void showDetailsCheckBox_CheckedChanged(object sender, EventArgs e) {
       if (showDetailsCheckBox.Checked) {
@@ -368,4 +365,14 @@
       }
     }
+    private void EvaluateModifications() {
+      if (RunCollection == null)
+        return;
+      ReadOnly = true;
+      try {
+        RunCollection.Modify();
+      } finally {
+        ReadOnly = false;
+      }
+    }
     #endregion
 
Index: trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs	(revision 6692)
+++ trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs	(revision 6693)
@@ -51,4 +51,5 @@
 
       constraints = new RunCollectionConstraintCollection(original.constraints.Select(x => cloner.Clone(x)));
+      modifiers = new CheckedItemList<IRunCollectionModifier>(original.modifiers.Select(cloner.Clone));
       foreach (IRunCollectionConstraint constraint in constraints)
         constraint.ConstrainedValue = this;
@@ -67,4 +68,5 @@
       dataTypes = new Dictionary<string, HashSet<Type>>();
       constraints = new RunCollectionConstraintCollection();
+      modifiers = new CheckedItemList<IRunCollectionModifier>();
       RegisterConstraintsEvents();
     }
@@ -83,4 +85,11 @@
       get { return constraints; }
     }
+
+    [Storable]
+    private CheckedItemList<IRunCollectionModifier> modifiers;
+    public CheckedItemList<IRunCollectionModifier> Modifiers {
+      get { return modifiers; }
+    }
+
 
     private bool updateOfRunsInProgress;
@@ -98,4 +107,5 @@
     private void AfterDeserialization() {
       if (constraints == null) constraints = new RunCollectionConstraintCollection();
+      if (modifiers == null) modifiers = new CheckedItemList<IRunCollectionModifier>();
       RegisterConstraintsEvents();
       RegisterConstraintEvents(constraints);
@@ -393,4 +403,43 @@
     }
     #endregion
+
+    #region Modification
+    public void Modify() {
+      UpdateOfRunsInProgress = true;
+      var runs = this.ToList();
+      var selectedRuns = runs.Where(r => r.Visible).ToList();
+      int nSelected = selectedRuns.Count;
+      if (nSelected > 0) {
+        foreach (var modifier in Modifiers.CheckedItems)
+          modifier.Value.Modify(selectedRuns);
+        if (nSelected != selectedRuns.Count || HaveDifferentOrder(selectedRuns, runs.Where(r => r.Visible))) {
+          Clear();
+          AddRange(ReplaceVisibleRuns(runs, selectedRuns));
+        } else if (runs.Count > 0) {
+          OnCollectionReset(this, runs);
+        }
+      }
+      UpdateOfRunsInProgress = false;
+    }
+
+    private static IEnumerable<IRun> ReplaceVisibleRuns(IEnumerable<IRun> runs, IEnumerable<IRun> visibleRuns) {
+      var newRuns = new List<IRun>();
+      var runIt = runs.GetEnumerator();
+      var visibleRunIt = visibleRuns.GetEnumerator();
+      while (runIt.MoveNext()) {
+        if (runIt.Current != null && !runIt.Current.Visible)
+          newRuns.Add(runIt.Current);
+        else if (visibleRunIt.MoveNext())
+          newRuns.Add(visibleRunIt.Current);
+      }
+      while (visibleRunIt.MoveNext())
+        newRuns.Add(visibleRunIt.Current);
+      return newRuns;
+    }
+
+    private static bool HaveDifferentOrder(IEnumerable<IRun> l1, IEnumerable<IRun> l2) {
+      return l1.Zip(l2, (r1, r2) => r1 != r2).Any();
+    }
+    #endregion
   }
 }
Index: trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionModificationEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionModificationEvaluator.cs	(revision 6692)
+++ trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionModificationEvaluator.cs	(revision 6693)
@@ -48,7 +48,18 @@
     #endregion
 
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (RunCollection != null && RunCollection.Modifiers != null) {
+        RunCollection.Modifiers.AddRange(Modifiers);
+        foreach (var modifier in RunCollection.Modifiers) {
+          RunCollection.Modifiers.SetItemCheckedState(modifier, Modifiers.ItemChecked(modifier));
+        }
+        Modifiers.Clear();
+      }
+    }
+
     public void Evaluate() {
       RunCollection.UpdateOfRunsInProgress = true;
-      var runs = RunCollection.Select((r, i) => new {Run = r, r.Visible, Index = i}).ToList();
+      var runs = RunCollection.Select((r, i) => new { Run = r, r.Visible, Index = i }).ToList();
       var visibleRuns = runs.Where(r => r.Visible).Select(r => r.Run).ToList();
       int n = visibleRuns.Count;
@@ -73,5 +84,5 @@
         RunCollection.AddRange(newRuns);
       } else if (runs.Count > 0) { // force update
-        var run = (IRun) runs[0].Run.Clone();
+        var run = (IRun)runs[0].Run.Clone();
         RunCollection.Add(run);
         RunCollection.Remove(run);
