Index: branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/BattleRunnerDialog.Designer.cs
===================================================================
--- branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/BattleRunnerDialog.Designer.cs	(revision 9985)
+++ branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/BattleRunnerDialog.Designer.cs	(revision 9985)
@@ -0,0 +1,180 @@
+﻿namespace HeuristicLab.Problems.Robocode.Views {
+  partial class BattleRunnerDialog {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BattleRunnerDialog));
+      this.label1 = new System.Windows.Forms.Label();
+      this.robocodePathTextBox = new System.Windows.Forms.TextBox();
+      this.label2 = new System.Windows.Forms.Label();
+      this.nrOfRoundsNumericUpDown = new System.Windows.Forms.NumericUpDown();
+      this.searchButton = new System.Windows.Forms.Button();
+      this.cancelButton = new System.Windows.Forms.Button();
+      this.runInRobocodeButton = new System.Windows.Forms.Button();
+      this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog();
+      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
+      this.enemyCollectionView = new HeuristicLab.Problems.Robocode.Views.EnemyCollectionView();
+      ((System.ComponentModel.ISupportInitialize)(this.nrOfRoundsNumericUpDown)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(12, 15);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(85, 13);
+      this.label1.TabIndex = 0;
+      this.label1.Text = "Robocode Path:";
+      // 
+      // robocodePathTextBox
+      // 
+      this.robocodePathTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.robocodePathTextBox.Location = new System.Drawing.Point(117, 12);
+      this.robocodePathTextBox.Name = "robocodePathTextBox";
+      this.robocodePathTextBox.Size = new System.Drawing.Size(715, 20);
+      this.robocodePathTextBox.TabIndex = 1;
+      this.robocodePathTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.robocodePathTextBox_Validating);
+      this.robocodePathTextBox.Validated += new System.EventHandler(this.robocodePathTextBox_Validated);
+      // 
+      // label2
+      // 
+      this.label2.AutoSize = true;
+      this.label2.Location = new System.Drawing.Point(12, 40);
+      this.label2.Name = "label2";
+      this.label2.Size = new System.Drawing.Size(99, 13);
+      this.label2.TabIndex = 2;
+      this.label2.Text = "Number of Rounds:";
+      // 
+      // nrOfRoundsNumericUpDown
+      // 
+      this.nrOfRoundsNumericUpDown.Location = new System.Drawing.Point(117, 38);
+      this.nrOfRoundsNumericUpDown.Minimum = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+      this.nrOfRoundsNumericUpDown.Name = "nrOfRoundsNumericUpDown";
+      this.nrOfRoundsNumericUpDown.Size = new System.Drawing.Size(73, 20);
+      this.nrOfRoundsNumericUpDown.TabIndex = 3;
+      this.nrOfRoundsNumericUpDown.Value = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+      // 
+      // searchButton
+      // 
+      this.searchButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.searchButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Zoom;
+      this.searchButton.Location = new System.Drawing.Point(838, 9);
+      this.searchButton.Name = "searchButton";
+      this.searchButton.Size = new System.Drawing.Size(24, 24);
+      this.searchButton.TabIndex = 4;
+      this.searchButton.UseVisualStyleBackColor = true;
+      this.searchButton.Click += new System.EventHandler(this.searchButton_Click);
+      // 
+      // cancelButton
+      // 
+      this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+      this.cancelButton.Location = new System.Drawing.Point(787, 567);
+      this.cancelButton.Name = "cancelButton";
+      this.cancelButton.Size = new System.Drawing.Size(75, 23);
+      this.cancelButton.TabIndex = 5;
+      this.cancelButton.Text = "Cancel";
+      this.cancelButton.UseVisualStyleBackColor = true;
+      // 
+      // runInRobocodeButton
+      // 
+      this.runInRobocodeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.runInRobocodeButton.Location = new System.Drawing.Point(656, 567);
+      this.runInRobocodeButton.Name = "runInRobocodeButton";
+      this.runInRobocodeButton.Size = new System.Drawing.Size(125, 23);
+      this.runInRobocodeButton.TabIndex = 6;
+      this.runInRobocodeButton.Text = "Run in Robocode";
+      this.runInRobocodeButton.UseVisualStyleBackColor = true;
+      this.runInRobocodeButton.Click += new System.EventHandler(this.runInRobocodeButton_Click);
+      // 
+      // folderBrowserDialog
+      // 
+      this.folderBrowserDialog.ShowNewFolderButton = false;
+      // 
+      // errorProvider
+      // 
+      this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
+      this.errorProvider.ContainerControl = this;
+      // 
+      // enemyCollectionView
+      // 
+      this.enemyCollectionView.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.enemyCollectionView.Caption = "EnemyCollection View";
+      this.enemyCollectionView.Content = null;
+      this.enemyCollectionView.Location = new System.Drawing.Point(12, 64);
+      this.enemyCollectionView.Name = "enemyCollectionView";
+      this.enemyCollectionView.ReadOnly = false;
+      this.enemyCollectionView.Size = new System.Drawing.Size(850, 497);
+      this.enemyCollectionView.TabIndex = 0;
+      // 
+      // BattleRunnerDialog
+      // 
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.CancelButton = this.cancelButton;
+      this.ClientSize = new System.Drawing.Size(874, 602);
+      this.Controls.Add(this.runInRobocodeButton);
+      this.Controls.Add(this.cancelButton);
+      this.Controls.Add(this.searchButton);
+      this.Controls.Add(this.enemyCollectionView);
+      this.Controls.Add(this.nrOfRoundsNumericUpDown);
+      this.Controls.Add(this.label2);
+      this.Controls.Add(this.robocodePathTextBox);
+      this.Controls.Add(this.label1);
+      this.Name = "BattleRunnerDialog";
+      this.ShowIcon = false;
+      this.ShowInTaskbar = false;
+      this.Text = "BattleRunnerDialog";
+      ((System.ComponentModel.ISupportInitialize)(this.nrOfRoundsNumericUpDown)).EndInit();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.TextBox robocodePathTextBox;
+    private System.Windows.Forms.Label label2;
+    private System.Windows.Forms.NumericUpDown nrOfRoundsNumericUpDown;
+    private EnemyCollectionView enemyCollectionView;
+    private System.Windows.Forms.Button searchButton;
+    private System.Windows.Forms.Button cancelButton;
+    private System.Windows.Forms.Button runInRobocodeButton;
+    private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog;
+    private System.Windows.Forms.ErrorProvider errorProvider;
+  }
+}
Index: branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/BattleRunnerDialog.cs
===================================================================
--- branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/BattleRunnerDialog.cs	(revision 9985)
+++ branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/BattleRunnerDialog.cs	(revision 9985)
@@ -0,0 +1,60 @@
+﻿using System.IO;
+using System.Windows.Forms;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Problems.Robocode.Views {
+  public partial class BattleRunnerDialog : Form {
+    public int NrOfRounds {
+      get { return (int)nrOfRoundsNumericUpDown.Value; }
+      set { nrOfRoundsNumericUpDown.Value = value; }
+    }
+
+    public EnemyCollection Enemies {
+      get { return enemyCollectionView.Content; }
+      set { enemyCollectionView.Content = value; }
+    }
+
+    public BattleRunnerDialog(Solution solution) {
+      InitializeComponent();
+      errorProvider.SetIconAlignment(robocodePathTextBox, ErrorIconAlignment.MiddleLeft);
+      errorProvider.SetIconPadding(robocodePathTextBox, 2);
+      nrOfRoundsNumericUpDown.Maximum = int.MaxValue;
+      NrOfRounds = solution.NrOfRounds;
+      Enemies = (EnemyCollection)solution.Enemies.Clone(new Cloner());
+      robocodePathTextBox.Text = Enemies.RobocodePath;
+    }
+
+    private void searchButton_Click(object sender, System.EventArgs e) {
+      var result = folderBrowserDialog.ShowDialog(this);
+      if (result == DialogResult.OK)
+        Enemies.RobocodePath = robocodePathTextBox.Text = folderBrowserDialog.SelectedPath;
+    }
+
+    private void runInRobocodeButton_Click(object sender, System.EventArgs e) {
+      DialogResult = DialogResult.OK;
+      Close();
+    }
+
+    private void robocodePathTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e) {
+      string robocodePath = robocodePathTextBox.Text;
+      if (string.IsNullOrEmpty(robocodePath)) {
+        e.Cancel = true;
+        errorProvider.SetError(robocodePathTextBox, "Robocode Directory has to be set");
+        robocodePathTextBox.SelectAll();
+        return;
+      }
+      var info = new DirectoryInfo(robocodePath);
+      if (!info.Exists) {
+        e.Cancel = true;
+        errorProvider.SetError(robocodePathTextBox, "This directory does not exist");
+        robocodePathTextBox.SelectAll();
+        return;
+      }
+      Enemies.RobocodePath = robocodePathTextBox.Text;
+    }
+
+    private void robocodePathTextBox_Validated(object sender, System.EventArgs e) {
+      errorProvider.SetError(robocodePathTextBox, string.Empty);
+    }
+  }
+}
Index: branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/HeuristicLab.Problems.Robocode.Views-3.3.csproj
===================================================================
--- branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/HeuristicLab.Problems.Robocode.Views-3.3.csproj	(revision 9983)
+++ branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/HeuristicLab.Problems.Robocode.Views-3.3.csproj	(revision 9985)
@@ -108,4 +108,10 @@
     <None Include="Plugin.cs.frame" />
     <None Include="Properties\AssemblyInfo.cs.frame" />
+    <Compile Include="BattleRunnerDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="BattleRunnerDialog.Designer.cs">
+      <DependentUpon>BattleRunnerDialog.cs</DependentUpon>
+    </Compile>
     <Compile Include="EnemyCollectionView.cs">
       <SubType>UserControl</SubType>
Index: branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionCodeView.Designer.cs
===================================================================
--- branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionCodeView.Designer.cs	(revision 9983)
+++ branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionCodeView.Designer.cs	(revision 9985)
@@ -26,4 +26,6 @@
       this.programCode = new System.Windows.Forms.TextBox();
       this.btnRunInRobocode = new System.Windows.Forms.Button();
+      this.btnSave = new System.Windows.Forms.Button();
+      this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
       this.SuspendLayout();
       // 
@@ -39,5 +41,5 @@
       this.programCode.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
       this.programCode.Size = new System.Drawing.Size(345, 203);
-      this.programCode.TabIndex = 3;
+      this.programCode.TabIndex = 0;
       // 
       // btnRunInRobocode
@@ -48,8 +50,25 @@
       this.btnRunInRobocode.Name = "btnRunInRobocode";
       this.btnRunInRobocode.Size = new System.Drawing.Size(101, 23);
-      this.btnRunInRobocode.TabIndex = 4;
+      this.btnRunInRobocode.TabIndex = 2;
       this.btnRunInRobocode.Text = "Run in Robocode";
       this.btnRunInRobocode.UseVisualStyleBackColor = true;
       this.btnRunInRobocode.Click += new System.EventHandler(this.btnRunInRobocode_Click);
+      // 
+      // btnSave
+      // 
+      this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.btnSave.AutoSize = true;
+      this.btnSave.Location = new System.Drawing.Point(166, 212);
+      this.btnSave.Name = "btnSave";
+      this.btnSave.Size = new System.Drawing.Size(75, 23);
+      this.btnSave.TabIndex = 1;
+      this.btnSave.Text = "Save...";
+      this.btnSave.UseVisualStyleBackColor = true;
+      this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
+      // 
+      // saveFileDialog
+      // 
+      this.saveFileDialog.DefaultExt = "java";
+      this.saveFileDialog.Filter = "Java |*java";
       // 
       // SolutionCodeView
@@ -57,4 +76,5 @@
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.btnSave);
       this.Controls.Add(this.btnRunInRobocode);
       this.Controls.Add(this.programCode);
@@ -70,4 +90,6 @@
     private System.Windows.Forms.TextBox programCode;
     private System.Windows.Forms.Button btnRunInRobocode;
+    private System.Windows.Forms.Button btnSave;
+    private System.Windows.Forms.SaveFileDialog saveFileDialog;
   }
 }
Index: branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionCodeView.cs
===================================================================
--- branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionCodeView.cs	(revision 9983)
+++ branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionCodeView.cs	(revision 9985)
@@ -21,6 +21,9 @@
 
 using System;
+using System.IO;
+using System.Windows.Forms;
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
+using HeuristicLab.Problems.Robocode.Views;
 
 namespace HeuristicLab.Problems.Robocode {
@@ -49,6 +52,21 @@
     }
 
+    private void btnSave_Click(object sender, EventArgs e) {
+      saveFileDialog.FileName = programName;
+      var result = saveFileDialog.ShowDialog(this);
+      if (result == DialogResult.OK)
+        File.WriteAllText(saveFileDialog.FileName, programCode.Text);
+    }
+
     private void btnRunInRobocode_Click(object sender, EventArgs e) {
-      Interpreter.EvaluateTankProgram(Content.Tree, Content.Path, Content.Enemies, programName, true, Content.NrOfRounds);
+      using (var battleRunnerDlg = new BattleRunnerDialog(Content)) {
+        var result = battleRunnerDlg.ShowDialog(this);
+        if (result == DialogResult.OK) {
+          var enemies = battleRunnerDlg.Enemies;
+          string path = enemies.RobocodePath;
+          int nrOfRounds = battleRunnerDlg.NrOfRounds;
+          Interpreter.EvaluateTankProgram(Content.Tree, path, enemies, programName, true, nrOfRounds);
+        }
+      }
     }
   }
Index: branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/RobocodeProblem.cs
===================================================================
--- branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/RobocodeProblem.cs	(revision 9983)
+++ branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/RobocodeProblem.cs	(revision 9985)
@@ -69,13 +69,8 @@
 
     [StorableConstructor]
-    protected RobocodeProblem(bool deserializing)
-      : base(deserializing) {
-      if (deserializing) {
-        RegisterRobocodePathEvent();
-      }
-    }
+    protected RobocodeProblem(bool deserializing) : base(deserializing) { }
     protected RobocodeProblem(RobocodeProblem original, Cloner cloner)
       : base(original, cloner) {
-      RegisterRobocodePathEvent();
+      RegisterEventHandlers();
     }
 
@@ -97,4 +92,5 @@
       Maximization.Value = true;
       InitializeOperators();
+      RegisterEventHandlers();
     }
 
@@ -103,7 +99,11 @@
     }
 
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEventHandlers();
+    }
+
     private void InitializeOperators() {
-      Operators.AddRange(
-        ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeOperator>());
+      Operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeOperator>());
       Operators.Add(new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer());
       Operators.Add(new SymbolicExpressionSymbolFrequencyAnalyzer());
@@ -111,8 +111,7 @@
       ParameterizeOperators();
       ParameterizeAnalyzers();
-      RegisterRobocodePathEvent();
     }
 
-    private void RegisterRobocodePathEvent() {
+    private void RegisterEventHandlers() {
       RobocodePathParameter.Value.StringValue.ValueChanged += RobocodePathParameter_ValueChanged;
     }
