Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/CheckedFilterCollectionView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/CheckedFilterCollectionView.Designer.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/CheckedFilterCollectionView.Designer.cs	(revision 13502)
@@ -1,8 +1,25 @@
-﻿using HeuristicLab.Core.Views;
-using HeuristicLab.DataPreprocessing.Filter;
-namespace HeuristicLab.DataPreprocessing.Views
-{
-  partial class CheckedFilterCollectionView
-  {
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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
+
+namespace HeuristicLab.DataPreprocessing.Views {
+  partial class CheckedFilterCollectionView {
     /// <summary> 
     /// Required designer variable.
@@ -14,8 +31,6 @@
     /// </summary>
     /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing)
-    {
-      if (disposing && (components != null))
-      {
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
         components.Dispose();
       }
@@ -29,6 +44,5 @@
     /// the contents of this method with the code editor.
     /// </summary>
-    private void InitializeComponent()
-    {
+    private void InitializeComponent() {
       components = new System.ComponentModel.Container();
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/CheckedFilterCollectionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/CheckedFilterCollectionView.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/CheckedFilterCollectionView.cs	(revision 13502)
@@ -1,29 +1,40 @@
-﻿using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Linq;
-using System.Text;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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.Windows.Forms;
+using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
-using HeuristicLab.Collections;
+using HeuristicLab.DataPreprocessing.Filter;
 using HeuristicLab.MainForm;
-using HeuristicLab.Core;
-using HeuristicLab.DataPreprocessing.Filter;
 
-namespace HeuristicLab.DataPreprocessing.Views
-{
+namespace HeuristicLab.DataPreprocessing.Views {
   [View("CheckedFilterCollection View")]
   [Content(typeof(ICheckedItemCollection<>), false)]
   [Content(typeof(CheckedItemCollection<>), false)]
-  public partial class CheckedFilterCollectionView : CheckedItemCollectionView<IFilter>
-  {
-    public CheckedFilterCollectionView()
-    {
+  public partial class CheckedFilterCollectionView : CheckedItemCollectionView<IFilter> {
+    public CheckedFilterCollectionView() {
       InitializeComponent();
     }
 
-    protected override void addButton_Click(object sender, EventArgs e)
-    {
+    protected override void addButton_Click(object sender, EventArgs e) {
       IFilter filter = new ComparisonFilter();
       Content.Add(filter);
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.Designer.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.Designer.cs	(revision 13502)
@@ -1,5 +1,25 @@
-﻿namespace HeuristicLab.DataPreprocessing.Views {
-  partial class DataCompletenessView
-  {
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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
+
+namespace HeuristicLab.DataPreprocessing.Views {
+  partial class DataCompletenessView {
     /// <summary> 
     /// Required designer variable.
@@ -34,6 +54,6 @@
       // chart
       // 
-      this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.chart.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)));
       chartArea1.Name = "ChartArea1";
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.cs	(revision 13502)
@@ -1,11 +1,30 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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.Collections.Generic;
+using System.Drawing;
 using System.Windows.Forms;
-using HeuristicLab.Analysis;
+using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
-using HeuristicLab.Core.Views;
-using System.Collections.Generic;
-using HeuristicLab.DataPreprocessing.Implementations;
-using System.Drawing;
-using System.Windows.Forms.DataVisualization.Charting;
 
 namespace HeuristicLab.DataPreprocessing.Views {
@@ -13,6 +32,5 @@
   [View("Histogram View")]
   [Content(typeof(DataCompletenessChartContent), true)]
-  public partial class DataCompletenessView : ItemView
-  {
+  public partial class DataCompletenessView : ItemView {
 
     //list of columns, bool indicates wether the cell is a missing value or not
@@ -22,6 +40,5 @@
     private static Color colorMissingVal = Color.Orange;
 
-    public new DataCompletenessChartContent Content
-    {
+    public new DataCompletenessChartContent Content {
       get { return (DataCompletenessChartContent)base.Content; }
       set { base.Content = value; }
@@ -29,23 +46,18 @@
 
 
-    public DataCompletenessView()
-    {
+    public DataCompletenessView() {
       InitializeComponent();
     }
 
-    protected override void OnContentChanged()
-    {
+    protected override void OnContentChanged() {
       base.OnContentChanged();
-      if (Content != null)
-      {
+      if (Content != null) {
         InitData();
       }
     }
 
-    private void InitData()
-    {
+    private void InitData() {
       IDictionary<int, IList<int>> missingValueIndices = Content.SearchLogic.GetMissingValueIndices();
-      for (int i = 0; i < Content.SearchLogic.Columns; i++)
-      {
+      for (int i = 0; i < Content.SearchLogic.Columns; i++) {
         //append column
         List<bool> column = new List<bool>();
@@ -60,6 +72,5 @@
     }
 
-    private void PrepareChart()
-    {
+    private void PrepareChart() {
       chart.Titles.Add("DataCompletenessChart");
       chart.EnableDoubleClickResetsZoom = true;
@@ -74,6 +85,5 @@
       //custom x axis label
       double from = 0.5;
-      foreach (String columnName in Content.SearchLogic.VariableNames)
-      {
+      foreach (String columnName in Content.SearchLogic.VariableNames) {
         double to = from + 1;
         chart.ChartAreas[0].AxisX.CustomLabels.Add(from, to, columnName);
@@ -84,10 +94,8 @@
     }
 
-    private void CreateSeries(List<List<int>> yValuesPerColumn)
-    {
+    private void CreateSeries(List<List<int>> yValuesPerColumn) {
       //prepare series
       int seriesCount = DetermineSeriesCount(yValuesPerColumn);
-      for (int i = 0; i < seriesCount; i++)
-      {
+      for (int i = 0; i < seriesCount; i++) {
         chart.Series.Add(CreateSeriesName(i));
         Series series = chart.Series[CreateSeriesName(i)];
@@ -95,12 +103,9 @@
         series.IsVisibleInLegend = false;
         series["PointWidth"] = "1.0";
-        if (i % 2 == 0)
-        {
+        if (i % 2 == 0) {
           if (i == 0) //show legend for non missing values only once
             series.IsVisibleInLegend = true;
           series.Color = colorNonMissingVal;
-        }
-        else
-        {
+        } else {
           if (i == 1) //show legend for missing values only once
             series.IsVisibleInLegend = true;
@@ -109,6 +114,5 @@
       }
       //fill series
-      for (int i = 0; i < yValuesPerColumn.Count; i++)
-      {
+      for (int i = 0; i < yValuesPerColumn.Count; i++) {
         List<int> column = yValuesPerColumn[i];
         for (int j = 0; j < seriesCount; j++) {
@@ -122,6 +126,5 @@
     }
 
-    private String CreateSeriesName(int index)
-    {
+    private String CreateSeriesName(int index) {
       if (index == 0)
         return "non-missing value";
@@ -132,6 +135,5 @@
 
     #region data_preparation_for_chartseries
-    private int DetermineSeriesCount(List<List<int>> yValuesPerColumn)
-    {
+    private int DetermineSeriesCount(List<List<int>> yValuesPerColumn) {
       int highest = 0;
       foreach (List<int> values in yValuesPerColumn) {
@@ -141,8 +143,7 @@
     }
 
-    private List<List<int>> ProcessMatrixForCharting(List<List<bool>> matrix, IDictionary<int, IList<int>> missingValueIndices)
-    {
+    private List<List<int>> ProcessMatrixForCharting(List<List<bool>> matrix, IDictionary<int, IList<int>> missingValueIndices) {
       List<List<int>> columnsYValues = new List<List<int>>();
-      for (int i=0; i < matrix.Count; i++) //column
+      for (int i = 0; i < matrix.Count; i++) //column
       {
         List<int> yValues = new List<int>();
@@ -150,11 +151,8 @@
         bool missingState = false;
         int valueCount = 0;
-        for (int j = 0; j < column.Count; j++ ) {
-          if (missingState == missingValueIndices[i].Contains(j))
-          {
+        for (int j = 0; j < column.Count; j++) {
+          if (missingState == missingValueIndices[i].Contains(j)) {
             valueCount++;
-          }
-          else
-          {
+          } else {
             yValues.Add(valueCount);
             valueCount = 1;
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingMenuItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingMenuItem.cs	(revision 13502)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingMenuItem.cs	(revision 13502)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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.Collections.Generic;
+using HeuristicLab.MainForm;
+using HeuristicLab.Optimizer;
+
+namespace HeuristicLab.DataPreprocessing.Views {
+  public class DataPreprocessingMenuItem {
+    internal class CreateExperimentMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
+      public override string Name {
+        get { return "Data &Preprocessing"; }
+      }
+      public override IEnumerable<string> Structure {
+        get { return new string[] { "&Edit" }; }
+      }
+      public override int Position {
+        get { return 6000; }
+      }
+      public override string ToolTipText {
+        get { return "Create a new data preprocessing"; }
+      }
+
+      public override void Execute() {
+        MainFormManager.MainForm.ShowContent(new PreprocessingContext());
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs	(revision 13502)
@@ -30,5 +30,4 @@
   [View("DataPreprocessing View")]
   [Content(typeof(PreprocessingContext), true)]
-  [Content(typeof(IPreprocessingContext), false)]
   public partial class DataPreprocessingView : ItemView {
 
@@ -37,6 +36,6 @@
     }
 
-    public new IPreprocessingContext Content {
-      get { return (IPreprocessingContext)base.Content; }
+    public new PreprocessingContext Content {
+      get { return (PreprocessingContext)base.Content; }
       set { base.Content = value; }
     }
@@ -60,5 +59,5 @@
           new CorrelationMatrixContent(Content),
           new DataCompletenessChartContent(searchLogic),
-          
+
           new FilterContent(filterLogic),
           new ManipulationContent(manipulationLogic, searchLogic, filterLogic),
@@ -94,10 +93,11 @@
       viewShortcutListView.Enabled = Content != null;
       applyInNewTabButton.Enabled = Content != null;
-      exportProblemButton.Enabled = Content != null && Content.Problem != null;
+      exportProblemButton.Enabled = Content != null && Content.CanExport;
       undoButton.Enabled = Content != null;
     }
 
     private void exportProblemButton_Click(object sender, EventArgs e) {
-      var problem = Content.ExportProblem();
+      // ToDo: select one export probability
+      var problem = Content.Export();
 
       var saveFileDialog = new SaveFileDialog {
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessorStarter.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessorStarter.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessorStarter.cs	(revision 13502)
@@ -21,4 +21,5 @@
 
 using System.Windows.Forms;
+using HeuristicLab.Core;
 using HeuristicLab.MainForm;
 using HeuristicLab.Optimization;
@@ -33,5 +34,5 @@
       IDataAnalysisProblem problem;
       GetMostOuterContent(currentView as Control, out algorithm, out problem);
-      var context = new PreprocessingContext(problemData, algorithm, problem);
+      var context = new PreprocessingContext(algorithm ?? problem ?? problemData as IItem);
       MainFormManager.MainForm.ShowContent(context);
     }
@@ -42,5 +43,5 @@
 
       while (control != null) {
-        IContentView contentView = control as IContentView;
+        var contentView = control as IContentView;
         if (contentView != null) {
           var newAlgorithm = contentView.Content as IAlgorithm;
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/FilterView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/FilterView.Designer.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/FilterView.Designer.cs	(revision 13502)
@@ -1,6 +1,25 @@
-﻿namespace HeuristicLab.DataPreprocessing.Views
-{
-  partial class FilterView
-  {
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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
+
+namespace HeuristicLab.DataPreprocessing.Views {
+  partial class FilterView {
     /// <summary> 
     /// Required designer variable.
@@ -12,8 +31,6 @@
     /// </summary>
     /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing)
-    {
-      if (disposing && (components != null))
-      {
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
         components.Dispose();
       }
@@ -27,6 +44,5 @@
     /// the contents of this method with the code editor.
     /// </summary>
-    private void InitializeComponent()
-    {
+    private void InitializeComponent() {
       this.groupBoxFilter = new System.Windows.Forms.GroupBox();
       this.checkedFilterView = new HeuristicLab.DataPreprocessing.Views.CheckedFilterCollectionView();
@@ -53,5 +69,5 @@
       // groupBoxFilter
       // 
-      this.groupBoxFilter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.groupBoxFilter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.groupBoxFilter.Controls.Add(this.checkedFilterView);
@@ -77,5 +93,5 @@
       // groupBoxFilterInfo
       // 
-      this.groupBoxFilterInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.groupBoxFilterInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.groupBoxFilterInfo.Controls.Add(this.lblPercentage);
@@ -103,5 +119,5 @@
       // tbPercentage
       // 
-      this.tbPercentage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.tbPercentage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.tbPercentage.Enabled = false;
@@ -113,5 +129,5 @@
       // tbFiltered
       // 
-      this.tbRemaining.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.tbRemaining.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.tbRemaining.Enabled = false;
@@ -132,5 +148,5 @@
       // tbTotal
       // 
-      this.tbTotal.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.tbTotal.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.tbTotal.Enabled = false;
@@ -193,5 +209,5 @@
       // groupBox1
       // 
-      this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.groupBox1.Controls.Add(this.label4);
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/FilterView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/FilterView.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/FilterView.cs	(revision 13502)
@@ -1,10 +1,28 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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.Collections.Generic;
 using System.Linq;
-using System.Windows.Forms;
 using HeuristicLab.Collections;
-using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
-using HeuristicLab.Data;
 using HeuristicLab.DataPreprocessing.Filter;
 using HeuristicLab.MainForm;
@@ -22,10 +40,9 @@
     }
 
-    private void InitData()
-    {
-        checkedFilterView.Content = Content.Filters;
-        checkedFilterView.Content.ItemsAdded += Content_ItemsAdded;
-        checkedFilterView.Content.ItemsRemoved += Content_ItemsRemoved;
-        checkedFilterView.Content.CheckedItemsChanged += Content_CheckedItemsChanged;
+    private void InitData() {
+      checkedFilterView.Content = Content.Filters;
+      checkedFilterView.Content.ItemsAdded += Content_ItemsAdded;
+      checkedFilterView.Content.ItemsRemoved += Content_ItemsRemoved;
+      checkedFilterView.Content.CheckedItemsChanged += Content_CheckedItemsChanged;
     }
 
@@ -35,9 +52,7 @@
     }
 
-    protected override void OnContentChanged()
-    {
+    protected override void OnContentChanged() {
       base.OnContentChanged();
-      if (Content != null)
-      {
+      if (Content != null) {
         InitData();
         UpdateFilterInfo();
@@ -46,8 +61,6 @@
 
     private void Content_CheckedItemsChanged(object sender, Collections.CollectionItemsChangedEventArgs<IFilter> e) {
-      if (Content != null)
-      {
-        foreach (IFilter filter in e.Items)
-        {
+      if (Content != null) {
+        foreach (IFilter filter in e.Items) {
           filter.Active = checkedFilterView.Content.ItemChecked(filter);
         }
@@ -57,23 +70,22 @@
 
     private void UpdateFilterInfo() {
-        List<IFilter> filters = Content.Filters.ToList();
-        int activeFilters = filters.Count(c => c.Active);
-        applyFilterButton.Enabled = (activeFilters > 0);
-        rBtnAnd.Enabled = (activeFilters > 0);
-        rBtnOr.Enabled = (activeFilters > 0);
-        Content.FilterLogic.Reset();
-        bool[] result = Content.FilterLogic.Preview(filters, rBtnAnd.Checked);
+      List<IFilter> filters = Content.Filters.ToList();
+      int activeFilters = filters.Count(c => c.Active);
+      applyFilterButton.Enabled = (activeFilters > 0);
+      rBtnAnd.Enabled = (activeFilters > 0);
+      rBtnOr.Enabled = (activeFilters > 0);
+      Content.FilterLogic.Reset();
+      bool[] result = Content.FilterLogic.Preview(filters, rBtnAnd.Checked);
 
-        int filteredCnt = result.Count(c => !c);
+      int filteredCnt = result.Count(c => !c);
 
-        tbRemaining.Text = filteredCnt.ToString();
-        double percentage = result.Length == 0 ? 0.0 : filteredCnt * 100 / (double)result.Length;
-        tbPercentage.Text = String.Format("{0:0.0000}%", percentage);
-        tbTotal.Text = result.Length.ToString();
+      tbRemaining.Text = filteredCnt.ToString();
+      double percentage = result.Length == 0 ? 0.0 : filteredCnt * 100 / (double)result.Length;
+      tbPercentage.Text = String.Format("{0:0.0000}%", percentage);
+      tbTotal.Text = result.Length.ToString();
     }
 
     private void applyFilterButton_Click(object sender, EventArgs e) {
-      if (Content != null)
-      {
+      if (Content != null) {
         List<IFilter> filters = Content.Filters.ToList();
         //apply filters
@@ -81,6 +93,5 @@
         //deactivate checked filters
         filters = checkedFilterView.Content.CheckedItems.ToList();
-        foreach (IFilter filter in filters)
-        {
+        foreach (IFilter filter in filters) {
           checkedFilterView.Content.SetItemCheckedState(filter, false);
           filter.Active = false;
@@ -92,8 +103,6 @@
     //whenever a new filter is added the preprocessing data is set to the filter
     private void Content_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IFilter> e) {
-      if (Content != null)
-      {
-        foreach (IFilter filter in e.Items)
-        {
+      if (Content != null) {
+        foreach (IFilter filter in e.Items) {
           filter.ConstrainedValue = Content.FilterLogic.PreprocessingData;
         }
@@ -102,14 +111,11 @@
 
     private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IFilter> e) {
-      if (Content != null)
-      {
+      if (Content != null) {
         UpdateFilterInfo();
       }
     }
 
-    private void rBtnAnd_CheckedChanged(object sender, EventArgs e)
-    {
-      if (Content != null)
-      {
+    private void rBtnAnd_CheckedChanged(object sender, EventArgs e) {
+      if (Content != null) {
         UpdateFilterInfo();
         Content.IsAndCombination = rBtnAnd.Checked;
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj	(revision 13502)
@@ -97,4 +97,5 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="DataPreprocessingMenuItem.cs" />
     <Compile Include="PreprocessingFeatureCorrelationView.cs">
       <SubType>UserControl</SubType>
@@ -304,4 +305,8 @@
       <Name>HeuristicLab.Optimization-3.3</Name>
       <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimizer\3.3\HeuristicLab.Optimizer-3.3.csproj">
+      <Project>{C664305E-497C-4533-A140-967DEDB05C19}</Project>
+      <Name>HeuristicLab.Optimizer-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.Designer.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.Designer.cs	(revision 13502)
@@ -1,3 +1,24 @@
-﻿namespace HeuristicLab.DataPreprocessing.Views {
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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
+
+namespace HeuristicLab.DataPreprocessing.Views {
   partial class HistogramView {
     /// <summary> 
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.cs	(revision 13502)
@@ -19,6 +19,6 @@
  */
 #endregion
+
 using System;
-using System.Windows.Forms;
 using HeuristicLab.Analysis;
 using HeuristicLab.MainForm;
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/LineChartView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/LineChartView.Designer.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/LineChartView.Designer.cs	(revision 13502)
@@ -1,3 +1,24 @@
-﻿namespace HeuristicLab.DataPreprocessing.Views {
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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
+
+namespace HeuristicLab.DataPreprocessing.Views {
   partial class LineChartView {
     /// <summary> 
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/LineChartView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/LineChartView.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/LineChartView.cs	(revision 13502)
@@ -21,5 +21,4 @@
 
 using System;
-using System.Windows.Forms;
 using HeuristicLab.Analysis;
 using HeuristicLab.MainForm;
@@ -46,13 +45,11 @@
     private void allInOneCheckBox_CheckedChanged(object sender, EventArgs e) {
       Content.AllInOneMode = allInOneCheckBox.Checked;
- 
+
       GenerateChart();
     }
 
-    protected override void OnContentChanged()
-    {
+    protected override void OnContentChanged() {
       base.OnContentChanged();
-      if (Content != null)
-      {
+      if (Content != null) {
         allInOneCheckBox.Checked = Content.AllInOneMode;
       }
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.Designer.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.Designer.cs	(revision 13502)
@@ -1,3 +1,24 @@
-﻿namespace HeuristicLab.DataPreprocessing.Views {
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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
+
+namespace HeuristicLab.DataPreprocessing.Views {
   partial class ManipulationView {
     /// <summary> 
@@ -91,5 +112,5 @@
       // lstMethods
       // 
-      this.lstMethods.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.lstMethods.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.lstMethods.FormattingEnabled = true;
@@ -124,5 +145,5 @@
       // grpBoxData
       // 
-      this.grpBoxData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.grpBoxData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.grpBoxData.Controls.Add(this.tabsData);
@@ -138,5 +159,5 @@
       // tabsData
       // 
-      this.tabsData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.tabsData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.tabsData.Controls.Add(this.tabPage1);
@@ -416,6 +437,6 @@
       // grpBoxPreview
       // 
-      this.grpBoxPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.grpBoxPreview.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.grpBoxPreview.Controls.Add(this.tabsPreview);
@@ -431,5 +452,5 @@
       // tabsPreview
       // 
-      this.tabsPreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+      this.tabsPreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
       this.tabsPreview.Controls.Add(this.tabPreviewInactive);
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.Designer.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.Designer.cs	(revision 13502)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Data;
 namespace HeuristicLab.DataPreprocessing.Views {
   partial class PreprocessingChartView {
@@ -65,6 +64,6 @@
       // tableLayoutPanel
       // 
-      this.tableLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.tableLayoutPanel.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.tableLayoutPanel.AutoScroll = true;
@@ -82,5 +81,5 @@
       // checkedItemList
       // 
-      this.checkedItemList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+      this.checkedItemList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
             | System.Windows.Forms.AnchorStyles.Left)));
       this.checkedItemList.Caption = "View";
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.cs	(revision 13502)
@@ -28,9 +28,7 @@
 using HeuristicLab.Core.Views;
 using HeuristicLab.Data;
-using HeuristicLab.DataPreprocessing.Implementations;
 using HeuristicLab.MainForm;
 
 namespace HeuristicLab.DataPreprocessing.Views {
-
   [View("Preprocessing Chart View")]
   [Content(typeof(PreprocessingChartContent), false)]
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingCheckedItemListView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingCheckedItemListView.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingCheckedItemListView.cs	(revision 13502)
@@ -22,5 +22,4 @@
 #endregion
 
-using System.Windows.Forms;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingDataTableView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingDataTableView.Designer.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingDataTableView.Designer.cs	(revision 13502)
@@ -20,6 +20,5 @@
 #endregion
 
-namespace HeuristicLab.DataPreprocessing.Views
-{
+namespace HeuristicLab.DataPreprocessing.Views {
   partial class PreprocessingDataTableView {
     /// <summary> 
@@ -57,6 +56,6 @@
       // chart
       // 
-      this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.chart.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.chart.BorderlineColor = System.Drawing.Color.Black;
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingDataTableView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingDataTableView.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingDataTableView.cs	(revision 13502)
@@ -26,10 +26,9 @@
 using System.Windows.Forms;
 using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.Analysis;
+using HeuristicLab.Analysis.Views;
 using HeuristicLab.Collections;
 using HeuristicLab.Core.Views;
-using HeuristicLab.DataPreprocessing.Implementations;
 using HeuristicLab.MainForm;
-using HeuristicLab.Analysis;
-using HeuristicLab.Analysis.Views;
 
 namespace HeuristicLab.DataPreprocessing.Views {
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingFeatureCorrelationView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingFeatureCorrelationView.Designer.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingFeatureCorrelationView.Designer.cs	(revision 13502)
@@ -47,5 +47,5 @@
     /// </summary>
     private void InitializeComponent() {
-      this.components = new System.ComponentModel.Container();     
+      this.components = new System.ComponentModel.Container();
       this.ResumeLayout(false);
     }
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingFeatureCorrelationView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingFeatureCorrelationView.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingFeatureCorrelationView.cs	(revision 13502)
@@ -20,15 +20,8 @@
 #endregion
 
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
 using System.Windows.Forms;
-using HeuristicLab.Data;
+using HeuristicLab.DataPreprocessing;
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.PluginInfrastructure;
-using System;
-using HeuristicLab.DataPreprocessing;
-using HeuristicLab.Problems.DataAnalysis.Views;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
@@ -37,7 +30,6 @@
   public partial class PreprocessingFeatureCorrelationView : AsynchronousContentView {
 
-    public new CorrelationMatrixContent Content
-    {
-      get { return (CorrelationMatrixContent) base.Content; }
+    public new CorrelationMatrixContent Content {
+      get { return (CorrelationMatrixContent)base.Content; }
       set { base.Content = value; }
     }
@@ -55,9 +47,9 @@
     protected override void RegisterContentEvents() {
       base.RegisterContentEvents();
-      Content.Changed += Data_Changed;      
+      Content.Changed += Data_Changed;
     }
 
     protected override void DeregisterContentEvents() {
-      Content.Changed -= Data_Changed;      
+      Content.Changed -= Data_Changed;
       base.DeregisterContentEvents();
     }
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingScatterPlotView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingScatterPlotView.Designer.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingScatterPlotView.Designer.cs	(revision 13502)
@@ -56,6 +56,6 @@
       // chart
       // 
-      this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.chart.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.chart.BorderlineColor = System.Drawing.Color.Black;
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingScatterPlotView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingScatterPlotView.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingScatterPlotView.cs	(revision 13502)
@@ -462,5 +462,5 @@
       if (chartDoubleClick != null)
         chartDoubleClick(this, e);
-    } 
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/RenameColumnsDialog.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/RenameColumnsDialog.Designer.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/RenameColumnsDialog.Designer.cs	(revision 13502)
@@ -78,6 +78,6 @@
       this.dataGridView.AllowUserToAddRows = false;
       this.dataGridView.AllowUserToDeleteRows = false;
-      this.dataGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.dataGridView.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.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs	(revision 13502)
@@ -1,3 +1,24 @@
-﻿namespace HeuristicLab.DataPreprocessing.Views {
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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
+
+namespace HeuristicLab.DataPreprocessing.Views {
   partial class ScatterPlotMultiView {
     /// <summary> 
@@ -29,6 +50,6 @@
       // tableLayoutPanel
       // 
-      this.tableLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.tableLayoutPanel.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.tableLayoutPanel.AutoScroll = true;
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs	(revision 13502)
@@ -7,9 +7,7 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core.Views;
-using HeuristicLab.DataPreprocessing.Implementations;
 using HeuristicLab.MainForm;
 
 namespace HeuristicLab.DataPreprocessing.Views {
-
   [View("Scatter Plot Multi View")]
   [Content(typeof(ScatterPlotContent), false)]
@@ -81,5 +79,5 @@
           tableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, (tableLayoutPanel.Height - HEADER_HEIGHT) / variables.Count));
         }
-          // fixed size
+        // fixed size
         else {
           tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, FIXED_CHART_WIDTH));
@@ -111,5 +109,5 @@
             tableLayoutPanel.Controls.Add(pcv, y, x);
           }
-            //scatter plot
+          //scatter plot
           else {
             ScatterPlot scatterPlot = Content.CreateScatterPlot(variables[x - 1], variables[y - 1]);
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.Designer.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.Designer.cs	(revision 13502)
@@ -1,3 +1,24 @@
-﻿namespace HeuristicLab.DataPreprocessing.Views {
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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
+
+namespace HeuristicLab.DataPreprocessing.Views {
   partial class ScatterPlotSingleView {
     /// <summary> 
@@ -30,4 +51,6 @@
       this.comboBoxYVariable = new System.Windows.Forms.ComboBox();
       this.comboBoxXVariable = new System.Windows.Forms.ComboBox();
+      this.label3 = new System.Windows.Forms.Label();
+      this.comboBoxColor = new System.Windows.Forms.ComboBox();
       this.groupBox1.SuspendLayout();
       this.SuspendLayout();
@@ -35,6 +58,6 @@
       // scatterPlotView
       // 
-      this.scatterPlotView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.scatterPlotView.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.scatterPlotView.Caption = "ScatterPlot View";
@@ -48,11 +71,13 @@
       // groupBox1
       // 
+      this.groupBox1.Controls.Add(this.label3);
       this.groupBox1.Controls.Add(this.label2);
       this.groupBox1.Controls.Add(this.label1);
+      this.groupBox1.Controls.Add(this.comboBoxColor);
       this.groupBox1.Controls.Add(this.comboBoxYVariable);
       this.groupBox1.Controls.Add(this.comboBoxXVariable);
       this.groupBox1.Location = new System.Drawing.Point(3, 3);
       this.groupBox1.Name = "groupBox1";
-      this.groupBox1.Size = new System.Drawing.Size(160, 140);
+      this.groupBox1.Size = new System.Drawing.Size(160, 215);
       this.groupBox1.TabIndex = 1;
       this.groupBox1.TabStop = false;
@@ -99,4 +124,24 @@
       this.comboBoxXVariable.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedIndexChanged);
       // 
+      // label3
+      // 
+      this.label3.AutoSize = true;
+      this.label3.Location = new System.Drawing.Point(17, 141);
+      this.label3.Name = "label3";
+      this.label3.Size = new System.Drawing.Size(31, 13);
+      this.label3.TabIndex = 3;
+      this.label3.Text = "Color";
+      // 
+      // comboBoxColor
+      // 
+      this.comboBoxColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.comboBoxColor.FormattingEnabled = true;
+      this.comboBoxColor.Location = new System.Drawing.Point(20, 164);
+      this.comboBoxColor.Margin = new System.Windows.Forms.Padding(3, 10, 3, 3);
+      this.comboBoxColor.Name = "comboBoxColor";
+      this.comboBoxColor.Size = new System.Drawing.Size(121, 21);
+      this.comboBoxColor.TabIndex = 1;
+      this.comboBoxColor.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedIndexChanged);
+      // 
       // ScatterPlotSingleView
       // 
@@ -121,4 +166,6 @@
     private System.Windows.Forms.ComboBox comboBoxYVariable;
     private System.Windows.Forms.ComboBox comboBoxXVariable;
+    private System.Windows.Forms.ComboBox comboBoxColor;
+    private System.Windows.Forms.Label label3;
   }
 }
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs	(revision 13502)
@@ -1,6 +1,26 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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.Collections.Generic;
 using System.Linq;
-using System.Windows.Forms;
 using HeuristicLab.Analysis;
 using HeuristicLab.Core.Views;
@@ -18,11 +38,9 @@
     }
 
-    public ScatterPlotSingleView()
-    {
+    public ScatterPlotSingleView() {
       InitializeComponent();
     }
 
     public void InitData() {
-
       IEnumerable<string> variables = Content.PreprocessingData.GetDoubleVariableNames();
 
@@ -30,17 +48,27 @@
       comboBoxXVariable.Items.Clear();
       comboBoxYVariable.Items.Clear();
+      comboBoxColor.Items.Clear();
       comboBoxXVariable.Items.AddRange(variables.ToArray());
       comboBoxYVariable.Items.AddRange(variables.ToArray());
+      comboBoxColor.Items.Add("-");
+      for (int i = 0; i < Content.PreprocessingData.Columns; ++i) {
+        if (Content.PreprocessingData.VariableHasType<double>(i)) {
+          double distinctValueCount = Content.PreprocessingData.GetValues<double>(i).GroupBy(x => x).Count();
+          if (distinctValueCount <= 20)
+            comboBoxColor.Items.Add(Content.PreprocessingData.GetVariableName(i));
+        }
+      }
 
       // use x and y variable from content
-      if (Content.SelectedXVariable != null && Content.SelectedYVariable != null) {
+      if (Content.SelectedXVariable != null && Content.SelectedYVariable != null && Content.SelectedColorVariable != null) {
         comboBoxXVariable.SelectedItem = Content.SelectedXVariable;
         comboBoxYVariable.SelectedItem = Content.SelectedYVariable;
+        comboBoxColor.SelectedItem = Content.SelectedColorVariable;
       } else {
         if (variables.Count() >= 2) {
           comboBoxXVariable.SelectedIndex = 0;
           comboBoxYVariable.SelectedIndex = 1;
+          comboBoxColor.SelectedIndex = 0;
           UpdateScatterPlot();
-
         }
       }
@@ -59,7 +87,10 @@
 
     private void UpdateScatterPlot() {
-      if (comboBoxXVariable.SelectedItem != null && comboBoxYVariable.SelectedItem != null) {
+      if (comboBoxXVariable.SelectedItem != null && comboBoxYVariable.SelectedItem != null && comboBoxColor.SelectedItem != null) {
         //get scatter plot with selected x and y variable
-        ScatterPlot scatterPlot = Content.CreateScatterPlot((string)comboBoxXVariable.SelectedItem, (string)comboBoxYVariable.SelectedItem);
+        ScatterPlot scatterPlot = Content.CreateScatterPlot(
+          (string)comboBoxXVariable.SelectedItem,
+          (string)comboBoxYVariable.SelectedItem,
+          (string)comboBoxColor.SelectedItem);
         scatterPlotView.Content = scatterPlot;
 
@@ -67,9 +98,7 @@
         this.Content.SelectedXVariable = (string)comboBoxXVariable.SelectedItem;
         this.Content.SelectedYVariable = (string)comboBoxYVariable.SelectedItem;
+        this.Content.SelectedColorVariable = (string)comboBoxColor.SelectedItem;
       }
     }
-
   }
-
-
 }
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/SearchAndReplaceDialog.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/SearchAndReplaceDialog.Designer.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/SearchAndReplaceDialog.Designer.cs	(revision 13502)
@@ -1,3 +1,24 @@
-﻿namespace HeuristicLab.DataPreprocessing.Views {
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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
+
+namespace HeuristicLab.DataPreprocessing.Views {
   partial class SearchAndReplaceDialog {
     /// <summary>
@@ -44,6 +65,6 @@
       // tabSearchReplace
       // 
-      this.tabSearchReplace.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
+      this.tabSearchReplace.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.tabSearchReplace.Controls.Add(this.tabSearch);
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/SearchAndReplaceDialog.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/SearchAndReplaceDialog.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/SearchAndReplaceDialog.cs	(revision 13502)
@@ -1,3 +1,24 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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.Windows.Forms;
 
@@ -20,6 +41,4 @@
     NotEqual
   }
-
-
 
   public partial class SearchAndReplaceDialog : Form {
Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ViewShortcutListView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ViewShortcutListView.Designer.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ViewShortcutListView.Designer.cs	(revision 13502)
@@ -19,5 +19,4 @@
  */
 #endregion
-
 
 namespace HeuristicLab.DataPreprocessing.Views {
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj	(revision 13502)
@@ -108,10 +108,9 @@
     <None Include="Plugin.cs.frame" />
     <Compile Include="Implementations\DataGridContent.cs" />
-    <Compile Include="Implementations\PreprocessingContext.cs" />
+    <Compile Include="PreprocessingContext.cs" />
     <Compile Include="Implementations\TransactionalPreprocessingData.cs" />
     <Compile Include="Implementations\SearchLogic.cs" />
     <Compile Include="Implementations\StatisticsLogic.cs" />
     <Compile Include="Interfaces\IDataGridContent.cs" />
-    <Compile Include="Interfaces\IPreprocessingContext.cs" />
     <Compile Include="Interfaces\ISearchLogic.cs" />
     <Compile Include="Interfaces\IStatisticsLogic.cs" />
@@ -160,4 +159,8 @@
       <Private>False</Private>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
       <Project>{94186a6a-5176-4402-ae83-886557b53cca}</Project>
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/CorrelationMatrixContent.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/CorrelationMatrixContent.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/CorrelationMatrixContent.cs	(revision 13502)
@@ -21,4 +21,5 @@
 
 using System.Drawing;
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -32,5 +33,5 @@
     }
 
-    private IPreprocessingContext Context { get; set; }
+    private PreprocessingContext Context { get; set; }
     private ITransactionalPreprocessingData PreprocessingData {
       get { return Context.Data; }
@@ -39,10 +40,12 @@
     public DataAnalysisProblemData ProblemData {
       get {
-        var creator = new ProblemDataCreator(Context);
-        return (DataAnalysisProblemData)creator.CreateProblemData();
+        // ToDo: avoid iterating
+        return Context.ExportPossibilities.Select(p => p.Value()).OfType<DataAnalysisProblemData>().Single();
+        //var creator = new ProblemDataCreator(Context);
+        //return (DataAnalysisProblemData)creator.CreateProblemData();
       }
     }
 
-    public CorrelationMatrixContent(IPreprocessingContext context) {
+    public CorrelationMatrixContent(PreprocessingContext context) {
       Context = context;
     }
@@ -50,5 +53,5 @@
     public CorrelationMatrixContent(CorrelationMatrixContent original, Cloner cloner)
       : base(original, cloner) {
-        Context = original.Context;
+      Context = original.Context;
     }
 
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/Filter/IFilter.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/Filter/IFilter.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/Filter/IFilter.cs	(revision 13502)
@@ -1,12 +1,27 @@
-﻿using HeuristicLab.Core;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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
 
-namespace HeuristicLab.DataPreprocessing.Filter
-{
-  public interface IFilter : IConstraint
-  {
+using HeuristicLab.Core;
+
+namespace HeuristicLab.DataPreprocessing.Filter {
+  public interface IFilter : IConstraint {
     new bool[] Check();
     new bool[] Check(out string errorMessage);
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/FilterLogic.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/FilterLogic.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/FilterLogic.cs	(revision 13502)
@@ -24,5 +24,5 @@
 using System.Linq;
 using HeuristicLab.DataPreprocessing.Filter;
-using HeuristicLab.DataPreprocessing.Interfaces;
+
 namespace HeuristicLab.DataPreprocessing {
   public class FilterLogic : IFilterLogic {
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/FilteredPreprocessingData.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/FilteredPreprocessingData.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/FilteredPreprocessingData.cs	(revision 13502)
@@ -1,11 +1,31 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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.Collections.Generic;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.DataPreprocessing.Interfaces;
 using HeuristicLab.Problems.DataAnalysis;
 
-namespace HeuristicLab.DataPreprocessing.Implementations {
+namespace HeuristicLab.DataPreprocessing {
   public class FilteredPreprocessingData : NamedItem, IFilteredPreprocessingData {
     private readonly ITransactionalPreprocessingData originalData;
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/HistogramContent.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/HistogramContent.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/HistogramContent.cs	(revision 13502)
@@ -25,5 +25,4 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.DataPreprocessing.Interfaces;
 
 namespace HeuristicLab.DataPreprocessing {
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/LineChartContent.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/LineChartContent.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/LineChartContent.cs	(revision 13502)
@@ -23,5 +23,4 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.DataPreprocessing.Interfaces;
 
 namespace HeuristicLab.DataPreprocessing {
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingChartContent.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingChartContent.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingChartContent.cs	(revision 13502)
@@ -28,5 +28,4 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.DataPreprocessing.Interfaces;
 
 namespace HeuristicLab.DataPreprocessing {
Index: unk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingContext.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingContext.cs	(revision 13501)
+++ 	(revision )
@@ -1,96 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2015 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 HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.DataPreprocessing.Implementations;
-using HeuristicLab.DataPreprocessing.Interfaces;
-using HeuristicLab.Optimization;
-using HeuristicLab.Problems.DataAnalysis;
-
-namespace HeuristicLab.DataPreprocessing {
-  [Item("PreprocessingContext", "PreprocessingContext")]
-  public class PreprocessingContext
-    : Item, IPreprocessingContext {
-
-
-    public IFilteredPreprocessingData Data { get; private set; }
-
-    public IAlgorithm Algorithm { get; private set; }
-    public IDataAnalysisProblem Problem { get; private set; }
-    public IDataAnalysisProblemData ProblemData { get; private set; }
-
-    private readonly ProblemDataCreator creator;
-
-    public PreprocessingContext(IDataAnalysisProblemData dataAnalysisProblemData, IAlgorithm algorithm, IDataAnalysisProblem problem) {
-      var transactionalPreprocessingData = new TransactionalPreprocessingData(dataAnalysisProblemData);
-      Data = new FilteredPreprocessingData(transactionalPreprocessingData);
-
-      ProblemData = dataAnalysisProblemData;
-      Algorithm = algorithm;
-      Problem = problem;
-
-      creator = new ProblemDataCreator(this);
-    }
-
-    protected PreprocessingContext(PreprocessingContext original, Cloner cloner)
-      : base(original, cloner) {
-      Data = cloner.Clone(original.Data);
-      Algorithm = original.Algorithm;
-      Problem = original.Problem;
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new PreprocessingContext(this, cloner);
-    }
-
-    public IItem Export() {
-      if (Algorithm != null)
-        return ExportAlgorithm();
-      else if (Problem != null)
-        return ExportProblem();
-      return ExportProblemData();
-    }
-    public IAlgorithm ExportAlgorithm() {
-      var preprocessedAlgorithm = (IAlgorithm)Algorithm.Clone(new Cloner());
-      preprocessedAlgorithm.Name = preprocessedAlgorithm.Name + "(Preprocessed)";
-      Algorithm.Runs.Clear();
-      var problem = (IDataAnalysisProblem)preprocessedAlgorithm.Problem;
-      SetNewProblemData(problem);
-      return preprocessedAlgorithm;
-    }
-    public IDataAnalysisProblem ExportProblem() {
-      var preprocessedProblem = (IDataAnalysisProblem)Problem.Clone(new Cloner());
-      SetNewProblemData(preprocessedProblem);
-      return preprocessedProblem;
-    }
-
-    public IDataAnalysisProblemData ExportProblemData() {
-      return creator.CreateProblemData();
-    }
-
-    private void SetNewProblemData(IDataAnalysisProblem problem) {
-      var data = creator.CreateProblemData();
-      problem.ProblemDataParameter.ActualValue = data;
-      problem.Name = "Preprocessed " + problem.Name;
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingData.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingData.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingData.cs	(revision 13502)
@@ -94,4 +94,10 @@
       selection = new Dictionary<int, IList<int>>();
 
+      Import(problemData);
+
+      RegisterEventHandler();
+    }
+
+    public void Import(IDataAnalysisProblemData problemData) {
       Dataset dataset = (Dataset)problemData.Dataset;
       variableNames = new List<string>(problemData.Dataset.VariableNames);
@@ -114,6 +120,4 @@
       TrainingPartition = new IntRange(problemData.TrainingPartition.Start, problemData.TrainingPartition.End);
       TestPartition = new IntRange(problemData.TestPartition.Start, problemData.TestPartition.End);
-
-      RegisterEventHandler();
     }
 
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingDataTable.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingDataTable.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingDataTable.cs	(revision 13502)
@@ -1,8 +1,29 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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 HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 
-namespace HeuristicLab.DataPreprocessing.Implementations {
+namespace HeuristicLab.DataPreprocessing {
   [Item("PreprossingDataTable", "A table of data values.")]
   public class PreprocessingDataTable : DataTable {
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/ScatterPlotContent.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/ScatterPlotContent.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/ScatterPlotContent.cs	(revision 13502)
@@ -22,8 +22,8 @@
 using System.Collections.Generic;
 using System.Drawing;
+using System.Linq;
 using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.DataPreprocessing.Interfaces;
 
 namespace HeuristicLab.DataPreprocessing {
@@ -34,4 +34,5 @@
     public string SelectedXVariable { get; set; }
     public string SelectedYVariable { get; set; }
+    public string SelectedColorVariable { get; set; }
 
     public ScatterPlotContent(IFilteredPreprocessingData preprocessingData)
@@ -43,8 +44,8 @@
       this.SelectedXVariable = content.SelectedXVariable;
       this.SelectedYVariable = content.SelectedYVariable;
+      this.SelectedColorVariable = content.SelectedColorVariable;
     }
 
-    public static new Image StaticItemImage
-    {
+    public static new Image StaticItemImage {
       get { return HeuristicLab.Common.Resources.VSImageLibrary.Performance; }
     }
@@ -54,19 +55,37 @@
     }
 
-    public ScatterPlot CreateScatterPlot(string variableNameX, string variableNameY) {
+    public ScatterPlot CreateScatterPlot(string variableNameX, string variableNameY, string variableNameColor = "-") {
       ScatterPlot scatterPlot = new ScatterPlot();
 
       IList<double> xValues = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableNameX));
       IList<double> yValues = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableNameY));
+      if (variableNameColor == null || variableNameColor == "-") {
+        List<Point2D<double>> points = new List<Point2D<double>>();
 
-      List<Point2D<double>> points = new List<Point2D<double>>();
+        for (int i = 0; i < xValues.Count; i++) {
+          Point2D<double> point = new Point2D<double>(xValues[i], yValues[i]);
+          points.Add(point);
+        }
 
-      for (int i = 0; i < xValues.Count; i++) {
-        Point2D<double> point = new Point2D<double>(xValues[i], yValues[i]);
-        points.Add(point);
+        ScatterPlotDataRow scdr = new ScatterPlotDataRow(variableNameX + " - " + variableNameY, "", points);
+        scatterPlot.Rows.Add(scdr);
+
+      } else {
+        var colorValues = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableNameColor));
+        var data = xValues.Zip(yValues, (x, y) => new { x, y }).Zip(colorValues, (v, c) => new { v.x, v.y, c }).ToList();
+        var gradients = ColorGradient.Colors;
+        int curGradient = 0;
+        int numColors = colorValues.Distinct().Count();
+        foreach (var colorValue in colorValues.Distinct()) {
+          var values = data.Where(x => x.c == colorValue);
+          var row = new ScatterPlotDataRow(
+            variableNameX + " - " + variableNameY + " (" + colorValue + ")",
+            "",
+            values.Select(v => new Point2D<double>(v.x, v.y)),
+            new ScatterPlotDataRowVisualProperties() { Color = gradients[curGradient] });
+          curGradient += gradients.Count / numColors;
+          scatterPlot.Rows.Add(row);
+        }
       }
-
-      ScatterPlotDataRow scdr = new ScatterPlotDataRow(variableNameX + " - " + variableNameY, "", points);
-      scatterPlot.Rows.Add(scdr);
       return scatterPlot;
     }
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/StatisticsContent.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/StatisticsContent.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/StatisticsContent.cs	(revision 13502)
@@ -19,4 +19,5 @@
  */
 #endregion
+
 using System.Drawing;
 using HeuristicLab.Common;
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/StatisticsLogic.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/StatisticsLogic.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/StatisticsLogic.cs	(revision 13502)
@@ -26,5 +26,4 @@
 
 namespace HeuristicLab.DataPreprocessing {
-
   public class StatisticsLogic : IStatisticsLogic {
 
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Interfaces/IFilterLogic.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Interfaces/IFilterLogic.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Interfaces/IFilterLogic.cs	(revision 13502)
@@ -23,5 +23,5 @@
 using System.Collections.Generic;
 using HeuristicLab.DataPreprocessing.Filter;
-using HeuristicLab.DataPreprocessing.Interfaces;
+
 namespace HeuristicLab.DataPreprocessing {
   public interface IFilterLogic {
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Interfaces/IFilteredPreprocessingData.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Interfaces/IFilteredPreprocessingData.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Interfaces/IFilteredPreprocessingData.cs	(revision 13502)
@@ -1,11 +1,27 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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
 
-namespace HeuristicLab.DataPreprocessing.Interfaces
-{
-  public interface IFilteredPreprocessingData : ITransactionalPreprocessingData
-  {
+using System;
+
+namespace HeuristicLab.DataPreprocessing {
+  public interface IFilteredPreprocessingData : ITransactionalPreprocessingData {
     void SetFilter(bool[] rowFilters);
     void PersistFilter();
@@ -14,4 +30,4 @@
 
     event EventHandler FilterChanged;
-   }
+  }
 }
Index: unk/sources/HeuristicLab.DataPreprocessing/3.4/Interfaces/IPreprocessingContext.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Interfaces/IPreprocessingContext.cs	(revision 13501)
+++ 	(revision )
@@ -1,41 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2015 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 HeuristicLab.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.DataPreprocessing.Interfaces;
-
-namespace HeuristicLab.DataPreprocessing {
-  public interface IPreprocessingContext : IItem {
-    IFilteredPreprocessingData Data { get; }
-
-    IAlgorithm Algorithm { get; }
-    IDataAnalysisProblem Problem { get; }
-    IDataAnalysisProblemData ProblemData { get; }
-
-    IItem Export();
-    IAlgorithm ExportAlgorithm();
-    IDataAnalysisProblem ExportProblem();
-    IDataAnalysisProblemData ExportProblemData();
-  }
-}
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Interfaces/ITransactionalPreprocessingData.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Interfaces/ITransactionalPreprocessingData.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Interfaces/ITransactionalPreprocessingData.cs	(revision 13502)
@@ -20,8 +20,7 @@
 #endregion
 
+using System;
 
-using System;
 namespace HeuristicLab.DataPreprocessing {
-
   public interface ITransactionalPreprocessingData : IPreprocessingData {
 
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Interfaces/IViewChartShortcut.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Interfaces/IViewChartShortcut.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Interfaces/IViewChartShortcut.cs	(revision 13502)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Core;
 
 namespace HeuristicLab.DataPreprocessing {
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/PreprocessingContext.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/PreprocessingContext.cs	(revision 13502)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/PreprocessingContext.cs	(revision 13502)
@@ -0,0 +1,134 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis;
+
+namespace HeuristicLab.DataPreprocessing {
+  [Item("PreprocessingContext", "PreprocessingContext")]
+  public class PreprocessingContext : NamedItem, IStorableContent {
+
+    public string Filename { get; set; }
+
+    public IEnumerable<KeyValuePair<string, Func<IItem>>> ExportPossibilities {
+      get {
+        var algorithm = Source as IAlgorithm;
+        if (algorithm != null)
+          yield return new KeyValuePair<string, Func<IItem>>(algorithm.Name, () => ExportAlgorithm(algorithm));
+
+        var problem = algorithm != null ? algorithm.Problem as IDataAnalysisProblem : Source as IDataAnalysisProblem;
+        if (problem != null)
+          yield return new KeyValuePair<string, Func<IItem>>(problem.Name, () => ExportProblem(problem));
+
+        var problemData = problem != null ? problem.ProblemData : Source as IDataAnalysisProblemData;
+        if (problemData != null)
+          yield return new KeyValuePair<string, Func<IItem>>(problemData.Name, () => ExportProblemData(problemData));
+
+        // ToDo: Export CSV
+      }
+    }
+    public bool CanExport {
+      get { return Source is IAlgorithm || Source is IDataAnalysisProblem || Source is IDataAnalysisProblemData; }
+    }
+
+    [Storable]
+    public IFilteredPreprocessingData Data { get; private set; }
+
+    [Storable]
+    private IItem Source { get; set; }
+
+
+    public PreprocessingContext() : this(new RegressionProblemData()) { }
+    public PreprocessingContext(IItem source) {
+      Import(source);
+
+    }
+
+    [StorableConstructor]
+    private PreprocessingContext(bool deserializing)
+      : base(deserializing) { }
+    protected PreprocessingContext(PreprocessingContext original, Cloner cloner)
+      : base(original, cloner) {
+      Source = cloner.Clone(original.Source);
+      Data = cloner.Clone(original.Data);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PreprocessingContext(this, cloner);
+    }
+
+    #region Import
+    public void Import(IItem source) {
+      Source = source;
+
+      var dataSource = ExtractProblemData(source);
+      Data = new FilteredPreprocessingData(new TransactionalPreprocessingData(dataSource));
+    }
+
+    private IDataAnalysisProblemData ExtractProblemData(IItem source) {
+      var algorithm = source as Algorithm;
+      var problem = algorithm != null ? algorithm.Problem as IDataAnalysisProblem : source as IDataAnalysisProblem;
+      var problemData = problem != null ? problem.ProblemData : source as IDataAnalysisProblemData;
+      return problemData;
+    }
+    #endregion
+
+    #region Export
+    public IItem Export() {
+      var creator = new ProblemDataCreator(this);
+      if (Source is IAlgorithm)
+        return ExportAlgorithm((IAlgorithm)Source);
+      if (Source is IDataAnalysisProblem)
+        return ExportProblem((IDataAnalysisProblem)Source);
+      if (Source is IDataAnalysisProblemData)
+        return ExportProblemData((IDataAnalysisProblemData)Source);
+      return null;
+    }
+    private IAlgorithm ExportAlgorithm(IAlgorithm source) {
+      var preprocessedAlgorithm = (IAlgorithm)source.Clone();
+      preprocessedAlgorithm.Name = preprocessedAlgorithm.Name + "(Preprocessed)";
+      preprocessedAlgorithm.Runs.Clear();
+      var problem = (IDataAnalysisProblem)preprocessedAlgorithm.Problem;
+      SetNewProblemData(problem);
+      return preprocessedAlgorithm;
+    }
+    private IDataAnalysisProblem ExportProblem(IDataAnalysisProblem source) {
+      var preprocessedProblem = (IDataAnalysisProblem)source.Clone();
+      SetNewProblemData(preprocessedProblem);
+      return preprocessedProblem;
+    }
+    private IDataAnalysisProblemData ExportProblemData(IDataAnalysisProblemData source) {
+      var creator = new ProblemDataCreator(this);
+      return creator.CreateProblemData(source);
+    }
+    private void SetNewProblemData(IDataAnalysisProblem problem) {
+      var data = ExtractProblemData(problem.ProblemData);
+      problem.ProblemDataParameter.ActualValue = data;
+      problem.Name = "Preprocessed " + problem.Name;
+    }
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/ProblemDataCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/ProblemDataCreator.cs	(revision 13501)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/ProblemDataCreator.cs	(revision 13502)
@@ -29,5 +29,5 @@
   public class ProblemDataCreator {
 
-    private readonly IPreprocessingContext context;
+    private readonly PreprocessingContext context;
 
     private Dataset ExportedDataset {
@@ -39,12 +39,11 @@
     private IList<ITransformation> Transformations { get { return context.Data.Transformations; } }
 
-    public ProblemDataCreator(IPreprocessingContext context) {
+    public ProblemDataCreator(PreprocessingContext context) {
       this.context = context;
     }
 
-    public IDataAnalysisProblemData CreateProblemData() {
+    public IDataAnalysisProblemData CreateProblemData(IDataAnalysisProblemData oldProblemData) {
       if (context.Data.Rows == 0 || context.Data.Columns == 0) return null;
 
-      var oldProblemData = context.ProblemData;
       IDataAnalysisProblemData problemData;
 
