Index: /trunk/sources/HeuristicLab.AdvancedOptimizationFrontend/3.2/MainForm.cs
===================================================================
--- /trunk/sources/HeuristicLab.AdvancedOptimizationFrontend/3.2/MainForm.cs	(revision 2142)
+++ /trunk/sources/HeuristicLab.AdvancedOptimizationFrontend/3.2/MainForm.cs	(revision 2143)
@@ -100,5 +100,4 @@
     /// is neither a view nor an editor.</exception>
     /// <param name="control">The control to display.</param>
-    delegate void ShowControlDelegate(IControl control);
     public void ShowControl(IControl control) {
       if (InvokeRequired) Invoke((Action<IControl>)ShowControl,control);
@@ -183,4 +182,5 @@
         else {
           editor.Filename = task.filename;
+          editor.SaveFinished += new EventHandler(SaveFinished);
           PluginManager.ControlManager.ShowControl(editor);
         }
@@ -198,8 +198,6 @@
         lock (locker) runningTasks++;
         Cursor = Cursors.AppStarting;
-        ((Control)form.Editor).Enabled = false;
         EnableDisableItems();
-        Task task = new Task(form.Editor.Filename, form.Editor.Item, form.Editor);
-        ThreadPool.QueueUserWorkItem(new WaitCallback(AsynchronousSave), task);
+        form.Editor.Save();
       }
     }
@@ -210,14 +208,8 @@
       }
     }
-    private void AsynchronousSave(object state) {
-      Task task = (Task)state;
-      PersistenceManager.Save(task.storable, task.filename);
-      SaveFinished(task);
-    }
-    private void SaveFinished(Task task) {
+    private void SaveFinished(object sender, EventArgs e) {
       if (InvokeRequired)
-        Invoke(new TaskFinishedDelegate(SaveFinished), task);
+        Invoke(new EventHandler(SaveFinished), sender, e);
       else {
-        ((Control)task.editor).Enabled = true;
         EnableDisableItems();
         lock (locker) {
@@ -246,4 +238,5 @@
           MessageBox.Show("The selected item doesn't provide an editor.", "Editor Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         } else {
+          editor.SaveFinished += new EventHandler(SaveFinished);
           PluginManager.ControlManager.ShowControl(editor);
           EnableDisableItems();
Index: /trunk/sources/HeuristicLab.Core/3.2/EditorBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.2/EditorBase.cs	(revision 2142)
+++ /trunk/sources/HeuristicLab.Core/3.2/EditorBase.cs	(revision 2143)
@@ -27,4 +27,5 @@
 using System.Text;
 using System.Windows.Forms;
+using System.Threading;
 
 namespace HeuristicLab.Core {
@@ -57,4 +58,31 @@
 
     /// <summary>
+    /// Saves the contained item to a file.
+    /// </summary>
+    /// <remarks>
+    ///   The filename to save the contained item to is given by <see cref="Filename"/>.
+    ///   Save is an asynchronous method. After saving the contained item is finished, the
+    ///   <see cref="SaveFinished"/> event is fired.
+    /// </remarks>
+    public void Save() {
+      Enabled = false;
+      ThreadPool.QueueUserWorkItem((o) => {
+        try {
+          PersistenceManager.Save(Item, Filename);
+        }
+        catch (Exception e) {
+          MessageBox.Show(String.Format(
+            "Sorry couldn't save file \"{0}\".\n The following exception occurred: {1}",
+            Filename, e.ToString()),
+            "Writer Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+        }
+        finally {
+          Invoke(new Action(() => Enabled = true));
+          OnSaveFinished();
+        }
+      });
+    }
+
+    /// <summary>
     /// Updates all controls with the latest data of the model.
     /// </summary>
@@ -79,4 +107,15 @@
         FilenameChanged(this, new EventArgs());
     }
+    /// <summary>
+    /// Occurs when the filename was changed.
+    /// </summary>
+    public event EventHandler SaveFinished;
+    /// <summary>
+    /// Fires the <see cref="SaveFinished"/> event.
+    /// </summary>
+    protected virtual void OnSaveFinished() {
+      if (SaveFinished != null)
+        SaveFinished(this, new EventArgs());
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.Core/3.2/HeuristicLab.Core-3.2.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.2/HeuristicLab.Core-3.2.csproj	(revision 2142)
+++ /trunk/sources/HeuristicLab.Core/3.2/HeuristicLab.Core-3.2.csproj	(revision 2143)
@@ -32,4 +32,5 @@
     <UseApplicationTrust>false</UseApplicationTrust>
     <BootstrapperEnabled>true</BootstrapperEnabled>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -90,4 +91,7 @@
   <ItemGroup>
     <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
     <Reference Include="System.Data" />
     <Reference Include="System.Drawing" />
Index: /trunk/sources/HeuristicLab.Core/3.2/Interfaces/IEditor.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.2/Interfaces/IEditor.cs	(revision 2142)
+++ /trunk/sources/HeuristicLab.Core/3.2/Interfaces/IEditor.cs	(revision 2143)
@@ -36,7 +36,21 @@
 
     /// <summary>
+    /// Saves the contained item to a file.
+    /// </summary>
+    /// <remarks>
+    ///   The filename to save the contained item to is given by <see cref="Filename"/>.
+    ///   Save is an asynchronous method. After saving the contained item is finished, the
+    ///   <see cref="SaveFinished"/> event is fired.
+    /// </remarks>
+    void Save();
+
+    /// <summary>
     /// Occurs when the filename was changed.
     /// </summary>
     event EventHandler FilenameChanged;
+    /// <summary>
+    /// Occurs after saving the contained object is finished.
+    /// </summary>
+    event EventHandler SaveFinished;
   }
 }
Index: /trunk/sources/HeuristicLab.Core/3.2/PersistenceManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.2/PersistenceManager.cs	(revision 2142)
+++ /trunk/sources/HeuristicLab.Core/3.2/PersistenceManager.cs	(revision 2143)
@@ -108,8 +108,11 @@
     /// <param name="filename">The name of the file where the <paramref name="object"/> should be saved.</param>
     public static void Save(IStorable instance, string filename) {
-      using(FileStream stream = File.Create(filename)) {
+      string tempfile = Path.GetTempFileName();
+      using (FileStream stream = File.Create(tempfile)) {
         Save(instance, stream);
         stream.Close();
       }
+      File.Copy(tempfile, filename, true);
+      File.Delete(tempfile);
     }
     /// <summary>
