Index: branches/ClassificationModelComparison/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.cs
===================================================================
--- branches/ClassificationModelComparison/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.cs	(revision 9116)
+++ branches/ClassificationModelComparison/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.cs	(revision 10556)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -30,6 +30,9 @@
 using HeuristicLab.Optimization;
 using HeuristicLab.Optimization.Views;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
+
   [View("DataAnalysisSolution View")]
   [Content(typeof(DataAnalysisSolution), false)]
@@ -49,4 +52,5 @@
       addButton.Enabled = false;
       removeButton.Enabled = false;
+      loadProblemDataButton.Enabled = Content != null && !Locked;
     }
 
@@ -119,4 +123,36 @@
     }
 
+    protected virtual void loadProblemDataButton_Click(object sender, EventArgs e) {
+      if (loadProblemDataFileDialog.ShowDialog(this) != DialogResult.OK) return;
+      try {
+        object hlFile = XmlParser.Deserialize(loadProblemDataFileDialog.FileName);
+
+        IDataAnalysisProblemData problemData = null;
+        if (hlFile is IDataAnalysisProblemData) {
+          problemData = (IDataAnalysisProblemData)hlFile;
+        } else if (hlFile is IDataAnalysisProblem) {
+          problemData = ((IDataAnalysisProblem)hlFile).ProblemData;
+        } else if (hlFile is IDataAnalysisSolution) {
+          problemData = ((IDataAnalysisSolution)hlFile).ProblemData;
+        }
+
+        if (problemData == null)
+          throw new InvalidOperationException("The chosen HeuristicLab file does not contain a ProblemData, Problem, or DataAnalysisSolution.");
+
+        var solution = (IDataAnalysisSolution)Content.Clone();
+        problemData.AdjustProblemDataProperties(solution.ProblemData);
+        solution.ProblemData = problemData;
+        if (!solution.Name.EndsWith(" with loaded problemData"))
+          solution.Name += " with loaded problemData";
+        MainFormManager.MainForm.ShowContent(solution);
+      }
+      catch (InvalidOperationException invalidOperationException) {
+        ErrorHandling.ShowErrorDialog(this, invalidOperationException);
+      }
+      catch (ArgumentException argumentException) {
+        ErrorHandling.ShowErrorDialog(this, argumentException);
+      }
+    }
+
     protected void AddViewListViewItem(Type viewType, Image image) {
       ListViewItem listViewItem = new ListViewItem();
@@ -165,28 +201,46 @@
       validDragOperation = false;
       if (ReadOnly) return;
+      if (e.Effect != DragDropEffects.Copy) return;
 
       var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
-      if (dropData is DataAnalysisProblemData) validDragOperation = true;
+      if (dropData is IDataAnalysisProblemData) validDragOperation = true;
+      else if (dropData is IDataAnalysisProblem) validDragOperation = true;
       else if (dropData is IValueParameter) {
         var param = (IValueParameter)dropData;
-        if (param.Value is DataAnalysisProblemData) validDragOperation = true;
+        if (param.Value is IDataAnalysisProblemData) validDragOperation = true;
       }
     }
 
     protected override void itemsListView_DragDrop(object sender, DragEventArgs e) {
-      if (e.Effect != DragDropEffects.None) {
-        var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
-        if (dropData is DataAnalysisProblemData) {
-          DataAnalysisProblemData problemData = (DataAnalysisProblemData)dropData;
-          Content.ProblemData = (DataAnalysisProblemData)problemData.Clone();
-        } else if (dropData is IValueParameter) {
-          var param = (IValueParameter)dropData;
-          DataAnalysisProblemData problemData = param.Value as DataAnalysisProblemData;
-          if (problemData != null)
-            Content.ProblemData = (DataAnalysisProblemData)problemData.Clone();
-        }
+      if (e.Effect == DragDropEffects.None) return;
+
+      IDataAnalysisProblemData problemData = null;
+      var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
+      if (dropData is IDataAnalysisProblemData)
+        problemData = (IDataAnalysisProblemData)dropData;
+      else if (dropData is IDataAnalysisProblem)
+        problemData = ((IDataAnalysisProblem)dropData).ProblemData;
+      else if (dropData is IValueParameter) {
+        var param = (IValueParameter)dropData;
+        problemData = param.Value as DataAnalysisProblemData;
+      }
+      if (problemData == null) return;
+
+      try {
+        problemData.AdjustProblemDataProperties(Content.ProblemData);
+        Content.ProblemData = problemData;
+
+        if (!Content.Name.EndsWith(" with changed problemData"))
+          Content.Name += " with changed problemData";
+      }
+      catch (InvalidOperationException invalidOperationException) {
+        ErrorHandling.ShowErrorDialog(this, invalidOperationException);
+      }
+      catch (ArgumentException argumentException) {
+        ErrorHandling.ShowErrorDialog(this, argumentException);
       }
     }
     #endregion
+
   }
 }
