Index: stable/HeuristicLab.CodeEditor/3.4/AssemblyLoader.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/AssemblyLoader.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/AssemblyLoader.cs	(revision 11937)
@@ -0,0 +1,144 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.IO;
+using System.Linq;
+using System.Reflection;
+using System.Threading.Tasks;
+using HeuristicLab.Common;
+using ICSharpCode.NRefactory.Documentation;
+using ICSharpCode.NRefactory.TypeSystem;
+
+namespace HeuristicLab.CodeEditor {
+  internal class AssemblyLoader {
+    private readonly HashSet<IUnresolvedAssembly> assemblySet = new HashSet<IUnresolvedAssembly>();
+    private readonly object locker = new object();
+
+    public void AddAssembly(Assembly assembly) {
+      var assemblies = new[] { assembly };
+      OnAssembliesLoading(assemblies);
+      var unresolvedAssembly = Load(assembly);
+      lock (locker)
+        assemblySet.Add(unresolvedAssembly);
+      OnInternalAssembliesLoaded(new[] { unresolvedAssembly });
+      OnAssembliesLoaded(assemblies);
+    }
+
+    public void AddAssemblies(IEnumerable<Assembly> assemblies) {
+      var a = assemblies.ToArray();
+      OnAssembliesLoading(a);
+      var ua = new IUnresolvedAssembly[a.Length];
+      Parallel.For(0, a.Length, i => ua[i] = Load(a[i]));
+
+      lock (locker)
+        foreach (var asm in ua)
+          assemblySet.Add(asm);
+
+      OnInternalAssembliesLoaded(ua);
+      OnAssembliesLoaded(a);
+    }
+
+    public async Task AddAssembliesAsync(IEnumerable<Assembly> assemblies) {
+      await Task.Run(() => AddAssemblies(assemblies));
+    }
+
+    public void RemoveAssembly(Assembly assembly) {
+      var assemblies = new[] { assembly };
+      OnAssembliesUnloading(assemblies);
+      IUnresolvedAssembly unresolvedAssembly;
+      lock (locker) {
+        unresolvedAssembly = assemblySet.SingleOrDefault(x => x.FullAssemblyName == assembly.FullName);
+        assemblySet.Remove(unresolvedAssembly);
+      }
+      OnInternalAssembliesUnloaded(new[] { unresolvedAssembly });
+      OnAssembliesUnloaded(assemblies);
+    }
+
+    #region Loading Helper
+    private IUnresolvedAssembly Load(Assembly assembly) {
+      var loader = new CecilLoader {
+        DocumentationProvider = GetXmlDocumentation(assembly.Location)
+      };
+      return loader.LoadAssemblyFile(assembly.Location);
+    }
+    #endregion
+
+    #region XML Documentation Helpers
+    private static readonly List<string> xmlDocLookupDirectories = new List<string> {
+      Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @"Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"),
+      System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
+    };
+
+    private static IDocumentationProvider GetXmlDocumentation(string assemblyLocation) {
+      if (!File.Exists(assemblyLocation)) return null;
+
+      string xmlDocFileName = Path.GetFileNameWithoutExtension(assemblyLocation) + ".xml";
+
+      foreach (var dir in xmlDocLookupDirectories) {
+        string xmlDocFileLocation = Path.Combine(dir, xmlDocFileName);
+        if (File.Exists(xmlDocFileLocation)) return new XmlDocumentationProvider(xmlDocFileLocation);
+      }
+
+      return null;
+    }
+    #endregion
+
+    #region Events
+    public event EventHandler<EventArgs<IEnumerable<Assembly>>> AssembliesLoading;
+    private void OnAssembliesLoading(IEnumerable<Assembly> args) {
+      var handler = AssembliesLoading;
+      if (handler != null) handler(this, new EventArgs<IEnumerable<Assembly>>(args));
+    }
+
+    public event EventHandler<EventArgs<IEnumerable<Assembly>>> AssembliesLoaded;
+    private void OnAssembliesLoaded(IEnumerable<Assembly> args) {
+      var handler = AssembliesLoaded;
+      if (handler != null) handler(this, new EventArgs<IEnumerable<Assembly>>(args));
+    }
+
+    public event EventHandler<EventArgs<IEnumerable<IUnresolvedAssembly>>> InternalAssembliesLoaded;
+    private void OnInternalAssembliesLoaded(IEnumerable<IUnresolvedAssembly> args) {
+      var handler = InternalAssembliesLoaded;
+      if (handler != null) handler(this, new EventArgs<IEnumerable<IUnresolvedAssembly>>(args));
+    }
+
+    public event EventHandler<EventArgs<IEnumerable<Assembly>>> AssembliesUnloading;
+    private void OnAssembliesUnloading(IEnumerable<Assembly> args) {
+      var handler = AssembliesUnloading;
+      if (handler != null) handler(this, new EventArgs<IEnumerable<Assembly>>(args));
+    }
+
+    public event EventHandler<EventArgs<IEnumerable<Assembly>>> AssembliesUnloaded;
+    private void OnAssembliesUnloaded(IEnumerable<Assembly> args) {
+      var handler = AssembliesUnloaded;
+      if (handler != null) handler(this, new EventArgs<IEnumerable<Assembly>>(args));
+    }
+
+    public event EventHandler<EventArgs<IEnumerable<IUnresolvedAssembly>>> InternalAssembliesUnloaded;
+    private void OnInternalAssembliesUnloaded(IEnumerable<IUnresolvedAssembly> args) {
+      var handler = InternalAssembliesUnloaded;
+      if (handler != null) handler(this, new EventArgs<IEnumerable<IUnresolvedAssembly>>(args));
+    }
+    #endregion
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/AvalonEditWrapper.xaml
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/AvalonEditWrapper.xaml	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/AvalonEditWrapper.xaml	(revision 11937)
@@ -0,0 +1,14 @@
+﻿<UserControl
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+             xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit"
+             x:ClassModifier="internal"
+             x:Class="HeuristicLab.CodeEditor.AvalonEditWrapper"
+             mc:Ignorable="d" 
+             d:DesignHeight="300" d:DesignWidth="300">
+    <Grid>
+        <avalonedit:TextEditor Name="TextEditor"/>
+    </Grid>
+</UserControl>
Index: stable/HeuristicLab.CodeEditor/3.4/AvalonEditWrapper.xaml.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/AvalonEditWrapper.xaml.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/AvalonEditWrapper.xaml.cs	(revision 11937)
@@ -0,0 +1,33 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Windows.Controls;
+
+namespace HeuristicLab.CodeEditor {
+  /// <summary>
+  /// Interaction logic for CodeEditorWrapper.xaml
+  /// </summary>
+  internal partial class AvalonEditWrapper : UserControl {
+    public AvalonEditWrapper() {
+      InitializeComponent();
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/CodeEditor.Designer.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/CodeEditor.Designer.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/CodeEditor.Designer.cs	(revision 11937)
@@ -0,0 +1,53 @@
+﻿namespace HeuristicLab.CodeEditor {
+  partial class CodeEditor {
+    /// <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 Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.elementHost = new System.Windows.Forms.Integration.ElementHost();
+      this.avalonEditWrapper = new HeuristicLab.CodeEditor.AvalonEditWrapper();
+      this.SuspendLayout();
+      // 
+      // elementHost
+      // 
+      this.elementHost.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.elementHost.Location = new System.Drawing.Point(0, 0);
+      this.elementHost.Name = "elementHost";
+      this.elementHost.Size = new System.Drawing.Size(150, 150);
+      this.elementHost.TabIndex = 0;
+      this.elementHost.Child = this.avalonEditWrapper;
+      // 
+      // CodeEditor
+      // 
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.elementHost);
+      this.Name = "CodeEditor";
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Integration.ElementHost elementHost;
+    private AvalonEditWrapper avalonEditWrapper;
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/CodeEditor.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/CodeEditor.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/CodeEditor.cs	(revision 11937)
@@ -0,0 +1,493 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Reflection;
+using System.Threading.Tasks;
+using System.Windows.Documents;
+using HeuristicLab.Common;
+using ICSharpCode.AvalonEdit;
+using ICSharpCode.AvalonEdit.AddIn;
+using ICSharpCode.AvalonEdit.CodeCompletion;
+using ICSharpCode.AvalonEdit.Document;
+using ICSharpCode.AvalonEdit.Editing;
+using ICSharpCode.AvalonEdit.Highlighting;
+using ICSharpCode.AvalonEdit.Indentation.CSharp;
+using ICSharpCode.AvalonEdit.Search;
+using ICSharpCode.NRefactory.Editor;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.SharpDevelop.Editor;
+using Forms = System.Windows.Forms;
+using Input = System.Windows.Input;
+using Media = System.Windows.Media;
+
+namespace HeuristicLab.CodeEditor {
+  public partial class CodeEditor : Forms.UserControl {
+    private static readonly Media.Color WarningColor = Media.Colors.Blue;
+    private static readonly Media.Color ErrorColor = Media.Colors.Red;
+    private static readonly Media.Color ReadOnlyColor = Media.Colors.Moccasin;
+
+    private const string DefaultDocumentFileName = "Document";
+    private const string DefaultTextEditorSyntaxHighlighting = "C#";
+    private const string DefaultTextEditorFontFamily = "Consolas";
+    private const double DefaultTextEditorFontSize = 13.0;
+    private const bool DefaultTextEditorShowLineNumbers = true;
+    private const bool DefaultTextEditorShowSpaces = true;
+    private const bool DefaultTextEditorShowTabs = true;
+    private const bool DefaultTextEditorConvertTabsToSpaces = true;
+    private const bool DefaultTextEditorHighlightCurrentLine = true;
+    private const int DefaultTextEditorIndentationSize = 2;
+
+    private AssemblyLoader assemblyLoader;
+    private TextMarkerService textMarkerService;
+
+    #region Properties
+    internal TextEditor TextEditor { get { return avalonEditWrapper.TextEditor; } }
+    internal Input.RoutedCommand CompletionCommand;
+    internal CompletionWindow CompletionWindow;
+    internal OverloadInsightWindow OverloadInsightWindow;
+
+    private TextDocument Doc { get { return TextEditor.Document; } }
+
+    private ITextMarker prefixMarker;
+    private string prefix = string.Empty;
+    public string Prefix {
+      get { return prefix; }
+      set {
+        if (value == null) value = string.Empty;
+        if (prefix == value) return;
+        if (prefixMarker != null) prefixMarker.Delete();
+        Doc.Remove(0, prefix.Length);
+        prefix = value;
+        if (value.Length > 0) {
+          Doc.Insert(0, prefix);
+          prefixMarker = textMarkerService.Create(0, prefix.Length);
+          prefixMarker.BackgroundColor = ReadOnlyColor;
+        }
+      }
+    }
+
+    private ITextMarker suffixMarker;
+    private string suffix = string.Empty;
+    public string Suffix {
+      get { return suffix; }
+      set {
+        if (value == null) value = string.Empty;
+        if (suffix == value) return;
+        if (suffixMarker != null) suffixMarker.Delete();
+        Doc.Remove(Doc.TextLength - suffix.Length, suffix.Length);
+        suffix = value;
+        if (value.Length > 0) {
+          int offset = Doc.TextLength;
+          Doc.Insert(offset, suffix);
+          suffixMarker = textMarkerService.Create(offset, suffix.Length);
+          suffixMarker.BackgroundColor = ReadOnlyColor;
+        }
+      }
+    }
+
+    public string UserCode {
+      get { return Doc.GetText(prefix.Length, Doc.TextLength - suffix.Length - prefix.Length); }
+      set {
+        if (Doc.Text == value) return;
+        Doc.Replace(prefix.Length, Doc.TextLength - suffix.Length - prefix.Length, value);
+      }
+    }
+
+    #region TextEditor
+    [DefaultValue(DefaultTextEditorSyntaxHighlighting)]
+    public string TextEditorSyntaxHighlighting {
+      get { return TextEditor.SyntaxHighlighting.Name; }
+      set {
+        TextEditor.SyntaxHighlighting = HighlightingManager.Instance.GetDefinition(value);
+        ApplyLanguageFeatures();
+      }
+    }
+
+    [DefaultValue(DefaultTextEditorShowLineNumbers)]
+    public bool TextEditorShowLineNumbers {
+      get { return TextEditor.ShowLineNumbers; }
+      set { TextEditor.ShowLineNumbers = value; }
+    }
+
+    [DefaultValue(DefaultTextEditorShowSpaces)]
+    public bool TextEditorShowSpaces {
+      get { return TextEditor.Options.ShowSpaces; }
+      set { TextEditor.Options.ShowSpaces = value; }
+    }
+
+    [DefaultValue(DefaultTextEditorShowTabs)]
+    public bool TextEditorShowTabs {
+      get { return TextEditor.Options.ShowTabs; }
+      set { TextEditor.Options.ShowTabs = value; }
+    }
+
+    [DefaultValue(DefaultTextEditorConvertTabsToSpaces)]
+    public bool TextEditorConvertTabsToSpaces {
+      get { return TextEditor.Options.ConvertTabsToSpaces; }
+      set { TextEditor.Options.ConvertTabsToSpaces = value; }
+    }
+
+    [DefaultValue(DefaultTextEditorHighlightCurrentLine)]
+    public bool TextEditorHighlightCurrentLine {
+      get { return TextEditor.Options.HighlightCurrentLine; }
+      set { TextEditor.Options.HighlightCurrentLine = value; }
+    }
+
+    [DefaultValue(DefaultTextEditorIndentationSize)]
+    public int TextEditorIndentationSize {
+      get { return TextEditor.Options.IndentationSize; }
+      set { TextEditor.Options.IndentationSize = value; }
+    }
+    #endregion
+
+    public bool ReadOnly {
+      get { return TextEditor.IsReadOnly; }
+      set { TextEditor.IsReadOnly = value; }
+    }
+    #endregion
+
+    public CodeEditor() {
+      InitializeComponent();
+      InitializeTextEditor();
+    }
+
+    private void InitializeTextEditor() {
+      #region AssemblyLoader
+      assemblyLoader = new AssemblyLoader();
+      assemblyLoader.AssembliesLoading += (sender, args) => OnAssembliesLoading(args.Value);
+      assemblyLoader.InternalAssembliesLoaded += (sender, args) => OnInternalAssembliesLoaded(args.Value);
+      assemblyLoader.AssembliesLoaded += (sender, args) => OnAssembliesLoaded(args.Value);
+      assemblyLoader.AssembliesUnloading += (sender, args) => OnAssembliesUnloading(args.Value);
+      assemblyLoader.InternalAssembliesUnloaded += (sender, args) => OnInternalAssembliesUnloaded(args.Value);
+      assemblyLoader.AssembliesUnloaded += (sender, args) => OnAssembliesUnloaded(args.Value);
+      #endregion
+
+      #region TextMarkerService
+      textMarkerService = new TextMarkerService(TextEditor.Document);
+      TextEditor.TextArea.TextView.BackgroundRenderers.Add(textMarkerService);
+      TextEditor.TextArea.TextView.LineTransformers.Add(textMarkerService);
+      TextEditor.TextArea.TextView.Services.AddService(typeof(ITextMarkerService), textMarkerService);
+      #endregion
+
+      #region ReadOnlySectionProvider
+      TextEditor.TextArea.ReadOnlySectionProvider = new MethodDefinitionReadOnlySectionProvider(this);
+      #endregion
+
+      #region SearchPanel
+      SearchPanel.Install(TextEditor);
+      #endregion
+
+      #region CompletionCommand
+      CompletionCommand = new Input.RoutedCommand();
+      CompletionCommand.InputGestures.Add(new Input.KeyGesture(Input.Key.Space, Input.ModifierKeys.Control));
+      #endregion
+
+      #region MoveLinesUpCommand
+      var moveLinesUpCommand = new Input.RoutedCommand();
+      moveLinesUpCommand.InputGestures.Add(new Input.KeyGesture(Input.Key.Up, Input.ModifierKeys.Alt));
+      var moveLinesUpCommandBinding = new Input.CommandBinding(moveLinesUpCommand, (sender, args) => ExecuteMoveLinesCommand(MovementDirection.Up));
+      TextEditor.CommandBindings.Add(moveLinesUpCommandBinding);
+      #endregion
+
+      #region MoveLinesDownCommand
+      var moveLinesDownCommand = new Input.RoutedCommand();
+      moveLinesDownCommand.InputGestures.Add(new Input.KeyGesture(Input.Key.Down, Input.ModifierKeys.Alt));
+      var moveLinesDownCommandBinding = new Input.CommandBinding(moveLinesDownCommand, (sender, args) => ExecuteMoveLinesCommand(MovementDirection.Down));
+      TextEditor.CommandBindings.Add(moveLinesDownCommandBinding);
+      #endregion
+
+      #region GoToLineCommand
+      var goToLineCommand = new Input.RoutedCommand();
+      goToLineCommand.InputGestures.Add(new Input.KeyGesture(Input.Key.G, Input.ModifierKeys.Control));
+      var goToLineCommandBinding = new Input.CommandBinding(goToLineCommand, (sender, args) => ExecuteGoToLineCommand());
+      TextEditor.CommandBindings.Add(goToLineCommandBinding);
+      #endregion
+
+      TextEditorSyntaxHighlighting = DefaultTextEditorSyntaxHighlighting;
+      TextEditorShowLineNumbers = DefaultTextEditorShowLineNumbers;
+      TextEditorShowSpaces = DefaultTextEditorShowSpaces;
+      TextEditorShowTabs = DefaultTextEditorShowTabs;
+      TextEditorConvertTabsToSpaces = DefaultTextEditorConvertTabsToSpaces;
+      TextEditorHighlightCurrentLine = DefaultTextEditorHighlightCurrentLine;
+      TextEditorIndentationSize = DefaultTextEditorIndentationSize;
+
+      Doc.FileName = DefaultDocumentFileName;
+
+      TextEditor.FontFamily = new Media.FontFamily(DefaultTextEditorFontFamily);
+      TextEditor.FontSize = DefaultTextEditorFontSize;
+      TextEditor.Options.EnableVirtualSpace = true;
+      TextEditor.TextArea.IndentationStrategy = new CSharpIndentationStrategy(TextEditor.Options);
+
+      TextEditor.TextChanged += (sender, args) => {
+        foreach (var marker in textMarkerService.TextMarkers) {
+          if (marker == prefixMarker || marker == suffixMarker) continue;
+          if (marker.Length != (int)marker.Tag)
+            marker.Delete();
+          else {
+            int caretOffset = TextEditor.CaretOffset;
+            var line = Doc.GetLineByOffset(marker.StartOffset);
+            int lineEndOffset = line.EndOffset;
+            if (caretOffset == lineEndOffset) // special case for markers beyond line length
+              marker.Delete();
+          }
+        }
+        OnTextEditorTextChanged();
+      };
+    }
+
+    #region Assembly Management
+    public void AddAssembly(Assembly a) {
+      assemblyLoader.AddAssembly(a);
+    }
+
+    public void AddAssemblies(IEnumerable<Assembly> assemblies) {
+      assemblyLoader.AddAssemblies(assemblies);
+    }
+
+    public async Task AddAssembliesAsync(IEnumerable<Assembly> assemblies) {
+      await assemblyLoader.AddAssembliesAsync(assemblies);
+    }
+
+    public void RemoveAssembly(Assembly a) {
+      assemblyLoader.RemoveAssembly(a);
+    }
+    #endregion
+
+    public void ScrollToPosition(int line, int column) {
+      var segment = GetSegmentAtLocation(line, column);
+      TextEditor.CaretOffset = segment.Offset + segment.Length;
+      TextEditor.ScrollToLine(line);
+    }
+
+    public void ScrollAfterPrefix() {
+      var location = Doc.GetLocation(prefix.Length);
+      ScrollToPosition(location.Line, location.Column);
+    }
+
+    private enum MovementDirection { Up, Down }
+    private void ExecuteMoveLinesCommand(MovementDirection movementDirection) {
+      var textArea = TextEditor.TextArea;
+      var selection = textArea.Selection;
+      var caret = textArea.Caret;
+
+      var selectionStartPosition = selection.StartPosition;
+      var selectionEndPosition = selection.EndPosition;
+      var caretPosition = caret.Position;
+      int caretOffset = caret.Offset;
+
+      bool advancedPositionCalcualtion = selection is RectangleSelection || !selection.IsEmpty;
+
+      int selectionStartOffset, selectionEndOffset;
+      if (advancedPositionCalcualtion) {
+        if (selectionStartPosition.CompareTo(selectionEndPosition) > 0) {
+          var temp = selectionStartPosition;
+          selectionStartPosition = selectionEndPosition;
+          selectionEndPosition = temp;
+        }
+        selectionStartOffset = Doc.GetOffset(selectionStartPosition.Location);
+        selectionEndOffset = Doc.GetOffset(selectionEndPosition.Location);
+      } else {
+        selectionStartOffset = selectionEndOffset = TextEditor.SelectionStart;
+      }
+
+      int selectionLength = selection.Length;
+
+      var startLine = Doc.GetLineByOffset(selectionStartOffset);
+      var endLine = Doc.GetLineByOffset(selectionEndOffset);
+
+      if (selection.IsMultiline && selectionEndOffset == endLine.Offset) {
+        if (movementDirection == MovementDirection.Down && endLine.TotalLength == 0) return;
+        endLine = endLine.PreviousLine;
+      }
+
+      if (movementDirection == MovementDirection.Up && startLine.LineNumber == 1) return;
+      if (movementDirection == MovementDirection.Down && endLine.LineNumber == Doc.LineCount) return;
+
+      int startOffset = startLine.Offset;
+      string primaryText = Doc.GetText(startOffset, endLine.EndOffset - startOffset);
+      string primaryDelimiter = Doc.GetText(endLine.EndOffset, endLine.DelimiterLength);
+
+      var secondaryLine = movementDirection == MovementDirection.Up ? startLine.PreviousLine : endLine.NextLine;
+      string secondaryText = Doc.GetText(secondaryLine.Offset, secondaryLine.Length);
+      string secondaryDelimiter = Doc.GetText(secondaryLine.EndOffset, secondaryLine.DelimiterLength);
+
+      if (string.IsNullOrEmpty(primaryText + primaryDelimiter) || string.IsNullOrEmpty(secondaryText + secondaryDelimiter)) return;
+
+      if (movementDirection == MovementDirection.Up) {
+        string replacementText = primaryText + secondaryDelimiter + secondaryText + primaryDelimiter;
+        Doc.Replace(secondaryLine.Offset, replacementText.Length, replacementText);
+        int correctionLength = secondaryText.Length + secondaryDelimiter.Length;
+        selectionStartOffset -= correctionLength;
+        caretOffset -= correctionLength;
+      } else {
+        string replacementText = secondaryText + primaryDelimiter + primaryText + secondaryDelimiter;
+        Doc.Replace(startLine.Offset, replacementText.Length, replacementText);
+        int correctionLength = secondaryText.Length + primaryDelimiter.Length;
+        selectionStartOffset += correctionLength;
+        caretOffset += correctionLength;
+      }
+
+      if (advancedPositionCalcualtion) {
+        var newSelectionStartLocation = Doc.GetLocation(selectionStartOffset);
+        int selectionLineOffset = newSelectionStartLocation.Line - Math.Min(selectionStartPosition.Line, selectionEndPosition.Line);
+        selectionStartPosition.Line += selectionLineOffset;
+        selectionEndPosition.Line += selectionLineOffset;
+        if (selectionEndPosition.Line > Doc.LineCount) {
+          var newLocation = Doc.GetLocation(Doc.TextLength);
+          selectionEndPosition.Line = newLocation.Line;
+          selectionEndPosition.Column = newLocation.Column;
+          selectionEndPosition.VisualColumn = newLocation.Column - 1;
+          selectionEndPosition.IsAtEndOfLine = selectionStartPosition.IsAtEndOfLine; // actual value does not matter; needed for comparison
+        }
+
+        if (selectionStartPosition == selectionEndPosition)
+          textArea.ClearSelection();
+        else {
+          if (selection is RectangleSelection)
+            textArea.Selection = new RectangleSelection(textArea, selectionStartPosition, selectionEndPosition);
+          else
+            textArea.Selection = new SimpleSelection(textArea, selectionStartPosition, selectionEndPosition);
+        }
+      } else {
+        TextEditor.SelectionStart = selectionStartOffset;
+        TextEditor.SelectionLength = selectionLength;
+      }
+
+      var newCaretLocation = Doc.GetLocation(Math.Min(caretOffset, Doc.TextLength));
+      var newCaretPosition = new TextViewPosition(newCaretLocation);
+      if (caretPosition.VisualColumn > caretPosition.Column) {
+        newCaretPosition.VisualColumn = caretPosition.VisualColumn;
+      }
+      caret.Position = newCaretPosition;
+    }
+
+    private void ExecuteGoToLineCommand() {
+      using (var dlg = new GoToLineDialog(TextEditor)) {
+        var result = dlg.ShowDialog(this);
+        if (result == Forms.DialogResult.OK) {
+          int lineNumber = dlg.Line;
+          var line = Doc.GetLineByNumber(lineNumber);
+          int offset = line.Offset;
+          if (TextUtilities.GetLeadingWhitespace(Doc, line).Length > 0)
+            offset = TextUtilities.GetNextCaretPosition(Doc, offset, LogicalDirection.Forward, CaretPositioningMode.WordBorder);
+          TextEditor.CaretOffset = offset;
+        }
+      }
+    }
+
+    #region Compiler Errors
+    public void ShowCompileErrors(CompilerErrorCollection compilerErrors) {
+      if (compilerErrors == null) return;
+
+      textMarkerService.RemoveAll(x => x != prefixMarker && x != suffixMarker);
+
+      foreach (CompilerError error in compilerErrors) {
+        var startLocation = Doc.GetLocation(prefix.Length);
+        if (error.Line == 1) error.Column += startLocation.Column;
+        error.Line += startLocation.Line;
+        AddErrorMarker(error);
+      }
+    }
+
+    private void AddErrorMarker(CompilerError error) {
+      var segment = GetSegmentAtLocation(error.Line, error.Column);
+      var marker = textMarkerService.Create(segment.Offset, segment.Length);
+      marker.MarkerTypes = TextMarkerTypes.SquigglyUnderline;
+      marker.MarkerColor = error.IsWarning ? WarningColor : ErrorColor;
+      marker.Tag = segment.Length;
+    }
+
+    private ISegment GetSegmentAtLocation(int line, int column) {
+      line = Math.Max(Doc.GetLocation(prefix.Length).Line, line - 1);
+      line = Math.Min(Doc.GetLocation(Doc.TextLength - suffix.Length).Line, line);
+
+      var startOffset = Doc.GetOffset(line, column);
+      var lineEndOffset = Doc.GetLineByNumber(line).EndOffset;
+      var endOffset = TextUtilities.GetNextCaretPosition(Doc, startOffset, LogicalDirection.Forward, CaretPositioningMode.WordBorder);
+      if (endOffset < 0) endOffset = startOffset;
+      endOffset = Math.Min(lineEndOffset + 1, endOffset);
+
+      var segment = new TextSegment { StartOffset = startOffset, EndOffset = endOffset };
+
+      return segment;
+    }
+    #endregion
+
+    private void ApplyLanguageFeatures() {
+      switch (TextEditorSyntaxHighlighting) {
+        case "XML":
+          XmlLanguageFeatures.Apply(this);
+          break;
+        default:
+          CSharpLanguageFeatures.Apply(this);
+          break;
+      }
+    }
+
+    #region Events
+    public event EventHandler TextEditorTextChanged;
+    private void OnTextEditorTextChanged() {
+      var handler = TextEditorTextChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    public event EventHandler<EventArgs<IEnumerable<Assembly>>> AssembliesLoading;
+    private void OnAssembliesLoading(IEnumerable<Assembly> args) {
+      var handler = AssembliesLoading;
+      if (handler != null) handler(this, new EventArgs<IEnumerable<Assembly>>(args));
+    }
+
+    public event EventHandler<EventArgs<IEnumerable<Assembly>>> AssembliesLoaded;
+    private void OnAssembliesLoaded(IEnumerable<Assembly> args) {
+      var handler = AssembliesLoaded;
+      if (handler != null) handler(this, new EventArgs<IEnumerable<Assembly>>(args));
+    }
+
+    public event EventHandler<EventArgs<IEnumerable<IUnresolvedAssembly>>> InternalAssembliesLoaded;
+    private void OnInternalAssembliesLoaded(IEnumerable<IUnresolvedAssembly> args) {
+      var handler = InternalAssembliesLoaded;
+      if (handler != null) handler(this, new EventArgs<IEnumerable<IUnresolvedAssembly>>(args));
+    }
+
+    public event EventHandler<EventArgs<IEnumerable<Assembly>>> AssembliesUnloading;
+    private void OnAssembliesUnloading(IEnumerable<Assembly> args) {
+      var handler = AssembliesUnloading;
+      if (handler != null) handler(this, new EventArgs<IEnumerable<Assembly>>(args));
+    }
+
+    public event EventHandler<EventArgs<IEnumerable<Assembly>>> AssembliesUnloaded;
+    private void OnAssembliesUnloaded(IEnumerable<Assembly> args) {
+      var handler = AssembliesUnloaded;
+      if (handler != null) handler(this, new EventArgs<IEnumerable<Assembly>>(args));
+    }
+
+    public event EventHandler<EventArgs<IEnumerable<IUnresolvedAssembly>>> InternalAssembliesUnloaded;
+    private void OnInternalAssembliesUnloaded(IEnumerable<IUnresolvedAssembly> args) {
+      var handler = InternalAssembliesUnloaded;
+      if (handler != null) handler(this, new EventArgs<IEnumerable<IUnresolvedAssembly>>(args));
+    }
+    #endregion
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/CodeViewer.Designer.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/CodeViewer.Designer.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/CodeViewer.Designer.cs	(revision 11937)
@@ -0,0 +1,72 @@
+﻿namespace HeuristicLab.CodeEditor {
+  partial class CodeViewer {
+    /// <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.okButton = new System.Windows.Forms.Button();
+      this.elementHost = new System.Windows.Forms.Integration.ElementHost();
+      this.avalonEditWrapper = new HeuristicLab.CodeEditor.AvalonEditWrapper();
+      this.SuspendLayout();
+      // 
+      // okButton
+      // 
+      this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.okButton.Location = new System.Drawing.Point(647, 426);
+      this.okButton.Name = "okButton";
+      this.okButton.Size = new System.Drawing.Size(75, 23);
+      this.okButton.TabIndex = 0;
+      this.okButton.Text = "OK";
+      this.okButton.UseVisualStyleBackColor = true;
+      this.okButton.Click += new System.EventHandler(this.okButton_Click);
+      // 
+      // elementHost
+      // 
+      this.elementHost.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.elementHost.Location = new System.Drawing.Point(12, 12);
+      this.elementHost.Name = "elementHost";
+      this.elementHost.Size = new System.Drawing.Size(710, 408);
+      this.elementHost.TabIndex = 1;
+      this.elementHost.Child = this.avalonEditWrapper;
+      // 
+      // CodeViewer
+      // 
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.ClientSize = new System.Drawing.Size(734, 461);
+      this.Controls.Add(this.elementHost);
+      this.Controls.Add(this.okButton);
+      this.Icon = HeuristicLab.Common.Resources.HeuristicLab.Icon;
+      this.Name = "CodeViewer";
+      this.Text = "CodeViewer";
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Button okButton;
+    private System.Windows.Forms.Integration.ElementHost elementHost;
+    private AvalonEditWrapper avalonEditWrapper;
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/CodeViewer.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/CodeViewer.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/CodeViewer.cs	(revision 11937)
@@ -0,0 +1,63 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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 System.Windows.Media;
+using ICSharpCode.AvalonEdit;
+using ICSharpCode.AvalonEdit.Highlighting;
+
+namespace HeuristicLab.CodeEditor {
+  public partial class CodeViewer : Form {
+    private const string DefaultTextEditorSyntaxHighlighting = "C#";
+    private const string DefaultTextEditorFontFamily = "Consolas";
+    private const double DefaultTextEditorFontSize = 13.0;
+    private const bool DefaultTextEditorShowLineNumbers = true;
+    private const bool DefaultTextEditorShowEndOfLine = true;
+    private const bool DefaultTextEditorShowSpaces = true;
+    private const bool DefaultTextEditorShowTabs = true;
+    private const bool DefaultTextEditorConvertTabsToSpaces = true;
+
+    private TextEditor TextEditor { get { return avalonEditWrapper.TextEditor; } }
+
+    public CodeViewer() {
+      InitializeComponent();
+      TextEditor.IsReadOnly = true;
+      TextEditor.SyntaxHighlighting = HighlightingManager.Instance.GetDefinition(DefaultTextEditorSyntaxHighlighting);
+      TextEditor.FontFamily = new FontFamily(DefaultTextEditorFontFamily);
+      TextEditor.FontSize = DefaultTextEditorFontSize;
+      TextEditor.ShowLineNumbers = DefaultTextEditorShowLineNumbers;
+      TextEditor.Options.ShowEndOfLine = DefaultTextEditorShowEndOfLine;
+      TextEditor.Options.ShowSpaces = DefaultTextEditorShowSpaces;
+      TextEditor.Options.ShowTabs = DefaultTextEditorShowTabs;
+      TextEditor.Options.ConvertTabsToSpaces = DefaultTextEditorConvertTabsToSpaces;
+    }
+
+    public CodeViewer(string code)
+      : this() {
+      TextEditor.Text = code;
+    }
+
+    private void okButton_Click(object sender, EventArgs e) {
+      Close();
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/GoToLineDialog.Designer.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/GoToLineDialog.Designer.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/GoToLineDialog.Designer.cs	(revision 11937)
@@ -0,0 +1,113 @@
+﻿namespace HeuristicLab.CodeEditor {
+  partial class GoToLineDialog {
+    /// <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();
+      this.cancelButton = new System.Windows.Forms.Button();
+      this.okButton = new System.Windows.Forms.Button();
+      this.lineNumberLabel = new System.Windows.Forms.Label();
+      this.lineNumberTextBox = new System.Windows.Forms.TextBox();
+      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // 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(156, 51);
+      this.cancelButton.Name = "cancelButton";
+      this.cancelButton.Size = new System.Drawing.Size(75, 23);
+      this.cancelButton.TabIndex = 2;
+      this.cancelButton.Text = "&Cancel";
+      this.cancelButton.UseVisualStyleBackColor = true;
+      // 
+      // okButton
+      // 
+      this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
+      this.okButton.Enabled = false;
+      this.okButton.Location = new System.Drawing.Point(75, 51);
+      this.okButton.Name = "okButton";
+      this.okButton.Size = new System.Drawing.Size(75, 23);
+      this.okButton.TabIndex = 1;
+      this.okButton.Text = "&OK";
+      this.okButton.UseVisualStyleBackColor = true;
+      // 
+      // lineNumberLabel
+      // 
+      this.lineNumberLabel.AutoSize = true;
+      this.lineNumberLabel.Location = new System.Drawing.Point(12, 9);
+      this.lineNumberLabel.Name = "lineNumberLabel";
+      this.lineNumberLabel.Size = new System.Drawing.Size(94, 13);
+      this.lineNumberLabel.TabIndex = 3;
+      this.lineNumberLabel.Text = "Line Number (1-1):";
+      // 
+      // lineNumberTextBox
+      // 
+      this.lineNumberTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.lineNumberTextBox.Location = new System.Drawing.Point(15, 25);
+      this.lineNumberTextBox.Name = "lineNumberTextBox";
+      this.lineNumberTextBox.Size = new System.Drawing.Size(212, 20);
+      this.lineNumberTextBox.TabIndex = 0;
+      this.lineNumberTextBox.TextChanged += new System.EventHandler(this.lineNumberTextBox_TextChanged);
+      // 
+      // errorProvider
+      // 
+      this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
+      this.errorProvider.ContainerControl = this;
+      // 
+      // GoToLineDialog
+      // 
+      this.AcceptButton = this.okButton;
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.CancelButton = this.cancelButton;
+      this.ClientSize = new System.Drawing.Size(243, 86);
+      this.Controls.Add(this.lineNumberTextBox);
+      this.Controls.Add(this.lineNumberLabel);
+      this.Controls.Add(this.cancelButton);
+      this.Controls.Add(this.okButton);
+      this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+      this.MaximizeBox = false;
+      this.MinimizeBox = false;
+      this.Name = "GoToLineDialog";
+      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+      this.Text = "Go To Line";
+      this.Load += new System.EventHandler(this.GoToLineDialog_Load);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Button cancelButton;
+    private System.Windows.Forms.Button okButton;
+    private System.Windows.Forms.Label lineNumberLabel;
+    private System.Windows.Forms.TextBox lineNumberTextBox;
+    private System.Windows.Forms.ErrorProvider errorProvider;
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/GoToLineDialog.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/GoToLineDialog.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/GoToLineDialog.cs	(revision 11937)
@@ -0,0 +1,59 @@
+﻿#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 ICSharpCode.AvalonEdit;
+
+namespace HeuristicLab.CodeEditor {
+  internal partial class GoToLineDialog : Form {
+    private readonly TextEditor textEditor;
+    private readonly int lowerLimit, upperLimit;
+
+    public int Line { get; set; }
+
+    public GoToLineDialog(TextEditor textEditor) {
+      InitializeComponent();
+      this.textEditor = textEditor;
+      lowerLimit = 1;
+      upperLimit = textEditor.LineCount;
+      lineNumberLabel.Text = string.Format("Line Number ({0}-{1}):", lowerLimit, upperLimit);
+    }
+
+    private void GoToLineDialog_Load(object sender, EventArgs e) {
+      var caret = textEditor.TextArea.Caret;
+      lineNumberTextBox.Text = caret.Line.ToString();
+      lineNumberTextBox.SelectAll();
+    }
+
+    private void lineNumberTextBox_TextChanged(object sender, EventArgs e) {
+      int line;
+      if (!int.TryParse(lineNumberTextBox.Text, out line) || line < lowerLimit || line > upperLimit) {
+        errorProvider.SetError(lineNumberTextBox, string.Format("Value must be an integer in the range [{0},{1}].", lowerLimit, upperLimit));
+        okButton.Enabled = false;
+      } else {
+        errorProvider.SetError(lineNumberTextBox, null);
+        okButton.Enabled = true;
+      }
+      Line = line;
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/HeuristicLab.CodeEditor-3.4.csproj
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/HeuristicLab.CodeEditor-3.4.csproj	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/HeuristicLab.CodeEditor-3.4.csproj	(revision 11937)
@@ -0,0 +1,251 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{C38691AE-ECB4-489A-A05D-B035554E0168}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.CodeEditor</RootNamespace>
+    <AssemblyName>HeuristicLab.CodeEditor-3.4</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <DocumentationFile>
+    </DocumentationFile>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <DocumentationFile>
+    </DocumentationFile>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <DocumentationFile>
+    </DocumentationFile>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ICSharpCode.AvalonEdit, Version=5.0.1.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\bin\ICSharpCode.AvalonEdit.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="ICSharpCode.NRefactory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\bin\ICSharpCode.NRefactory.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="ICSharpCode.NRefactory.Cecil, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\bin\ICSharpCode.NRefactory.Cecil.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="ICSharpCode.NRefactory.CSharp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\bin\ICSharpCode.NRefactory.CSharp.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="ICSharpCode.NRefactory.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\bin\ICSharpCode.NRefactory.Xml.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xaml" />
+    <Reference Include="System.Xml" />
+    <Reference Include="WindowsBase" />
+    <Reference Include="WindowsFormsIntegration" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="AssemblyLoader.cs" />
+    <Compile Include="CodeViewer.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="CodeViewer.Designer.cs">
+      <DependentUpon>CodeViewer.cs</DependentUpon>
+    </Compile>
+    <Compile Include="GoToLineDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="GoToLineDialog.Designer.cs">
+      <DependentUpon>GoToLineDialog.cs</DependentUpon>
+    </Compile>
+    <Compile Include="LanguageFeatures\CodeFolding\CodeFoldingResult.cs" />
+    <Compile Include="LanguageFeatures\CodeFolding\CodeFoldingStrategy.cs" />
+    <Compile Include="LanguageFeatures\CodeFolding\CSharp\CSharpCodeFoldingContext.cs" />
+    <Compile Include="LanguageFeatures\CodeFolding\CSharp\CSharpCodeFoldingStrategy.cs" />
+    <Compile Include="LanguageFeatures\CodeFolding\CSharp\FoldingVisitor.cs" />
+    <Compile Include="LanguageFeatures\CodeFolding\XML\XmlCodeFoldingStrategy.cs" />
+    <Compile Include="ITextMarker.cs" />
+    <Compile Include="LanguageFeatures\CodeCompletion\CodeCompletionResult.cs" />
+    <Compile Include="LanguageFeatures\CodeCompletion\CodeCompletionStrategy.cs" />
+    <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\CompletionImage.cs" />
+    <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CSharpInsightItem.cs" />
+    <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CSharpOverloadProvider.cs" />
+    <Compile Include="LanguageFeatures\Interfaces\IUpdatableOverloadProvider.cs" />
+    <Compile Include="LanguageFeatures\Interfaces\ICodeCompletionStrategy.cs" />
+    <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\CodeCompletionData.cs" />
+    <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CSharpCodeCompletionStrategy.cs" />
+    <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CSharpDocumentationBuilder.cs" />
+    <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CSharpCodeCompletionContext.cs" />
+    <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CSharpCodeCompletionDataFactory.cs" />
+    <Compile Include="LanguageFeatures\Helpers\CSharpParsingHelpers.cs" />
+    <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\EntityCompletionData.cs" />
+    <Compile Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\VariableCompletionData.cs" />
+    <Compile Include="LanguageFeatures\Interfaces\ICodeFoldingStrategy.cs" />
+    <Compile Include="LanguageFeatures\LanguageFeatures.cs" />
+    <Compile Include="MethodDefinitionReadOnlySectionProvider.cs" />
+    <Compile Include="TextMarkerService.cs" />
+    <Compile Include="LanguageFeatures\XmlLanguageFeatures.cs" />
+    <None Include="HeuristicLab.snk" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+    <None Include="Plugin.cs.frame" />
+    <Compile Include="CodeEditor.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="CodeEditor.Designer.cs">
+      <DependentUpon>CodeEditor.cs</DependentUpon>
+    </Compile>
+    <Compile Include="AvalonEditWrapper.xaml.cs">
+      <DependentUpon>AvalonEditWrapper.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="LanguageFeatures\CSharpLanguageFeatures.cs" />
+    <Compile Include="LanguageFeatures\Interfaces\ILanguageFeatures.cs" />
+    <Compile Include="Plugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0e27a536-1c4a-4624-a65e-dc4f4f23e3e1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{a9ad58b9-3ef9-4cc1-97e5-8d909039ff5c}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186a6a-5176-4402-ae83-886557b53cca}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Page Include="AvalonEditWrapper.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+  </ItemGroup>
+  <ItemGroup>
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\Class.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\Constructor.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\Delegate.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\Enum.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\EnumValue.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\Event.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\ExtensionMethod.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\Field.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\FieldReadOnly.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\Indexer.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\Interface.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\Literal.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\Method.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\NameSpace.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\Operator.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\OverlayInternal.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\OverlayPrivate.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\OverlayProtected.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\OverlayProtectedInternal.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\OverlayStatic.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\PInvokeMethod.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\Property.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\StaticClass.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\Struct.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\Template.png" />
+    <Resource Include="LanguageFeatures\CodeCompletion\CSharp\CompletionData\Images\VirtualMethod.png" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+</PreBuildEvent>
+  </PropertyGroup>
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: stable/HeuristicLab.CodeEditor/3.4/ITextMarker.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/ITextMarker.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/ITextMarker.cs	(revision 11937)
@@ -0,0 +1,185 @@
+﻿#region License Information
+// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+// to whom the Software is furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Windows;
+using System.Windows.Media;
+
+namespace ICSharpCode.SharpDevelop.Editor {
+  /// <summary>
+  /// Represents a text marker.
+  /// </summary>
+  public interface ITextMarker {
+    /// <summary>
+    /// Gets the start offset of the marked text region.
+    /// </summary>
+    int StartOffset { get; }
+
+    /// <summary>
+    /// Gets the end offset of the marked text region.
+    /// </summary>
+    int EndOffset { get; }
+
+    /// <summary>
+    /// Gets the length of the marked region.
+    /// </summary>
+    int Length { get; }
+
+    /// <summary>
+    /// Deletes the text marker.
+    /// </summary>
+    void Delete();
+
+    /// <summary>
+    /// Gets whether the text marker was deleted.
+    /// </summary>
+    bool IsDeleted { get; }
+
+    /// <summary>
+    /// Event that occurs when the text marker is deleted.
+    /// </summary>
+    event EventHandler Deleted;
+
+    /// <summary>
+    /// Gets/Sets the background color.
+    /// </summary>
+    Color? BackgroundColor { get; set; }
+
+    /// <summary>
+    /// Gets/Sets the foreground color.
+    /// </summary>
+    Color? ForegroundColor { get; set; }
+
+    /// <summary>
+    /// Gets/Sets the font weight.
+    /// </summary>
+    FontWeight? FontWeight { get; set; }
+
+    /// <summary>
+    /// Gets/Sets the font style.
+    /// </summary>
+    FontStyle? FontStyle { get; set; }
+
+    /// <summary>
+    /// Gets/Sets the type of the marker. Use TextMarkerType.None for normal markers.
+    /// </summary>
+    TextMarkerTypes MarkerTypes { get; set; }
+
+    /// <summary>
+    /// Gets/Sets the color of the marker.
+    /// </summary>
+    Color MarkerColor { get; set; }
+
+    /// <summary>
+    /// Gets/Sets an object with additional data for this text marker.
+    /// </summary>
+    object Tag { get; set; }
+
+    /// <summary>
+    /// Gets/Sets an object that will be displayed as tooltip in the text editor.
+    /// </summary>
+    object ToolTip { get; set; }
+  }
+
+  [Flags]
+  public enum TextMarkerTypes {
+    /// <summary>
+    /// Use no marker
+    /// </summary>
+    None = 0x0000,
+    /// <summary>
+    /// Use squiggly underline marker
+    /// </summary>
+    SquigglyUnderline = 0x001,
+    /// <summary>
+    /// Normal underline.
+    /// </summary>
+    NormalUnderline = 0x002,
+    /// <summary>
+    /// Dotted underline.
+    /// </summary>
+    DottedUnderline = 0x004,
+
+    /// <summary>
+    /// Horizontal line in the scroll bar.
+    /// </summary>
+    LineInScrollBar = 0x0100,
+    /// <summary>
+    /// Small triangle in the scroll bar, pointing to the right.
+    /// </summary>
+    ScrollBarRightTriangle = 0x0400,
+    /// <summary>
+    /// Small triangle in the scroll bar, pointing to the left.
+    /// </summary>
+    ScrollBarLeftTriangle = 0x0800,
+    /// <summary>
+    /// Small circle in the scroll bar.
+    /// </summary>
+    CircleInScrollBar = 0x1000
+  }
+
+  public interface ITextMarkerService {
+    /// <summary>
+    /// Creates a new text marker. The text marker will be invisible at first,
+    /// you need to set one of the Color properties to make it visible.
+    /// </summary>
+    ITextMarker Create(int startOffset, int length);
+
+    /// <summary>
+    /// Gets the list of text markers.
+    /// </summary>
+    IEnumerable<ITextMarker> TextMarkers { get; }
+
+    /// <summary>
+    /// Removes the specified text marker.
+    /// </summary>
+    void Remove(ITextMarker marker);
+
+    /// <summary>
+    /// Removes all text markers that match the condition.
+    /// </summary>
+    void RemoveAll(Predicate<ITextMarker> predicate);
+
+    /// <summary>
+    /// Finds all text markers at the specified offset.
+    /// </summary>
+    IEnumerable<ITextMarker> GetMarkersAtOffset(int offset);
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CSharpLanguageFeatures.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CSharpLanguageFeatures.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CSharpLanguageFeatures.cs	(revision 11937)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.CodeEditor {
+  internal class CSharpLanguageFeatures : LanguageFeatures {
+    public CSharpLanguageFeatures(CodeEditor codeEditor)
+      : base(codeEditor, new CSharpCodeFoldingStrategy(codeEditor), new CSharpCodeCompletionStrategy(codeEditor)) {
+    }
+
+    public static ILanguageFeatures Apply(CodeEditor codeEditor) {
+      return new CSharpLanguageFeatures(codeEditor);
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionContext.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionContext.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionContext.cs	(revision 11937)
@@ -0,0 +1,58 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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 ICSharpCode.NRefactory.CSharp.Completion;
+using ICSharpCode.NRefactory.CSharp.TypeSystem;
+using ICSharpCode.NRefactory.Editor;
+using ICSharpCode.NRefactory.TypeSystem;
+
+namespace HeuristicLab.CodeEditor {
+  internal class CSharpCodeCompletionContext {
+    private readonly IDocument document;
+    public IDocument Document { get { return document; } }
+
+    private readonly int offset;
+    public int Offset { get { return offset; } }
+
+    private readonly IProjectContent projectContent;
+    public IProjectContent ProjectContent { get { return projectContent; } }
+
+    private readonly CSharpTypeResolveContext typeResolveContextAtCaret;
+    public CSharpTypeResolveContext TypeResolveContextAtCaret { get { return typeResolveContextAtCaret; } }
+
+    private readonly ICompletionContextProvider completionContextProvider;
+    public ICompletionContextProvider CompletionContextProvider { get { return completionContextProvider; } }
+
+    public CSharpCodeCompletionContext(IDocument document, int offset, IProjectContent projectContent) {
+      this.document = new ReadOnlyDocument(document, document.FileName);
+      this.offset = offset;
+
+      var unresolvedFile = CSharpParsingHelpers.CreateCSharpUnresolvedFile(this.document);
+      this.projectContent = projectContent.AddOrUpdateFiles(unresolvedFile);
+
+      completionContextProvider = new DefaultCompletionContextProvider(this.document, unresolvedFile);
+
+      var compilation = this.projectContent.CreateCompilation();
+      var location = this.document.GetLocation(this.offset);
+      typeResolveContextAtCaret = unresolvedFile.GetTypeResolveContext(compilation, location);
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionDataFactory.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionDataFactory.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionDataFactory.cs	(revision 11937)
@@ -0,0 +1,162 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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 ICSharpCode.AvalonEdit.CodeCompletion;
+using ICSharpCode.NRefactory.Completion;
+using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.CSharp.Completion;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICompletionData = ICSharpCode.NRefactory.Completion.ICompletionData;
+
+namespace HeuristicLab.CodeEditor {
+  internal class CSharpCodeCompletionDataFactory : ICompletionDataFactory, IParameterCompletionDataFactory {
+    private readonly CSharpCodeCompletionContext context;
+
+    public CSharpCodeCompletionDataFactory(CSharpCodeCompletionContext context) {
+      this.context = context;
+    }
+
+    #region ICompletionDataFactory Members
+    public ICompletionData CreateEntityCompletionData(IEntity entity) {
+      return new EntityCompletionData(entity);
+    }
+
+    public ICompletionData CreateEntityCompletionData(IEntity entity, string text) {
+      return new EntityCompletionData(entity) { CompletionText = text, DisplayText = text };
+    }
+
+    public ICompletionData CreateTypeCompletionData(IType type, bool fullName, bool isInAttributeContext, bool addForTypeCreation) {
+      var typeDef = type.GetDefinition();
+      if (typeDef != null) { return new EntityCompletionData(typeDef); }
+
+      string name = fullName ? type.FullName : type.Name;
+      if (isInAttributeContext && name.EndsWith("Attribute", StringComparison.Ordinal) && name.Length > "Attribute".Length) {
+        name = name.Substring(0, name.Length - "Attribute".Length);
+      }
+      return new CompletionData(name);
+    }
+
+    public ICompletionData CreateMemberCompletionData(IType type, IEntity member) {
+      return new EntityCompletionData(member);
+    }
+
+    public ICompletionData CreateLiteralCompletionData(string title, string description = null, string insertText = null) {
+      return new CompletionData(title) {
+        Description = description,
+        CompletionText = insertText ?? title,
+        Image = CompletionImage.Literal.BaseImage,
+        Priority = 2
+      };
+    }
+
+    public ICompletionData CreateXmlDocCompletionData(string title, string description = null, string insertText = null) {
+      return new CompletionData(title) {
+        Description = description,
+        CompletionText = insertText ?? title,
+        Image = CompletionImage.Template.BaseImage,
+      };
+    }
+
+    public ICompletionData CreateNamespaceCompletionData(INamespace ns) {
+      return new CompletionData(ns.Name) { Image = CompletionImage.NamespaceImage };
+    }
+
+    public ICompletionData CreateVariableCompletionData(IVariable variable) {
+      return new VariableCompletionData(variable);
+    }
+
+    public ICompletionData CreateVariableCompletionData(ITypeParameter parameter) {
+      return new CompletionData(parameter.Name);
+    }
+
+    public ICompletionData CreateEventCreationCompletionData(string varName, IType delegateType, IEvent evt, string parameterDefinition, IUnresolvedMember currentMember, IUnresolvedTypeDefinition currentType) {
+      return new CompletionData(varName);
+    }
+
+    public ICompletionData CreateNewOverrideCompletionData(int declarationBegin, IUnresolvedTypeDefinition type, IMember m) {
+      return new CompletionData(m.Name);
+    }
+
+    public ICompletionData CreateNewPartialCompletionData(int declarationBegin, IUnresolvedTypeDefinition type, IUnresolvedMember m) {
+      return new CompletionData(m.Name);
+    }
+
+    public ICompletionData CreateImportCompletionData(IType type, bool useFullName, bool addForTypeCreation) {
+      return null;
+    }
+
+    public IEnumerable<ICompletionData> CreateCodeTemplateCompletionData() {
+      yield break;
+    }
+
+    public ICompletionData CreateFormatItemCompletionData(string format, string description, object example) {
+      return null;
+    }
+
+    public IEnumerable<ICompletionData> CreatePreProcessorDefinesCompletionData() {
+      yield break;
+    }
+    #endregion
+
+    #region IParameterCompletionDataFactory Members
+    public IParameterDataProvider CreateConstructorProvider(int startOffset, IType type, AstNode thisInitializer) {
+      return CreateConstructorProvider(startOffset, type);
+    }
+
+    public IParameterDataProvider CreateConstructorProvider(int startOffset, IType type) {
+      var constructors = FilterMethodsForAccessibility(type, type.GetConstructors());
+      return CreateMethodDataProvider(startOffset, constructors);
+    }
+
+    public IParameterDataProvider CreateDelegateDataProvider(int startOffset, IType type) {
+      var delegates = FilterMethodsForAccessibility(type, new[] { type.GetDelegateInvokeMethod() });
+      return CreateMethodDataProvider(startOffset, delegates);
+    }
+
+    public IParameterDataProvider CreateIndexerParameterDataProvider(int startOffset, IType type, IEnumerable<IProperty> accessibleIndexers, ICSharpCode.NRefactory.CSharp.AstNode resolvedNode) {
+      return null;
+    }
+
+    public IParameterDataProvider CreateMethodDataProvider(int startOffset, IEnumerable<IMethod> methods) {
+      return new CSharpOverloadProvider(context, startOffset, methods.Where(x => x != null).Select(x => new CSharpInsightItem(x)));
+    }
+
+    public IParameterDataProvider CreateTypeParameterDataProvider(int startOffset, IEnumerable<IMethod> methods) {
+      return CreateMethodDataProvider(startOffset, methods);
+    }
+
+    public IParameterDataProvider CreateTypeParameterDataProvider(int startOffset, IEnumerable<IType> types) {
+      return null;
+    }
+    #endregion
+
+    private IEnumerable<IMethod> FilterMethodsForAccessibility(IType type, IEnumerable<IMethod> methods) {
+      var typeResolveContext = context.TypeResolveContextAtCaret;
+      var lookup = new MemberLookup(typeResolveContext.CurrentTypeDefinition, typeResolveContext.Compilation.MainAssembly);
+      bool protectedAccessAllowed = lookup.IsProtectedAccessAllowed(type);
+      return protectedAccessAllowed ? methods : methods.Where(x => !x.IsProtected);
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionStrategy.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionStrategy.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionStrategy.cs	(revision 11937)
@@ -0,0 +1,125 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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 ICSharpCode.NRefactory.Completion;
+using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.CSharp.Completion;
+using ICSharpCode.NRefactory.Editor;
+using ICSharpCode.NRefactory.TypeSystem;
+
+namespace HeuristicLab.CodeEditor {
+  internal class CSharpCodeCompletionStrategy : CodeCompletionStrategy {
+    private IProjectContent projectContent = new CSharpProjectContent();
+
+    public CSharpCodeCompletionStrategy(CodeEditor codeEditor)
+      : base(codeEditor) {
+      codeEditor.InternalAssembliesLoaded += (sender, args) => {
+        projectContent = projectContent.AddAssemblyReferences(args.Value);
+      };
+      codeEditor.InternalAssembliesUnloaded += (sender, args) => {
+        projectContent = projectContent.RemoveAssemblyReferences(args.Value);
+      };
+    }
+
+    protected override CodeCompletionResult GetCodeCompletionResult(bool controlSpace) {
+      var document = codeEditor.TextEditor.Document;
+      int offset = codeEditor.TextEditor.CaretOffset;
+
+      var result = new CodeCompletionResult();
+      var completionContext = new CSharpCodeCompletionContext(document, offset, projectContent);
+      var completionFactory = new CSharpCodeCompletionDataFactory(completionContext);
+      var cce = new CSharpCompletionEngine(
+        completionContext.Document,
+        completionContext.CompletionContextProvider,
+        completionFactory,
+        completionContext.ProjectContent,
+        completionContext.TypeResolveContextAtCaret
+        );
+
+      char completionChar = completionContext.Document.GetCharAt(completionContext.Offset - 1);
+      int startPos, triggerWordLength;
+      IEnumerable<ICompletionData> completionData;
+
+      if (controlSpace) {
+        if (!cce.TryGetCompletionWord(completionContext.Offset, out startPos, out triggerWordLength)) {
+          startPos = completionContext.Offset;
+          triggerWordLength = 0;
+        }
+        completionData = cce.GetCompletionData(startPos, true);
+      } else {
+        startPos = completionContext.Offset;
+        if (char.IsLetterOrDigit(completionChar) || completionChar == '_') {
+          if (startPos > 1 && char.IsLetterOrDigit(completionContext.Document.GetCharAt((startPos - 2))))
+            return result;
+          completionData = cce.GetCompletionData(startPos, false);
+          triggerWordLength = 1;
+        } else {
+          completionData = cce.GetCompletionData(startPos, false);
+          triggerWordLength = 0;
+        }
+      }
+
+      result.TriggerWordLength = triggerWordLength;
+      result.TriggerWord = completionContext.Document.GetText(completionContext.Offset - triggerWordLength, triggerWordLength);
+
+      if (completionData.Any() && cce.AutoCompleteEmptyMatch) {
+        foreach (var completion in completionData) {
+          var cast = completion as CompletionData;
+          if (cast != null) {
+            cast.TriggerWord = result.TriggerWord;
+            cast.TriggerWordLength = result.TriggerWordLength;
+            result.CompletionData.Add(cast);
+          }
+        }
+      }
+
+      if (!controlSpace) {
+        var pce = new CSharpParameterCompletionEngine(
+          completionContext.Document,
+          completionContext.CompletionContextProvider,
+          completionFactory,
+          completionContext.ProjectContent,
+          completionContext.TypeResolveContextAtCaret
+        );
+
+        var parameterDataProvider = pce.GetParameterDataProvider(completionContext.Offset, completionChar);
+        result.OverloadProvider = parameterDataProvider as IUpdatableOverloadProvider;
+      }
+
+      return result;
+    }
+
+    protected override void DoParseStep() {
+      var document = (IDocument)codeEditor.Invoke(
+        (Func<IDocument>)(() => {
+          var doc = codeEditor.TextEditor.Document;
+          return new ReadOnlyDocument(doc, doc.FileName);
+        })
+      );
+
+      var unresolvedFile = CSharpParsingHelpers.CreateCSharpUnresolvedFile(document);
+      projectContent = projectContent.AddOrUpdateFiles(unresolvedFile);
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpDocumentationBuilder.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpDocumentationBuilder.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpDocumentationBuilder.cs	(revision 11937)
@@ -0,0 +1,510 @@
+﻿#region License Information
+// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+// to whom the Software is furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+/* 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.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Documents;
+using System.Windows.Media;
+using ICSharpCode.AvalonEdit.Highlighting;
+using ICSharpCode.AvalonEdit.Utils;
+using ICSharpCode.NRefactory.Editor;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Xml;
+
+namespace HeuristicLab.CodeEditor {
+  /// <summary>
+  /// Builds a FlowDocument for XML documentation.
+  /// </summary>
+  public class CSharpDocumentationBuilder {
+    const string SyntaxHighlighting = "C#";
+    const string FontFamily = "Consolas";
+    const double FontSize = 13.0;
+    const string MsdnLibraryUrl = "http://msdn.microsoft.com/library/";
+    readonly FlowDocument flowDocument;
+    readonly IAmbience ambience;
+    BlockCollection blockCollection;
+    InlineCollection inlineCollection;
+
+    public CSharpDocumentationBuilder(IAmbience ambience) {
+      this.ambience = ambience;
+      this.flowDocument = new FlowDocument();
+      this.blockCollection = flowDocument.Blocks;
+
+      this.ShowSummary = true;
+      this.ShowAllParameters = true;
+      this.ShowReturns = true;
+      this.ShowThreadSafety = true;
+      this.ShowExceptions = true;
+      this.ShowTypeParameters = true;
+
+      this.ShowExample = true;
+      this.ShowPreliminary = true;
+      this.ShowSeeAlso = true;
+      this.ShowValue = true;
+      this.ShowPermissions = true;
+      this.ShowRemarks = true;
+    }
+
+    public FlowDocument CreateFlowDocument() {
+      FlushAddedText(true);
+      flowDocument.FontSize = FontSize;
+      return flowDocument;
+    }
+
+    public bool ShowExceptions { get; set; }
+    public bool ShowPermissions { get; set; }
+    public bool ShowExample { get; set; }
+    public bool ShowPreliminary { get; set; }
+    public bool ShowRemarks { get; set; }
+    public bool ShowSummary { get; set; }
+    public bool ShowReturns { get; set; }
+    public bool ShowSeeAlso { get; set; }
+    public bool ShowThreadSafety { get; set; }
+    public bool ShowTypeParameters { get; set; }
+    public bool ShowValue { get; set; }
+    public bool ShowAllParameters { get; set; }
+
+    /// <summary>
+    /// Gets/Sets the name of the parameter that should be shown.
+    /// </summary>
+    public string ParameterName { get; set; }
+
+    public void AddDocumentationElement(XmlDocumentationElement element) {
+      if (element == null)
+        throw new ArgumentNullException("element");
+      if (element.IsTextNode) {
+        AddText(element.TextContent);
+        return;
+      }
+      switch (element.Name) {
+        case "b":
+          AddSpan(new Bold(), element.Children);
+          break;
+        case "i":
+          AddSpan(new Italic(), element.Children);
+          break;
+        case "c":
+          AddSpan(new Span { FontFamily = GetCodeFont() }, element.Children);
+          break;
+        case "code":
+          AddCodeBlock(element.TextContent);
+          break;
+        case "example":
+          if (ShowExample)
+            AddSection("Example: ", element.Children);
+          break;
+        case "exception":
+          if (ShowExceptions)
+            AddException(element.ReferencedEntity, element.Children);
+          break;
+        case "list":
+          AddList(element.GetAttribute("type"), element.Children);
+          break;
+        //case "note":
+        //	throw new NotImplementedException();
+        case "para":
+          AddParagraph(new Paragraph { Margin = new Thickness(0, 5, 0, 5) }, element.Children);
+          break;
+        case "param":
+          if (ShowAllParameters || (ParameterName != null && ParameterName == element.GetAttribute("name")))
+            AddParam(element.GetAttribute("name"), element.Children);
+          break;
+        case "paramref":
+          AddParamRef(element.GetAttribute("name"));
+          break;
+        case "permission":
+          if (ShowPermissions)
+            AddPermission(element.ReferencedEntity, element.Children);
+          break;
+        case "preliminary":
+          if (ShowPreliminary)
+            AddPreliminary(element.Children);
+          break;
+        case "remarks":
+          if (ShowRemarks)
+            AddSection("Remarks: ", element.Children);
+          break;
+        case "returns":
+          if (ShowReturns)
+            AddSection("Returns: ", element.Children);
+          break;
+        case "see":
+          AddSee(element);
+          break;
+        case "seealso":
+          if (inlineCollection != null)
+            AddSee(element);
+          else if (ShowSeeAlso)
+            AddSection(new Run("See also: "), () => AddSee(element));
+          break;
+        case "summary":
+          if (ShowSummary)
+            AddSection("Summary: ", element.Children);
+          break;
+        case "threadsafety":
+          if (ShowThreadSafety)
+            AddThreadSafety(ParseBool(element.GetAttribute("static")), ParseBool(element.GetAttribute("instance")), element.Children);
+          break;
+        case "typeparam":
+          if (ShowTypeParameters)
+            AddSection("Type parameter " + element.GetAttribute("name") + ": ", element.Children);
+          break;
+        case "typeparamref":
+          AddText(element.GetAttribute("name"));
+          break;
+        case "value":
+          if (ShowValue)
+            AddSection("Value: ", element.Children);
+          break;
+        case "exclude":
+        case "filterpriority":
+        case "overloads":
+          // ignore children
+          break;
+        case "br":
+          AddLineBreak();
+          break;
+        default:
+          foreach (var child in element.Children)
+            AddDocumentationElement(child);
+          break;
+      }
+    }
+
+    void AddList(string type, IEnumerable<XmlDocumentationElement> items) {
+      List list = new List();
+      AddBlock(list);
+      list.Margin = new Thickness(0, 5, 0, 5);
+      if (type == "number")
+        list.MarkerStyle = TextMarkerStyle.Decimal;
+      else if (type == "bullet")
+        list.MarkerStyle = TextMarkerStyle.Disc;
+      var oldBlockCollection = blockCollection;
+      try {
+        foreach (var itemElement in items) {
+          if (itemElement.Name == "listheader" || itemElement.Name == "item") {
+            ListItem item = new ListItem();
+            blockCollection = item.Blocks;
+            inlineCollection = null;
+            foreach (var prop in itemElement.Children) {
+              AddDocumentationElement(prop);
+            }
+            FlushAddedText(false);
+            list.ListItems.Add(item);
+          }
+        }
+      } finally {
+        blockCollection = oldBlockCollection;
+      }
+    }
+
+    public void AddCodeBlock(string textContent, bool keepLargeMargin = false) {
+      var document = new ReadOnlyDocument(textContent);
+      var highlightingDefinition = HighlightingManager.Instance.GetDefinition(SyntaxHighlighting);
+
+      var block = DocumentPrinter.ConvertTextDocumentToBlock(document, highlightingDefinition);
+      block.FontFamily = GetCodeFont();
+      if (!keepLargeMargin)
+        block.Margin = new Thickness(0, 6, 0, 6);
+      AddBlock(block);
+    }
+
+    public void AddSignatureBlock(string signature, int currentParameterOffset, int currentParameterLength, string currentParameterName) {
+      ParameterName = currentParameterName;
+      var document = new ReadOnlyDocument(signature);
+      var highlightingDefinition = HighlightingManager.Instance.GetDefinition(SyntaxHighlighting);
+
+      var richText = DocumentPrinter.ConvertTextDocumentToRichText(document, highlightingDefinition).ToRichTextModel();
+      richText.SetFontWeight(currentParameterOffset, currentParameterLength, FontWeights.Bold);
+      var block = new Paragraph();
+      block.Inlines.AddRange(richText.CreateRuns(document));
+      block.FontFamily = GetCodeFont();
+      block.TextAlignment = TextAlignment.Left;
+      AddBlock(block);
+    }
+
+    bool? ParseBool(string input) {
+      bool result;
+      if (bool.TryParse(input, out result))
+        return result;
+      else
+        return null;
+    }
+
+    void AddThreadSafety(bool? staticThreadSafe, bool? instanceThreadSafe, IEnumerable<XmlDocumentationElement> children) {
+      AddSection(
+        new Run("Thread-safety: "),
+        delegate {
+          if (staticThreadSafe == true)
+            AddText("Any public static members of this type are thread safe. ");
+          else if (staticThreadSafe == false)
+            AddText("The static members of this type are not thread safe. ");
+
+          if (instanceThreadSafe == true)
+            AddText("Any public instance members of this type are thread safe. ");
+          else if (instanceThreadSafe == false)
+            AddText("Any instance members are not guaranteed to be thread safe. ");
+
+          foreach (var child in children)
+            AddDocumentationElement(child);
+        });
+    }
+
+    FontFamily GetCodeFont() {
+      return new FontFamily(FontFamily);
+    }
+
+    void AddException(IEntity referencedEntity, IList<XmlDocumentationElement> children) {
+      Span span = new Span();
+      if (referencedEntity != null)
+        span.Inlines.Add(ConvertReference(referencedEntity));
+      else
+        span.Inlines.Add("Exception");
+      span.Inlines.Add(": ");
+      AddSection(span, children);
+    }
+
+
+    void AddPermission(IEntity referencedEntity, IList<XmlDocumentationElement> children) {
+      Span span = new Span();
+      span.Inlines.Add("Permission");
+      if (referencedEntity != null) {
+        span.Inlines.Add(" ");
+        span.Inlines.Add(ConvertReference(referencedEntity));
+      }
+      span.Inlines.Add(": ");
+      AddSection(span, children);
+    }
+
+    Inline ConvertReference(IEntity referencedEntity) {
+      var h = new Hyperlink(new Run(ambience.ConvertSymbol(referencedEntity)));
+      h.Click += CreateNavigateOnClickHandler(referencedEntity);
+      return h;
+    }
+
+    void AddParam(string name, IEnumerable<XmlDocumentationElement> children) {
+      Span span = new Span();
+      span.Inlines.Add(new Run(name ?? string.Empty) { FontStyle = FontStyles.Italic });
+      span.Inlines.Add(": ");
+      AddSection(span, children);
+    }
+
+    void AddParamRef(string name) {
+      if (name != null) {
+        AddInline(new Run(name) { FontStyle = FontStyles.Italic });
+      }
+    }
+
+    void AddPreliminary(IEnumerable<XmlDocumentationElement> children) {
+      if (children.Any()) {
+        foreach (var child in children)
+          AddDocumentationElement(child);
+      } else {
+        AddText("[This is preliminary documentation and subject to change.]");
+      }
+    }
+
+    void AddSee(XmlDocumentationElement element) {
+      IEntity referencedEntity = element.ReferencedEntity;
+      if (referencedEntity != null) {
+        if (element.Children.Any()) {
+          Hyperlink link = new Hyperlink();
+          link.Click += CreateNavigateOnClickHandler(referencedEntity);
+          AddSpan(link, element.Children);
+        } else {
+          AddInline(ConvertReference(referencedEntity));
+        }
+      } else if (element.GetAttribute("langword") != null) {
+        AddInline(new Run(element.GetAttribute("langword")) { FontFamily = GetCodeFont() });
+      } else if (element.GetAttribute("href") != null) {
+        Uri uri;
+        if (Uri.TryCreate(element.GetAttribute("href"), UriKind.Absolute, out uri)) {
+          if (element.Children.Any()) {
+            AddSpan(new Hyperlink { NavigateUri = uri }, element.Children);
+          } else {
+            AddInline(new Hyperlink(new Run(element.GetAttribute("href"))) { NavigateUri = uri });
+          }
+        }
+      } else {
+        // Invalid reference: print the cref value
+        AddText(element.GetAttribute("cref"));
+      }
+    }
+
+    RoutedEventHandler CreateNavigateOnClickHandler(IEntity referencedEntity) {
+      return delegate(object sender, RoutedEventArgs e) {
+        Process.Start(MsdnLibraryUrl + referencedEntity.FullName);
+        e.Handled = true;
+      };
+    }
+
+    void AddSection(string title, IEnumerable<XmlDocumentationElement> children) {
+      AddSection(new Run(title), children);
+    }
+
+    void AddSection(Inline title, IEnumerable<XmlDocumentationElement> children) {
+      AddSection(
+        title, delegate {
+        foreach (var child in children)
+          AddDocumentationElement(child);
+      });
+    }
+
+    void AddSection(Inline title, Action addChildren) {
+      var section = new Section();
+      AddBlock(section);
+      var oldBlockCollection = blockCollection;
+      try {
+        blockCollection = section.Blocks;
+        inlineCollection = null;
+
+        if (title != null)
+          AddInline(new Bold(title));
+
+        addChildren();
+        FlushAddedText(false);
+      } finally {
+        blockCollection = oldBlockCollection;
+        inlineCollection = null;
+      }
+    }
+
+    void AddParagraph(Paragraph para, IEnumerable<XmlDocumentationElement> children) {
+      AddBlock(para);
+      try {
+        inlineCollection = para.Inlines;
+
+        foreach (var child in children)
+          AddDocumentationElement(child);
+        FlushAddedText(false);
+      } finally {
+        inlineCollection = null;
+      }
+    }
+
+    void AddSpan(Span span, IEnumerable<XmlDocumentationElement> children) {
+      AddInline(span);
+      var oldInlineCollection = inlineCollection;
+      try {
+        inlineCollection = span.Inlines;
+        foreach (var child in children)
+          AddDocumentationElement(child);
+        FlushAddedText(false);
+      } finally {
+        inlineCollection = oldInlineCollection;
+      }
+    }
+
+    public void AddInline(Inline inline) {
+      FlushAddedText(false);
+      if (inlineCollection == null) {
+        var para = new Paragraph();
+        para.Margin = new Thickness(0, 0, 0, 5);
+        inlineCollection = para.Inlines;
+        AddBlock(para);
+      }
+      inlineCollection.Add(inline);
+      ignoreWhitespace = false;
+    }
+
+    public void AddBlock(Block block) {
+      FlushAddedText(true);
+      blockCollection.Add(block);
+    }
+
+    StringBuilder addedText = new StringBuilder();
+    bool ignoreWhitespace;
+
+    public void AddLineBreak() {
+      TrimEndOfAddedText();
+      addedText.AppendLine();
+      ignoreWhitespace = true;
+    }
+
+    public void AddText(string textContent) {
+      if (string.IsNullOrEmpty(textContent))
+        return;
+      for (int i = 0; i < textContent.Length; i++) {
+        char c = textContent[i];
+        if (c == '\n' && IsEmptyLineBefore(textContent, i)) {
+          AddLineBreak(); // empty line -> line break
+        } else if (char.IsWhiteSpace(c)) {
+          // any whitespace sequence gets converted to a single space (like HTML)
+          if (!ignoreWhitespace) {
+            addedText.Append(' ');
+            ignoreWhitespace = true;
+          }
+        } else {
+          addedText.Append(c);
+          ignoreWhitespace = false;
+        }
+      }
+    }
+
+    bool IsEmptyLineBefore(string text, int i) {
+      // Skip previous whitespace
+      do {
+        i--;
+      } while (i >= 0 && (text[i] == ' ' || text[i] == '\r'));
+      // Check if previous non-whitespace char is \n
+      return i >= 0 && text[i] == '\n';
+    }
+
+    void TrimEndOfAddedText() {
+      while (addedText.Length > 0 && addedText[addedText.Length - 1] == ' ') {
+        addedText.Length--;
+      }
+    }
+
+    void FlushAddedText(bool trim) {
+      if (trim) // trim end of current text element
+        TrimEndOfAddedText();
+      if (addedText.Length == 0)
+        return;
+      string text = addedText.ToString();
+      addedText.Length = 0;
+      AddInline(new Run(text));
+      ignoreWhitespace = trim; // trim start of next text element
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpInsightItem.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpInsightItem.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpInsightItem.cs	(revision 11937)
@@ -0,0 +1,158 @@
+﻿#region License Information
+// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+// to whom the Software is furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+/* 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.IO;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Xml;
+
+namespace HeuristicLab.CodeEditor {
+  sealed class CSharpInsightItem {
+    public readonly IParameterizedMember Method;
+
+    public CSharpInsightItem(IParameterizedMember method) {
+      this.Method = method;
+    }
+
+    FlowDocumentScrollViewer header;
+
+    public object Header {
+      get {
+        if (header == null) {
+          header = GenerateHeader();
+        }
+        return header;
+      }
+    }
+
+    int highlightedParameterIndex = -1;
+
+    public void HighlightParameter(int parameterIndex) {
+      if (highlightedParameterIndex == parameterIndex)
+        return;
+      this.highlightedParameterIndex = parameterIndex;
+      if (header != null)
+        header = GenerateHeader();
+    }
+
+    FlowDocumentScrollViewer GenerateHeader() {
+      var ambience = new CSharpAmbience();
+      ambience.ConversionFlags = ConversionFlags.StandardConversionFlags;
+      var stringBuilder = new StringBuilder();
+      var formatter = new ParameterHighlightingOutputFormatter(stringBuilder, highlightedParameterIndex);
+      ambience.ConvertSymbol(Method, formatter, FormattingOptionsFactory.CreateSharpDevelop());
+
+      var documentation = XmlDocumentationElement.Get(Method);
+      ambience.ConversionFlags = ConversionFlags.ShowTypeParameterList;
+
+      var b = new CSharpDocumentationBuilder(ambience);
+      string parameterName = null;
+      if (Method.Parameters.Count > highlightedParameterIndex)
+        parameterName = Method.Parameters[highlightedParameterIndex].Name;
+      b.AddSignatureBlock(stringBuilder.ToString(), formatter.parameterStartOffset, formatter.parameterLength, parameterName);
+
+      var b2 = new CSharpDocumentationBuilder(ambience);
+      b2.ParameterName = parameterName;
+      b2.ShowAllParameters = false;
+
+      if (documentation != null) {
+        foreach (var child in documentation.Children) {
+          b2.AddDocumentationElement(child);
+        }
+      }
+
+      content = new FlowDocumentScrollViewer {
+        Document = b2.CreateFlowDocument(),
+        VerticalScrollBarVisibility = ScrollBarVisibility.Auto
+      };
+
+      var flowDocument = b.CreateFlowDocument();
+      flowDocument.PagePadding = new Thickness(0); // default is NOT Thickness(0), but Thickness(Auto), which adds unnecessary space
+
+      return new FlowDocumentScrollViewer {
+        Document = flowDocument,
+        VerticalScrollBarVisibility = ScrollBarVisibility.Auto
+      };
+    }
+
+    FlowDocumentScrollViewer content;
+
+    public object Content {
+      get {
+        if (content == null) {
+          GenerateHeader();
+        }
+        return content;
+      }
+    }
+
+    sealed class ParameterHighlightingOutputFormatter : TextWriterTokenWriter {
+      StringBuilder b;
+      int highlightedParameterIndex;
+      int parameterIndex;
+      internal int parameterStartOffset;
+      internal int parameterLength;
+
+      public ParameterHighlightingOutputFormatter(StringBuilder b, int highlightedParameterIndex)
+        : base(new StringWriter(b)) {
+        this.b = b;
+        this.highlightedParameterIndex = highlightedParameterIndex;
+      }
+
+      public override void StartNode(AstNode node) {
+        if (parameterIndex == highlightedParameterIndex && node is ParameterDeclaration) {
+          parameterStartOffset = b.Length;
+        }
+        base.StartNode(node);
+      }
+
+      public override void EndNode(AstNode node) {
+        base.EndNode(node);
+        if (node is ParameterDeclaration) {
+          if (parameterIndex == highlightedParameterIndex)
+            parameterLength = b.Length - parameterStartOffset;
+          parameterIndex++;
+        }
+      }
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpOverloadProvider.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpOverloadProvider.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpOverloadProvider.cs	(revision 11937)
@@ -0,0 +1,170 @@
+﻿#region License Information
+// CShell, A Simple C# Scripting IDE
+// Copyright (C) 2013  Arnova Asset Management Ltd., Lukas Buhler
+// 
+// This program 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.
+// 
+// This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+
+// This file is based on code from the SharpDevelop project:
+//   Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \Doc\sharpdevelop-copyright.txt)
+//   This code is distributed under the GNU LGPL (for details please see \Doc\COPYING.LESSER.txt)
+
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.ComponentModel;
+using System.Diagnostics;
+using System.Linq;
+using ICSharpCode.NRefactory.Completion;
+using ICSharpCode.NRefactory.CSharp.Completion;
+using ICSharpCode.NRefactory.Editor;
+
+namespace HeuristicLab.CodeEditor {
+  internal class CSharpOverloadProvider : IUpdatableOverloadProvider, IParameterDataProvider {
+    private readonly CSharpCodeCompletionContext context;
+    private readonly int startOffset;
+    internal readonly IList<CSharpInsightItem> items;
+    private int selectedIndex;
+
+    public CSharpOverloadProvider(CSharpCodeCompletionContext context, int startOffset, IEnumerable<CSharpInsightItem> items) {
+      Debug.Assert(items != null);
+      this.context = context;
+      this.startOffset = startOffset;
+      this.selectedIndex = 0;
+      this.items = items.ToList();
+
+      Update(context);
+    }
+
+    public bool RequestClose { get; set; }
+
+    public int Count {
+      get { return items.Count; }
+    }
+
+    public object CurrentContent {
+      get { return items[selectedIndex].Content; }
+    }
+
+    public object CurrentHeader {
+      get { return items[selectedIndex].Header; }
+    }
+
+    public string CurrentIndexText {
+      get { return (selectedIndex + 1).ToString() + " of " + this.Count.ToString(); }
+    }
+
+    public int SelectedIndex {
+      get { return selectedIndex; }
+      set {
+        selectedIndex = value;
+        if (selectedIndex >= items.Count)
+          selectedIndex = items.Count - 1;
+        if (selectedIndex < 0)
+          selectedIndex = 0;
+        OnPropertyChanged("SelectedIndex");
+        OnPropertyChanged("CurrentIndexText");
+        OnPropertyChanged("CurrentHeader");
+        OnPropertyChanged("CurrentContent");
+      }
+    }
+
+    public void Update(IDocument document, int offset) {
+      var completionContext = new CSharpCodeCompletionContext(document, offset, context.ProjectContent);
+      Update(completionContext);
+    }
+
+    public void Update(CSharpCodeCompletionContext completionContext) {
+      var completionFactory = new CSharpCodeCompletionDataFactory(completionContext);
+      var pce = new CSharpParameterCompletionEngine(
+          completionContext.Document,
+          completionContext.CompletionContextProvider,
+          completionFactory,
+          completionContext.ProjectContent,
+          completionContext.TypeResolveContextAtCaret
+      );
+
+      int parameterIndex = pce.GetCurrentParameterIndex(startOffset, completionContext.Offset);
+      if (parameterIndex < 0 || !items.Any()) {
+        RequestClose = true;
+        return;
+      } else {
+        if (parameterIndex > items[selectedIndex].Method.Parameters.Count) {
+          var newItem = items.FirstOrDefault(i => parameterIndex <= i.Method.Parameters.Count);
+          SelectedIndex = items.IndexOf(newItem);
+        }
+        if (parameterIndex > 0)
+          parameterIndex--; // NR returns 1-based parameter index
+        foreach (var item in items) {
+          item.HighlightParameter(parameterIndex);
+        }
+      }
+    }
+
+    #region IParameterDataProvider implementation
+    int IParameterDataProvider.StartOffset {
+      get { return startOffset; }
+    }
+
+    string IParameterDataProvider.GetHeading(int overload, string[] parameterDescription, int currentParameter) {
+      throw new NotImplementedException();
+    }
+
+    string IParameterDataProvider.GetDescription(int overload, int currentParameter) {
+      throw new NotImplementedException();
+    }
+
+    string IParameterDataProvider.GetParameterDescription(int overload, int paramIndex) {
+      throw new NotImplementedException();
+    }
+
+    string IParameterDataProvider.GetParameterName(int overload, int currentParameter) {
+      throw new NotImplementedException();
+    }
+
+    int IParameterDataProvider.GetParameterCount(int overload) {
+      throw new NotImplementedException();
+    }
+
+    bool IParameterDataProvider.AllowParameterList(int overload) {
+      throw new NotImplementedException();
+    }
+    #endregion
+
+    public event PropertyChangedEventHandler PropertyChanged;
+    private void OnPropertyChanged(string propertyName) {
+      var args = new PropertyChangedEventArgs(propertyName);
+      if (PropertyChanged != null)
+        PropertyChanged(this, args);
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/CodeCompletionData.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/CodeCompletionData.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/CodeCompletionData.cs	(revision 11937)
@@ -0,0 +1,90 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Windows.Media;
+using ICSharpCode.AvalonEdit.Editing;
+using ICSharpCode.NRefactory.Editor;
+using ACC = ICSharpCode.AvalonEdit.CodeCompletion;
+using NCC = ICSharpCode.NRefactory.Completion;
+
+namespace HeuristicLab.CodeEditor {
+  internal class CompletionData : NCC.ICompletionData, ACC.ICompletionData {
+    public string TriggerWord { get; set; }
+    public int TriggerWordLength { get; set; }
+
+    #region Constructors
+    protected CompletionData() { }
+
+    public CompletionData(string text) {
+      DisplayText = CompletionText = Description = text;
+    }
+    #endregion
+
+    #region ICSharpCode.NRefactory.Completion.ICompletionData Members
+    public NCC.CompletionCategory CompletionCategory { get; set; }
+    public string DisplayText { get; set; }
+    public virtual string Description { get; set; }
+    public string CompletionText { get; set; }
+    public NCC.DisplayFlags DisplayFlags { get; set; }
+    public bool HasOverloads { get { return overloadedData.Count > 0; } }
+
+    private readonly List<NCC.ICompletionData> overloadedData = new List<NCC.ICompletionData>();
+    public IEnumerable<NCC.ICompletionData> OverloadedData {
+      get { return overloadedData; }
+      set { throw new InvalidOperationException(); }
+    }
+
+    public void AddOverload(NCC.ICompletionData data) {
+      if (overloadedData.Count == 0)
+        overloadedData.Add(this);
+      overloadedData.Add(data);
+    }
+    #endregion
+
+    #region ICSharpCode.AvalonEdit.CodeCompletion.ICompletionData Members
+    public object Content { get { return DisplayText; } }
+
+    object fancyDescription;
+    object ACC.ICompletionData.Description {
+      get {
+        if (fancyDescription == null) {
+          fancyDescription = CreateFancyDescription();
+        }
+        return fancyDescription;
+      }
+    }
+
+    public virtual ImageSource Image { get; set; }
+    public double Priority { get; set; }
+    public string Text { get { return CompletionText; } }
+
+    public void Complete(TextArea textArea, ISegment completionSegment, EventArgs insertionRequestEventArgs) {
+      textArea.Document.Replace(completionSegment, CompletionText);
+    }
+    #endregion
+
+    protected virtual object CreateFancyDescription() {
+      return Description;
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/EntityCompletionData.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/EntityCompletionData.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/EntityCompletionData.cs	(revision 11937)
@@ -0,0 +1,73 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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;
+using System.Windows.Controls;
+using ICSharpCode.AvalonEdit.CodeCompletion;
+using ICSharpCode.NRefactory.Completion;
+using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.TypeSystem;
+using ICSharpCode.NRefactory.Xml;
+
+namespace HeuristicLab.CodeEditor {
+  internal class EntityCompletionData : CompletionData, IEntityCompletionData {
+    private static readonly CSharpAmbience Ambience = new CSharpAmbience();
+
+    #region IEntityCompletionData Members
+    public IEntity Entity { get; private set; }
+    #endregion
+
+    public EntityCompletionData(IEntity entity)
+      : base() {
+      if (entity == null) throw new ArgumentException("entity");
+
+      Entity = entity;
+      Ambience.ConversionFlags = entity is ITypeDefinition ? ConversionFlags.ShowTypeParameterList : ConversionFlags.None;
+      CompletionText = DisplayText = entity.Name;
+      Image = CompletionImage.GetImage(entity);
+    }
+
+    protected override object CreateFancyDescription() {
+      var ambience = new CSharpAmbience();
+      ambience.ConversionFlags = ConversionFlags.StandardConversionFlags | ConversionFlags.ShowDeclaringType;
+      string header = ambience.ConvertSymbol(Entity);
+      var documentation = XmlDocumentationElement.Get(Entity);
+
+      ambience.ConversionFlags = ConversionFlags.ShowTypeParameterList;
+      var b = new CSharpDocumentationBuilder(ambience);
+      b.AddCodeBlock(header, keepLargeMargin: true);
+      if (documentation != null) {
+        foreach (var child in documentation.Children) {
+          b.AddDocumentationElement(child);
+        }
+      }
+
+      var flowDocument = b.CreateFlowDocument();
+      flowDocument.PagePadding = new Thickness(0); // default is NOT Thickness(0), but Thickness(Auto), which adds unnecessary space
+
+      return new FlowDocumentScrollViewer {
+        Document = flowDocument,
+        VerticalScrollBarVisibility = ScrollBarVisibility.Auto
+      };
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/Images/CompletionImage.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/Images/CompletionImage.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/Images/CompletionImage.cs	(revision 11937)
@@ -0,0 +1,370 @@
+﻿#region License Information
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Threading;
+using System.Windows;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using ICSharpCode.NRefactory.TypeSystem;
+
+namespace ICSharpCode.AvalonEdit.CodeCompletion {
+  /// <summary>
+  /// Provides icons for code-completion.
+  /// </summary>
+  public class CompletionImage {
+    #region Non-Entity Images
+    static readonly BitmapImage namespaceImage = LoadBitmap("NameSpace");
+
+    /// <summary>
+    /// Gets the image for namespaces.
+    /// </summary>
+    public static ImageSource NamespaceImage {
+      get { return namespaceImage; }
+    }
+
+    static BitmapImage LoadBitmap(string name) {
+      BitmapImage image = new BitmapImage(new Uri("pack://application:,,,/HeuristicLab.CodeEditor-3.4;component/LanguageFeatures/CodeCompletion/CSharp/CompletionData/Images/" + name + ".png"));
+      image.Freeze();
+      return image;
+    }
+    #endregion
+
+    #region Entity Images
+    static readonly CompletionImage imageClass = new CompletionImage("Class", false);
+    static readonly CompletionImage imageStruct = new CompletionImage("Struct", false);
+    static readonly CompletionImage imageInterface = new CompletionImage("Interface", false);
+    static readonly CompletionImage imageDelegate = new CompletionImage("Delegate", false);
+    static readonly CompletionImage imageEnum = new CompletionImage("Enum", false);
+    static readonly CompletionImage imageStaticClass = new CompletionImage("StaticClass", false);
+
+    /// <summary>Gets the image used for non-static classes.</summary>
+    public static CompletionImage Class { get { return imageClass; } }
+
+    /// <summary>Gets the image used for structs.</summary>
+    public static CompletionImage Struct { get { return imageStruct; } }
+
+    /// <summary>Gets the image used for interfaces.</summary>
+    public static CompletionImage Interface { get { return imageInterface; } }
+
+    /// <summary>Gets the image used for delegates.</summary>
+    public static CompletionImage Delegate { get { return imageDelegate; } }
+
+    /// <summary>Gets the image used for enums.</summary>
+    public static CompletionImage Enum { get { return imageEnum; } }
+
+    /// <summary>Gets the image used for modules/static classes.</summary>
+    public static CompletionImage StaticClass { get { return imageStaticClass; } }
+
+    static readonly CompletionImage imageField = new CompletionImage("Field", true);
+    static readonly CompletionImage imageFieldReadOnly = new CompletionImage("FieldReadOnly", true);
+    static readonly CompletionImage imageLiteral = new CompletionImage("Literal", false);
+    static readonly CompletionImage imageEnumValue = new CompletionImage("EnumValue", false);
+    static readonly CompletionImage imageTemplate = new CompletionImage("Template", false);
+
+    /// <summary>Gets the image used for non-static classes.</summary>
+    public static CompletionImage Field { get { return imageField; } }
+
+    /// <summary>Gets the image used for structs.</summary>
+    public static CompletionImage ReadOnlyField { get { return imageFieldReadOnly; } }
+
+    /// <summary>Gets the image used for constants.</summary>
+    public static CompletionImage Literal { get { return imageLiteral; } }
+
+    /// <summary>Gets the image used for enum values.</summary>
+    public static CompletionImage EnumValue { get { return imageEnumValue; } }
+
+    /// <summary>Gets the image used for templates.</summary>
+    public static CompletionImage Template { get { return imageTemplate; } }
+
+    static readonly CompletionImage imageMethod = new CompletionImage("Method", true);
+    static readonly CompletionImage imageConstructor = new CompletionImage("Constructor", true);
+    static readonly CompletionImage imageVirtualMethod = new CompletionImage("VirtualMethod", true);
+    static readonly CompletionImage imageOperator = new CompletionImage("Operator", false);
+    static readonly CompletionImage imageExtensionMethod = new CompletionImage("ExtensionMethod", true);
+    static readonly CompletionImage imagePInvokeMethod = new CompletionImage("PInvokeMethod", true);
+    static readonly CompletionImage imageProperty = new CompletionImage("Property", true);
+    static readonly CompletionImage imageIndexer = new CompletionImage("Indexer", true);
+    static readonly CompletionImage imageEvent = new CompletionImage("Event", true);
+
+    /// <summary>Gets the image used for methods.</summary>
+    public static CompletionImage Method { get { return imageMethod; } }
+
+    /// <summary>Gets the image used for constructos.</summary>
+    public static CompletionImage Constructor { get { return imageConstructor; } }
+
+    /// <summary>Gets the image used for virtual methods.</summary>
+    public static CompletionImage VirtualMethod { get { return imageVirtualMethod; } }
+
+    /// <summary>Gets the image used for operators.</summary>
+    public static CompletionImage Operator { get { return imageOperator; } }
+
+    /// <summary>Gets the image used for extension methods.</summary>
+    public static CompletionImage ExtensionMethod { get { return imageExtensionMethod; } }
+
+    /// <summary>Gets the image used for P/Invoke methods.</summary>
+    public static CompletionImage PInvokeMethod { get { return imagePInvokeMethod; } }
+
+    /// <summary>Gets the image used for properties.</summary>
+    public static CompletionImage Property { get { return imageProperty; } }
+
+    /// <summary>Gets the image used for indexers.</summary>
+    public static CompletionImage Indexer { get { return imageIndexer; } }
+
+    /// <summary>Gets the image used for events.</summary>
+    public static CompletionImage Event { get { return imageEvent; } }
+
+    /// <summary>
+    /// Gets the CompletionImage instance for the specified entity.
+    /// Returns null when no image is available for the entity type.
+    /// </summary>
+    public static CompletionImage GetCompletionImage(IEntity entity) {
+      if (entity == null)
+        throw new ArgumentNullException("entity");
+      switch (entity.SymbolKind) {
+        case SymbolKind.TypeDefinition:
+          return GetCompletionImageForType(((ITypeDefinition)entity).Kind, entity.IsStatic);
+        case SymbolKind.Field:
+          IField field = (IField)entity;
+          if (field.IsConst) {
+            if (field.DeclaringTypeDefinition != null && field.DeclaringTypeDefinition.Kind == TypeKind.Enum)
+              return imageEnumValue;
+            else
+              return imageLiteral;
+          }
+          return field.IsReadOnly ? imageFieldReadOnly : imageField;
+        case SymbolKind.Method:
+          IMethod method = (IMethod)entity;
+          if (method.IsExtensionMethod)
+            return imageExtensionMethod;
+          else
+            return method.IsOverridable ? imageVirtualMethod : imageMethod;
+        case SymbolKind.Property:
+          return imageProperty;
+        case SymbolKind.Indexer:
+          return imageIndexer;
+        case SymbolKind.Event:
+          return imageEvent;
+        case SymbolKind.Operator:
+        case SymbolKind.Destructor:
+          return imageOperator;
+        case SymbolKind.Constructor:
+          return imageConstructor;
+        default:
+          return null;
+      }
+    }
+
+    /// <summary>
+    /// Gets the CompletionImage instance for the specified entity.
+    /// Returns null when no image is available for the entity type.
+    /// </summary>
+    public static CompletionImage GetCompletionImage(IUnresolvedEntity entity) {
+      if (entity == null)
+        throw new ArgumentNullException("entity");
+      switch (entity.SymbolKind) {
+        case SymbolKind.TypeDefinition:
+          return GetCompletionImageForType(((IUnresolvedTypeDefinition)entity).Kind, entity.IsStatic);
+        case SymbolKind.Field:
+          IUnresolvedField field = (IUnresolvedField)entity;
+          if (field.IsConst) {
+            if (field.DeclaringTypeDefinition != null && field.DeclaringTypeDefinition.Kind == TypeKind.Enum)
+              return imageEnumValue;
+            else
+              return imageLiteral;
+          }
+          return field.IsReadOnly ? imageFieldReadOnly : imageField;
+        case SymbolKind.Method:
+          IUnresolvedMethod method = (IUnresolvedMethod)entity;
+          return method.IsOverridable ? imageVirtualMethod : imageMethod;
+        case SymbolKind.Property:
+          return imageProperty;
+        case SymbolKind.Indexer:
+          return imageIndexer;
+        case SymbolKind.Event:
+          return imageEvent;
+        case SymbolKind.Operator:
+        case SymbolKind.Destructor:
+          return imageOperator;
+        case SymbolKind.Constructor:
+          return imageConstructor;
+        default:
+          return null;
+      }
+    }
+
+    static CompletionImage GetCompletionImageForType(TypeKind typeKind, bool isStatic) {
+      switch (typeKind) {
+        case TypeKind.Interface:
+          return imageInterface;
+        case TypeKind.Struct:
+        case TypeKind.Void:
+          return imageStruct;
+        case TypeKind.Delegate:
+          return imageDelegate;
+        case TypeKind.Enum:
+          return imageEnum;
+        case TypeKind.Class:
+          return isStatic ? imageStaticClass : imageClass;
+        case TypeKind.Module:
+          return imageStaticClass;
+        default:
+          return null;
+      }
+    }
+
+    /// <summary>
+    /// Gets the image for the specified entity.
+    /// Returns null when no image is available for the entity type.
+    /// </summary>
+    public static ImageSource GetImage(IEntity entity) {
+      CompletionImage image = GetCompletionImage(entity);
+      if (image != null)
+        return image.GetImage(entity.Accessibility, entity.IsStatic);
+      else
+        return null;
+    }
+
+    /// <summary>
+    /// Gets the image for the specified entity.
+    /// Returns null when no image is available for the entity type.
+    /// </summary>
+    public static ImageSource GetImage(IUnresolvedEntity entity) {
+      CompletionImage image = GetCompletionImage(entity);
+      if (image != null)
+        return image.GetImage(entity.Accessibility, entity.IsStatic);
+      else
+        return null;
+    }
+    #endregion
+
+    #region Overlays
+    static readonly BitmapImage overlayStatic = LoadBitmap("OverlayStatic");
+
+    /// <summary>
+    /// Gets the overlay image for the static modifier.
+    /// </summary>
+    public ImageSource StaticOverlay { get { return overlayStatic; } }
+
+    const int AccessibilityOverlaysLength = 5;
+
+    static readonly BitmapImage[] accessibilityOverlays = new BitmapImage[AccessibilityOverlaysLength] {
+      null,
+      LoadBitmap("OverlayPrivate"),
+      LoadBitmap("OverlayProtected"),
+      LoadBitmap("OverlayInternal"),
+      LoadBitmap("OverlayProtectedInternal")
+    };
+
+    /// <summary>
+    /// Gets an overlay image for the specified accessibility.
+    /// Returns null if no overlay exists (for example, public members don't use overlays).
+    /// </summary>
+    public static ImageSource GetAccessibilityOverlay(Accessibility accessibility) {
+      return accessibilityOverlays[GetAccessibilityOverlayIndex(accessibility)];
+    }
+
+    static int GetAccessibilityOverlayIndex(Accessibility accessibility) {
+      switch (accessibility) {
+        case Accessibility.Private:
+          return 1;
+        case Accessibility.Protected:
+          return 2;
+        case Accessibility.Internal:
+          return 3;
+        case Accessibility.ProtectedOrInternal:
+        case Accessibility.ProtectedAndInternal:
+          return 4;
+        default:
+          return 0;
+      }
+    }
+    #endregion
+
+    #region Instance Members (add overlay to entity image)
+    readonly string imageName;
+    readonly bool showStaticOverlay;
+
+    private CompletionImage(string imageName, bool showStaticOverlay) {
+      this.imageName = imageName;
+      this.showStaticOverlay = showStaticOverlay;
+    }
+
+    ImageSource[] images = new ImageSource[2 * AccessibilityOverlaysLength];
+    // 0..N-1  = base image + accessibility overlay
+    // N..2N-1 = base image + static overlay + accessibility overlay
+
+    /// <summary>
+    /// Gets the image without any overlays.
+    /// </summary>
+    public ImageSource BaseImage {
+      get {
+        ImageSource image = images[0];
+        if (image == null) {
+          image = LoadBitmap(imageName);
+          Thread.MemoryBarrier();
+          images[0] = image;
+        }
+        return image;
+      }
+    }
+
+    /// <summary>
+    /// Gets this image combined with the specified accessibility overlay.
+    /// </summary>
+    public ImageSource GetImage(Accessibility accessibility, bool isStatic = false) {
+      int accessibilityIndex = GetAccessibilityOverlayIndex(accessibility);
+      int index;
+      if (isStatic && showStaticOverlay)
+        index = accessibilityOverlays.Length + accessibilityIndex;
+      else
+        index = accessibilityIndex;
+
+      if (index == 0)
+        return this.BaseImage;
+
+      ImageSource image = images[index];
+      if (image == null) {
+        DrawingGroup g = new DrawingGroup();
+        Rect iconRect = new Rect(0, 0, 16, 16);
+        g.Children.Add(new ImageDrawing(this.BaseImage, iconRect));
+
+        if (accessibilityOverlays[accessibilityIndex] != null)
+          g.Children.Add(new ImageDrawing(accessibilityOverlays[accessibilityIndex], iconRect));
+
+        image = new DrawingImage(g);
+        image.Freeze();
+        Thread.MemoryBarrier();
+        images[index] = image;
+      }
+      return image;
+    }
+
+    /// <inheritdoc/>
+    public override string ToString() {
+      return "[CompletionImage " + imageName + "]";
+    }
+    #endregion
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/VariableCompletionData.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/VariableCompletionData.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/VariableCompletionData.cs	(revision 11937)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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 ICSharpCode.AvalonEdit.CodeCompletion;
+using ICSharpCode.NRefactory.Completion;
+using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.TypeSystem;
+
+namespace HeuristicLab.CodeEditor {
+  internal class VariableCompletionData : CompletionData, IVariableCompletionData {
+    private static readonly CSharpAmbience Ambience = new CSharpAmbience();
+
+    #region IVariableCompletionData Members
+    public IVariable Variable { get; private set; }
+    #endregion
+
+    public VariableCompletionData(IVariable variable)
+      : base() {
+      if (variable == null) throw new ArgumentException("variable");
+
+      Variable = variable;
+      Ambience.ConversionFlags = ConversionFlags.StandardConversionFlags;
+      DisplayText = CompletionText = variable.Name;
+      Description = Ambience.ConvertVariable(variable);
+      Image = CompletionImage.Field.BaseImage;
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionResult.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionResult.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionResult.cs	(revision 11937)
@@ -0,0 +1,36 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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 ICSharpCode.AvalonEdit.CodeCompletion;
+
+namespace HeuristicLab.CodeEditor {
+  internal class CodeCompletionResult {
+    public IList<ICompletionData> CompletionData { get; set; }
+    public int TriggerWordLength { get; set; }
+    public string TriggerWord { get; set; }
+    public IOverloadProvider OverloadProvider { get; set; }
+
+    public CodeCompletionResult() {
+      CompletionData = new List<ICompletionData>();
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionStrategy.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionStrategy.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionStrategy.cs	(revision 11937)
@@ -0,0 +1,98 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using ICSharpCode.AvalonEdit.CodeCompletion;
+
+namespace HeuristicLab.CodeEditor {
+  internal abstract class CodeCompletionStrategy : ICodeCompletionStrategy {
+    protected readonly CodeEditor codeEditor;
+    protected readonly Task backgroundParser;
+
+    protected CodeCompletionStrategy(CodeEditor codeEditor) {
+      this.codeEditor = codeEditor;
+      backgroundParser = new Task(DoBackgroundParsing);
+    }
+
+    public virtual void DoCodeCompletion(bool controlSpace) {
+      var codeCompletionResult = GetCodeCompletionResult(controlSpace);
+      ApplyCodeCompletionData(codeCompletionResult);
+    }
+
+    public virtual void Initialize() {
+      if (backgroundParser.Status == TaskStatus.Created)
+        backgroundParser.Start();
+    }
+
+    protected abstract CodeCompletionResult GetCodeCompletionResult(bool controlSpace);
+    protected abstract void DoParseStep();
+
+    protected virtual void ApplyCodeCompletionData(CodeCompletionResult codeCompletionResult) {
+      var textArea = codeEditor.TextEditor.TextArea;
+      var document = codeEditor.TextEditor.Document;
+      int offset = codeEditor.TextEditor.CaretOffset;
+
+      if (codeEditor.OverloadInsightWindow == null && codeCompletionResult.OverloadProvider != null) {
+        var iw = codeEditor.OverloadInsightWindow = new OverloadInsightWindow(textArea);
+        iw.Provider = codeCompletionResult.OverloadProvider;
+        iw.Show();
+        iw.Closed += (sender, args) => codeEditor.OverloadInsightWindow = null;
+      }
+
+      if (codeEditor.CompletionWindow == null && codeCompletionResult.CompletionData.Any()) {
+        var cw = codeEditor.CompletionWindow = new CompletionWindow(textArea);
+        cw.CloseWhenCaretAtBeginning = true;
+        cw.StartOffset -= codeCompletionResult.TriggerWordLength;
+        cw.Closed += (sender, args) => codeEditor.CompletionWindow = null;
+
+        var data = cw.CompletionList.CompletionData;
+        var newData = codeCompletionResult.CompletionData.OrderBy(x => x.Text).ToArray();
+        foreach (var completion in newData)
+          data.Add(completion);
+
+        if (codeCompletionResult.TriggerWordLength > 0)
+          cw.CompletionList.SelectItem(codeCompletionResult.TriggerWord);
+
+        cw.Show();
+      }
+
+      if (codeEditor.OverloadInsightWindow != null) {
+        var iw = codeEditor.OverloadInsightWindow;
+        var provider = iw.Provider as IUpdatableOverloadProvider;
+        if (provider != null) {
+          provider.Update(document, offset);
+          if (provider.RequestClose) {
+            iw.Close();
+          }
+        }
+      }
+    }
+
+    protected virtual void DoBackgroundParsing() {
+      while (!codeEditor.IsDisposed) {
+        DoParseStep();
+        Thread.Sleep(1000);
+      }
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingContext.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingContext.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingContext.cs	(revision 11937)
@@ -0,0 +1,38 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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 ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.Editor;
+
+namespace HeuristicLab.CodeEditor {
+  internal class CSharpCodeFoldingContext {
+    private readonly IDocument document;
+    public IDocument Document { get { return document; } }
+
+    private readonly SyntaxTree syntaxTree;
+    public SyntaxTree SyntaxTree { get { return syntaxTree; } }
+
+    public CSharpCodeFoldingContext(IDocument document) {
+      this.document = new ReadOnlyDocument(document, document.FileName);
+      syntaxTree = CSharpParsingHelpers.CreateSyntaxTree(this.document);
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingStrategy.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingStrategy.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingStrategy.cs	(revision 11937)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Linq;
+using CSharpBinding.Parser;
+
+namespace HeuristicLab.CodeEditor {
+  internal class CSharpCodeFoldingStrategy : CodeFoldingStrategy {
+    public CSharpCodeFoldingStrategy(CodeEditor codeEditor) : base(codeEditor) { }
+
+    protected override CodeFoldingResult GetCodeFoldingResult(out int firstErrorOffset) {
+      var document = codeEditor.TextEditor.Document;
+      var result = new CodeFoldingResult();
+
+      var foldingContext = new CSharpCodeFoldingContext(document);
+      var v = new FoldingVisitor();
+      v.document = foldingContext.Document;
+      foldingContext.SyntaxTree.AcceptVisitor(v);
+      result.FoldingData = v.foldings.OrderBy(x => x.StartOffset).ToList();
+
+      var firstError = foldingContext.SyntaxTree.Errors.FirstOrDefault();
+      firstErrorOffset = firstError != null
+        ? foldingContext.Document.GetOffset(firstError.Region.Begin)
+        : int.MaxValue;
+
+      return result;
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/FoldingVisitor.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/FoldingVisitor.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/FoldingVisitor.cs	(revision 11937)
@@ -0,0 +1,252 @@
+﻿// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+// to whom the Software is furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using ICSharpCode.AvalonEdit.Folding;
+using ICSharpCode.NRefactory;
+using ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.Editor;
+
+namespace CSharpBinding.Parser
+{
+	// TODO: move this class + NewFolding to NRefactory
+	class FoldingVisitor : DepthFirstAstVisitor
+	{
+		internal List<NewFolding> foldings = new List<NewFolding> ();
+		internal IDocument document;
+		
+		int GetOffset(TextLocation location)
+		{
+			return document.GetOffset(location);
+		}
+		
+		NewFolding AddFolding(TextLocation start, TextLocation end, bool isDefinition = false)
+		{
+			if (end.Line <= start.Line || start.IsEmpty || end.IsEmpty)
+				return null;
+			NewFolding folding = new NewFolding(GetOffset(start), GetOffset(end));
+			folding.IsDefinition = isDefinition;
+			foldings.Add(folding);
+			return folding;
+		}
+		
+		TextLocation GetEndOfPrev(AstNode node)
+		{
+			do {
+				node = node.GetPrevNode();
+			} while (node.NodeType == NodeType.Whitespace);
+			return node.EndLocation;
+		}
+		
+		#region usings
+		void AddUsings (AstNode parent)
+		{
+			var firstChild = parent.Children.FirstOrDefault (child => child is UsingDeclaration || child is UsingAliasDeclaration);
+			var node = firstChild;
+			while (node != null) {
+				var next = node.GetNextNode ();
+				if (next is UsingDeclaration || next is UsingAliasDeclaration) {
+					node = next;
+				} else {
+					break;
+				}
+			}
+			if (firstChild != node) {
+				NewFolding folding = AddFolding(firstChild.StartLocation, node.EndLocation);
+				if (folding != null) {
+					folding.Name = "using...";
+					folding.DefaultClosed = true;
+				}
+			}
+		}
+		public override void VisitSyntaxTree (SyntaxTree unit)
+		{
+			AddUsings (unit);
+			base.VisitSyntaxTree (unit);
+		}
+
+		public override void VisitNamespaceDeclaration (NamespaceDeclaration namespaceDeclaration)
+		{
+			AddUsings (namespaceDeclaration);
+			if (!namespaceDeclaration.RBraceToken.IsNull)
+				AddFolding (namespaceDeclaration.LBraceToken.GetPrevNode ().EndLocation, namespaceDeclaration.RBraceToken.EndLocation);
+			base.VisitNamespaceDeclaration (namespaceDeclaration);
+		}
+		#endregion
+		
+		#region Entity Declarations
+		public override void VisitTypeDeclaration (TypeDeclaration typeDeclaration)
+		{
+			if (!typeDeclaration.RBraceToken.IsNull)
+				AddFolding (GetEndOfPrev(typeDeclaration.LBraceToken), typeDeclaration.RBraceToken.EndLocation);
+			base.VisitTypeDeclaration (typeDeclaration);
+		}
+		
+		public override void VisitMethodDeclaration (MethodDeclaration methodDeclaration)
+		{
+			if (!methodDeclaration.Body.IsNull) {
+				AddFolding (GetEndOfPrev(methodDeclaration.Body.LBraceToken),
+				            methodDeclaration.Body.RBraceToken.EndLocation, true);
+			}
+			base.VisitMethodDeclaration (methodDeclaration);
+		}
+		
+		public override void VisitConstructorDeclaration (ConstructorDeclaration constructorDeclaration)
+		{
+			if (!constructorDeclaration.Body.IsNull)
+				AddFolding (GetEndOfPrev(constructorDeclaration.Body.LBraceToken),
+				            constructorDeclaration.Body.RBraceToken.EndLocation, true);
+			base.VisitConstructorDeclaration (constructorDeclaration);
+		}
+		
+		public override void VisitDestructorDeclaration (DestructorDeclaration destructorDeclaration)
+		{
+			if (!destructorDeclaration.Body.IsNull)
+				AddFolding (GetEndOfPrev(destructorDeclaration.Body.LBraceToken),
+				            destructorDeclaration.Body.RBraceToken.EndLocation, true);
+			base.VisitDestructorDeclaration (destructorDeclaration);
+		}
+		
+		public override void VisitOperatorDeclaration (OperatorDeclaration operatorDeclaration)
+		{
+			if (!operatorDeclaration.Body.IsNull)
+				AddFolding (GetEndOfPrev(operatorDeclaration.Body.LBraceToken),
+				            operatorDeclaration.Body.RBraceToken.EndLocation, true);
+			base.VisitOperatorDeclaration (operatorDeclaration);
+		}
+		
+		public override void VisitPropertyDeclaration (PropertyDeclaration propertyDeclaration)
+		{
+			if (!propertyDeclaration.LBraceToken.IsNull)
+				AddFolding (GetEndOfPrev(propertyDeclaration.LBraceToken),
+				            propertyDeclaration.RBraceToken.EndLocation, true);
+			base.VisitPropertyDeclaration (propertyDeclaration);
+		}
+		
+		public override void VisitIndexerDeclaration (IndexerDeclaration indexerDeclaration)
+		{
+			if (!indexerDeclaration.LBraceToken.IsNull)
+				AddFolding (GetEndOfPrev(indexerDeclaration.LBraceToken),
+				            indexerDeclaration.RBraceToken.EndLocation, true);
+			base.VisitIndexerDeclaration (indexerDeclaration);
+		}
+		
+		public override void VisitCustomEventDeclaration (CustomEventDeclaration eventDeclaration)
+		{
+			if (!eventDeclaration.LBraceToken.IsNull)
+				AddFolding (GetEndOfPrev(eventDeclaration.LBraceToken),
+				            eventDeclaration.RBraceToken.EndLocation, true);
+			base.VisitCustomEventDeclaration (eventDeclaration);
+		}
+		#endregion
+		
+		#region Statements
+		public override void VisitSwitchStatement (SwitchStatement switchStatement)
+		{
+			if (!switchStatement.RBraceToken.IsNull)
+				AddFolding (GetEndOfPrev(switchStatement.LBraceToken),
+				            switchStatement.RBraceToken.EndLocation);
+			base.VisitSwitchStatement (switchStatement);
+		}
+		
+		public override void VisitBlockStatement (BlockStatement blockStatement)
+		{
+			if (!(blockStatement.Parent is EntityDeclaration) && blockStatement.EndLocation.Line - blockStatement.StartLocation.Line > 2) {
+				AddFolding (GetEndOfPrev(blockStatement), blockStatement.EndLocation);
+			}
+
+			base.VisitBlockStatement (blockStatement);
+		}
+		#endregion
+		
+		#region Preprocessor directives
+		Stack<NewFolding> regions = new Stack<NewFolding>();
+		
+		public override void VisitPreProcessorDirective(PreProcessorDirective preProcessorDirective)
+		{
+			switch (preProcessorDirective.Type) {
+				case PreProcessorDirectiveType.Region:
+					NewFolding folding = new NewFolding();
+					folding.DefaultClosed = true;
+					folding.Name = preProcessorDirective.Argument;
+					folding.StartOffset = GetOffset(preProcessorDirective.StartLocation);
+					regions.Push(folding);
+					break;
+				case PreProcessorDirectiveType.Endregion:
+					if (regions.Count > 0) {
+						folding = regions.Pop();
+						folding.EndOffset = GetOffset(preProcessorDirective.EndLocation);
+						foldings.Add(folding);
+					}
+					break;
+			}
+		}
+		#endregion
+		
+		#region Comments
+		public override void VisitComment(Comment comment)
+		{
+			if (comment.CommentType == CommentType.InactiveCode)
+				return; // don't fold the inactive code comment; instead fold the preprocessor directives
+			if (AreTwoSinglelineCommentsInConsecutiveLines(comment.PrevSibling as Comment, comment))
+				return; // already handled by previous comment
+			Comment lastComment = comment;
+			Comment nextComment;
+			while (true) {
+				nextComment = lastComment.NextSibling as Comment;
+				if (!AreTwoSinglelineCommentsInConsecutiveLines(lastComment, nextComment))
+					break;
+				lastComment = nextComment;
+			}
+			if (lastComment.EndLocation.Line - comment.StartLocation.Line > 2) {
+				var folding = AddFolding(comment.StartLocation, lastComment.EndLocation);
+				if (folding != null) {
+					switch (comment.CommentType) {
+						case CommentType.SingleLine:
+							folding.Name = "// ...";
+							break;
+						case CommentType.MultiLine:
+							folding.Name = "/* ... */";
+							break;
+						case CommentType.Documentation:
+							folding.Name = "/// ...";
+							break;
+						case CommentType.MultiLineDocumentation:
+							folding.Name = "/** ... */";
+							break;
+					}
+				}
+			}
+		}
+		
+		bool AreTwoSinglelineCommentsInConsecutiveLines(Comment comment1, Comment comment2)
+		{
+			if (comment1 == null || comment2 == null)
+				return false;
+			return comment1.CommentType == comment2.CommentType
+				&& comment1.StartLocation.Line == comment1.EndLocation.Line
+				&& comment1.EndLocation.Line + 1 == comment2.StartLocation.Line
+				&& comment1.StartLocation.Column == comment2.StartLocation.Column
+				&& comment2.StartLocation.Line == comment2.EndLocation.Line;
+		}
+		#endregion
+	}
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CodeFoldingResult.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CodeFoldingResult.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CodeFoldingResult.cs	(revision 11937)
@@ -0,0 +1,29 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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 ICSharpCode.AvalonEdit.Folding;
+
+namespace HeuristicLab.CodeEditor {
+  internal class CodeFoldingResult {
+    public List<NewFolding> FoldingData = new List<NewFolding>();
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CodeFoldingStrategy.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CodeFoldingStrategy.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CodeFoldingStrategy.cs	(revision 11937)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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 ICSharpCode.AvalonEdit.Folding;
+
+namespace HeuristicLab.CodeEditor {
+  internal abstract class CodeFoldingStrategy : ICodeFoldingStrategy {
+    protected readonly CodeEditor codeEditor;
+    protected readonly FoldingManager foldingManager;
+
+    protected CodeFoldingStrategy(CodeEditor codeEditor) {
+      this.codeEditor = codeEditor;
+      foldingManager = FoldingManager.Install(codeEditor.TextEditor.TextArea);
+    }
+
+    public virtual void DoCodeFolding() {
+      int firstErrorOffset;
+      var codeFoldingResult = GetCodeFoldingResult(out firstErrorOffset);
+      ApplyCodeFoldingData(codeFoldingResult, firstErrorOffset);
+    }
+
+    protected abstract CodeFoldingResult GetCodeFoldingResult(out int firstErrorOffset);
+
+    protected virtual void ApplyCodeFoldingData(CodeFoldingResult codeFoldingResult, int firstErrorOffset) {
+      var foldings = codeFoldingResult.FoldingData;
+      foldingManager.UpdateFoldings(foldings, firstErrorOffset);
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/XML/XmlCodeFoldingStrategy.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/XML/XmlCodeFoldingStrategy.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/XML/XmlCodeFoldingStrategy.cs	(revision 11937)
@@ -0,0 +1,241 @@
+﻿#region License Information
+// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+// to whom the Software is furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Text;
+using System.Xml;
+using ICSharpCode.AvalonEdit.Document;
+using ICSharpCode.AvalonEdit.Folding;
+
+namespace HeuristicLab.CodeEditor {
+  internal class XmlCodeFoldingStrategy : CodeFoldingStrategy {
+    /// <summary>
+    /// Holds information about the start of a fold in an xml string.
+    /// </summary>
+    sealed class XmlFoldStart : NewFolding {
+      internal int StartLine;
+    }
+
+    /// <summary>
+    /// Flag indicating whether attributes should be displayed on folded
+    /// elements.
+    /// </summary>
+    public bool ShowAttributesWhenFolded { get; set; }
+
+    public XmlCodeFoldingStrategy(CodeEditor codeEditor) : base(codeEditor) { }
+
+    protected override CodeFoldingResult GetCodeFoldingResult(out int firstErrorOffset) {
+      var document = codeEditor.TextEditor.Document;
+      var result = new CodeFoldingResult();
+
+      try {
+        var reader = new XmlTextReader(document.CreateReader()) { XmlResolver = null };
+        var foldings = CreateNewFoldings(document, reader, out firstErrorOffset);
+        result.FoldingData = foldings.ToList();
+      } catch (XmlException) {
+        firstErrorOffset = 0;
+        result.FoldingData = new List<NewFolding>();
+      }
+
+      return result;
+    }
+
+    /// <summary>
+    /// Create <see cref="NewFolding"/>s for the specified document.
+    /// </summary>
+    public IEnumerable<NewFolding> CreateNewFoldings(TextDocument document, XmlReader reader, out int firstErrorOffset) {
+      Stack<XmlFoldStart> stack = new Stack<XmlFoldStart>();
+      List<NewFolding> foldMarkers = new List<NewFolding>();
+      try {
+        while (reader.Read()) {
+          switch (reader.NodeType) {
+            case XmlNodeType.Element:
+              if (!reader.IsEmptyElement) {
+                XmlFoldStart newFoldStart = CreateElementFoldStart(document, reader);
+                stack.Push(newFoldStart);
+              }
+              break;
+
+            case XmlNodeType.EndElement:
+              XmlFoldStart foldStart = stack.Pop();
+              CreateElementFold(document, foldMarkers, reader, foldStart);
+              break;
+
+            case XmlNodeType.Comment:
+              CreateCommentFold(document, foldMarkers, reader);
+              break;
+          }
+        }
+        firstErrorOffset = -1;
+      } catch (XmlException ex) {
+        // ignore errors at invalid positions (prevent ArgumentOutOfRangeException)
+        if (ex.LineNumber >= 1 && ex.LineNumber <= document.LineCount)
+          firstErrorOffset = document.GetOffset(ex.LineNumber, ex.LinePosition);
+        else
+          firstErrorOffset = 0;
+      }
+      foldMarkers.Sort((a, b) => a.StartOffset.CompareTo(b.StartOffset));
+      return foldMarkers;
+    }
+
+    static int GetOffset(TextDocument document, XmlReader reader) {
+      IXmlLineInfo info = reader as IXmlLineInfo;
+      if (info != null && info.HasLineInfo()) {
+        return document.GetOffset(info.LineNumber, info.LinePosition);
+      } else {
+        throw new ArgumentException("XmlReader does not have positioning information.");
+      }
+    }
+
+    /// <summary>
+    /// Creates a comment fold if the comment spans more than one line.
+    /// </summary>
+    /// <remarks>The text displayed when the comment is folded is the first
+    /// line of the comment.</remarks>
+    static void CreateCommentFold(TextDocument document, List<NewFolding> foldMarkers, XmlReader reader) {
+      string comment = reader.Value;
+      if (comment != null) {
+        int firstNewLine = comment.IndexOf('\n');
+        if (firstNewLine >= 0) {
+
+          // Take off 4 chars to get the actual comment start (takes
+          // into account the <!-- chars.
+
+          int startOffset = GetOffset(document, reader) - 4;
+          int endOffset = startOffset + comment.Length + 7;
+
+          string foldText = String.Concat("<!--", comment.Substring(0, firstNewLine).TrimEnd('\r'), "-->");
+          foldMarkers.Add(new NewFolding(startOffset, endOffset) { Name = foldText });
+        }
+      }
+    }
+
+    /// <summary>
+    /// Creates an XmlFoldStart for the start tag of an element.
+    /// </summary>
+    XmlFoldStart CreateElementFoldStart(TextDocument document, XmlReader reader) {
+      // Take off 1 from the offset returned
+      // from the xml since it points to the start
+      // of the element name and not the beginning
+      // tag.
+      //XmlFoldStart newFoldStart = new XmlFoldStart(reader.Prefix, reader.LocalName, reader.LineNumber - 1, reader.LinePosition - 2);
+      XmlFoldStart newFoldStart = new XmlFoldStart();
+
+      IXmlLineInfo lineInfo = (IXmlLineInfo)reader;
+      newFoldStart.StartLine = lineInfo.LineNumber;
+      newFoldStart.StartOffset = document.GetOffset(newFoldStart.StartLine, lineInfo.LinePosition - 1);
+
+      if (this.ShowAttributesWhenFolded && reader.HasAttributes) {
+        newFoldStart.Name = String.Concat("<", reader.Name, " ", GetAttributeFoldText(reader), ">");
+      } else {
+        newFoldStart.Name = String.Concat("<", reader.Name, ">");
+      }
+
+      return newFoldStart;
+    }
+
+    /// <summary>
+    /// Create an element fold if the start and end tag are on
+    /// different lines.
+    /// </summary>
+    static void CreateElementFold(TextDocument document, List<NewFolding> foldMarkers, XmlReader reader, XmlFoldStart foldStart) {
+      IXmlLineInfo lineInfo = (IXmlLineInfo)reader;
+      int endLine = lineInfo.LineNumber;
+      if (endLine > foldStart.StartLine) {
+        int endCol = lineInfo.LinePosition + reader.Name.Length + 1;
+        foldStart.EndOffset = document.GetOffset(endLine, endCol);
+        foldMarkers.Add(foldStart);
+      }
+    }
+
+    /// <summary>
+    /// Gets the element's attributes as a string on one line that will
+    /// be displayed when the element is folded.
+    /// </summary>
+    /// <remarks>
+    /// Currently this puts all attributes from an element on the same
+    /// line of the start tag.  It does not cater for elements where attributes
+    /// are not on the same line as the start tag.
+    /// </remarks>
+    static string GetAttributeFoldText(XmlReader reader) {
+      StringBuilder text = new StringBuilder();
+
+      for (int i = 0; i < reader.AttributeCount; ++i) {
+        reader.MoveToAttribute(i);
+
+        text.Append(reader.Name);
+        text.Append("=");
+        text.Append(reader.QuoteChar.ToString());
+        text.Append(XmlEncodeAttributeValue(reader.Value, reader.QuoteChar));
+        text.Append(reader.QuoteChar.ToString());
+
+        // Append a space if this is not the
+        // last attribute.
+        if (i < reader.AttributeCount - 1) {
+          text.Append(" ");
+        }
+      }
+
+      return text.ToString();
+    }
+
+    /// <summary>
+    /// Xml encode the attribute string since the string returned from
+    /// the XmlTextReader is the plain unencoded string and .NET
+    /// does not provide us with an xml encode method.
+    /// </summary>
+    static string XmlEncodeAttributeValue(string attributeValue, char quoteChar) {
+      StringBuilder encodedValue = new StringBuilder(attributeValue);
+
+      encodedValue.Replace("&", "&amp;");
+      encodedValue.Replace("<", "&lt;");
+      encodedValue.Replace(">", "&gt;");
+
+      if (quoteChar == '"') {
+        encodedValue.Replace("\"", "&quot;");
+      } else {
+        encodedValue.Replace("'", "&apos;");
+      }
+
+      return encodedValue.ToString();
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Helpers/CSharpParsingHelpers.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Helpers/CSharpParsingHelpers.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Helpers/CSharpParsingHelpers.cs	(revision 11937)
@@ -0,0 +1,41 @@
+﻿#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 ICSharpCode.NRefactory.CSharp;
+using ICSharpCode.NRefactory.CSharp.TypeSystem;
+using ICSharpCode.NRefactory.Editor;
+
+namespace HeuristicLab.CodeEditor {
+  internal class CSharpParsingHelpers {
+    public static SyntaxTree CreateSyntaxTree(IDocument document) {
+      var parser = new CSharpParser();
+      var syntaxTree = parser.Parse(document, document.FileName);
+      return syntaxTree;
+    }
+
+    public static CSharpUnresolvedFile CreateCSharpUnresolvedFile(IDocument document) {
+      var syntaxTree = CreateSyntaxTree(document);
+      syntaxTree.Freeze();
+      var unresolvedFile = syntaxTree.ToTypeSystem();
+      return unresolvedFile;
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ICodeCompletionStrategy.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ICodeCompletionStrategy.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ICodeCompletionStrategy.cs	(revision 11937)
@@ -0,0 +1,27 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.CodeEditor {
+  internal interface ICodeCompletionStrategy {
+    void DoCodeCompletion(bool controlSpace);
+    void Initialize();
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ICodeFoldingStrategy.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ICodeFoldingStrategy.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ICodeFoldingStrategy.cs	(revision 11937)
@@ -0,0 +1,26 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.CodeEditor {
+  internal interface ICodeFoldingStrategy {
+    void DoCodeFolding();
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ILanguageFeatures.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ILanguageFeatures.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ILanguageFeatures.cs	(revision 11937)
@@ -0,0 +1,27 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.CodeEditor {
+  internal interface ILanguageFeatures {
+    ICodeFoldingStrategy CodeFoldingStrategy { get; }
+    ICodeCompletionStrategy CodeCompletionStrategy { get; }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/IUpdatableOverloadProvider.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/IUpdatableOverloadProvider.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/IUpdatableOverloadProvider.cs	(revision 11937)
@@ -0,0 +1,32 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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 ICSharpCode.AvalonEdit.CodeCompletion;
+using ICSharpCode.NRefactory.Editor;
+
+namespace HeuristicLab.CodeEditor {
+  internal interface IUpdatableOverloadProvider : IOverloadProvider {
+    bool RequestClose { get; set; }
+
+    void Update(IDocument document, int offset);
+    void Update(CSharpCodeCompletionContext completionContext);
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/LanguageFeatures.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/LanguageFeatures.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/LanguageFeatures.cs	(revision 11937)
@@ -0,0 +1,88 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Input;
+
+namespace HeuristicLab.CodeEditor {
+  internal abstract class LanguageFeatures : ILanguageFeatures {
+    protected readonly CodeEditor codeEditor;
+    protected readonly CommandBinding commandBinding;
+
+    private readonly ICodeFoldingStrategy codeFoldingStrategy;
+    public ICodeFoldingStrategy CodeFoldingStrategy { get { return codeFoldingStrategy; } }
+
+    private readonly ICodeCompletionStrategy codeCompletionStrategy;
+    public ICodeCompletionStrategy CodeCompletionStrategy { get { return codeCompletionStrategy; } }
+
+    protected LanguageFeatures(CodeEditor codeEditor, ICodeFoldingStrategy codeFoldingStrategy, ICodeCompletionStrategy codeCompletionStrategy) {
+      this.codeEditor = codeEditor;
+      this.codeFoldingStrategy = codeFoldingStrategy;
+      this.codeCompletionStrategy = codeCompletionStrategy;
+
+      commandBinding = new CommandBinding(codeEditor.CompletionCommand, CodeCompletionRequestedHandler);
+      if (codeFoldingStrategy != null) AddCodeFoldingStrategy();
+      if (codeCompletionStrategy != null) AddCodeComplectionStrategy();
+    }
+
+    #region CodeFoldingStrategy
+    protected virtual void AddCodeFoldingStrategy() {
+      codeEditor.TextEditor.TextChanged += CodeFoldingHandler;
+    }
+
+    private void CodeFoldingHandler(object sender, EventArgs e) {
+      codeFoldingStrategy.DoCodeFolding();
+    }
+    #endregion
+
+    #region CodeCompletionStrategy
+    protected virtual void AddCodeComplectionStrategy() {
+      codeEditor.Load += LoadedHandler;
+      codeEditor.TextEditor.TextArea.TextEntered += CodeCompletionHandler;
+      codeEditor.TextEditor.TextArea.TextEntering += InsertionRequestedHandler;
+      codeEditor.TextEditor.CommandBindings.Add(commandBinding);
+    }
+
+    private void LoadedHandler(object sender, EventArgs e) {
+      codeCompletionStrategy.Initialize();
+    }
+
+    private void CodeCompletionRequestedHandler(object sender, EventArgs e) {
+      var readOnlySectionProvider = codeEditor.TextEditor.TextArea.ReadOnlySectionProvider;
+      if (readOnlySectionProvider.CanInsert(codeEditor.TextEditor.CaretOffset))
+        codeCompletionStrategy.DoCodeCompletion(true);
+    }
+
+    private void CodeCompletionHandler(object sender, EventArgs e) {
+      var readOnlySectionProvider = codeEditor.TextEditor.TextArea.ReadOnlySectionProvider;
+      if (readOnlySectionProvider.CanInsert(codeEditor.TextEditor.CaretOffset))
+        codeCompletionStrategy.DoCodeCompletion(false);
+    }
+
+    private void InsertionRequestedHandler(object sender, TextCompositionEventArgs e) {
+      var cw = codeEditor.CompletionWindow;
+      if (cw != null && e.Text.Length > 0 && !char.IsLetterOrDigit(e.Text[0])) {
+        cw.CompletionList.RequestInsertion(e);
+      }
+    }
+    #endregion
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/XmlLanguageFeatures.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/XmlLanguageFeatures.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/LanguageFeatures/XmlLanguageFeatures.cs	(revision 11937)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.CodeEditor {
+  internal class XmlLanguageFeatures : LanguageFeatures {
+    public XmlLanguageFeatures(CodeEditor codeEditor)
+      : base(codeEditor, new XmlCodeFoldingStrategy(codeEditor), null) {
+    }
+
+    public static ILanguageFeatures Apply(CodeEditor codeEditor) {
+      return new XmlLanguageFeatures(codeEditor);
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/MethodDefinitionReadOnlySectionProvider.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/MethodDefinitionReadOnlySectionProvider.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/MethodDefinitionReadOnlySectionProvider.cs	(revision 11937)
@@ -0,0 +1,53 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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 ICSharpCode.AvalonEdit.Editing;
+using ICSharpCode.NRefactory.Editor;
+
+namespace HeuristicLab.CodeEditor {
+  internal class MethodDefinitionReadOnlySectionProvider : IReadOnlySectionProvider {
+    private readonly CodeEditor codeEditor;
+
+    private IDocument Doc { get { return codeEditor.TextEditor.Document; } }
+    private string Prefix { get { return codeEditor.Prefix; } }
+    private string Suffix { get { return codeEditor.Suffix; } }
+
+    public MethodDefinitionReadOnlySectionProvider(CodeEditor codeEditor) {
+      this.codeEditor = codeEditor;
+    }
+
+    public bool CanInsert(int offset) {
+      return offset >= Prefix.Length && offset <= Doc.TextLength - Suffix.Length;
+    }
+
+    public IEnumerable<ISegment> GetDeletableSegments(ISegment segment) {
+      if (segment == null)
+        throw new ArgumentNullException("segment");
+
+      int offset = segment.Offset;
+      int length = segment.Length;
+      if (offset >= Prefix.Length && offset + length <= Doc.TextLength - Suffix.Length)
+        yield return segment;
+    }
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/Plugin.cs.frame
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/Plugin.cs.frame	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/Plugin.cs.frame	(revision 11937)
@@ -0,0 +1,33 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.PluginInfrastructure;
+
+namespace HeuristicLab.CodeEditor {
+  [Plugin("HeuristicLab.CodeEditor", "3.4.0.$WCREV$")]
+  [PluginFile("HeuristicLab.CodeEditor-3.4.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.AvalonEdit", "5.0.1")]
+  [PluginDependency("HeuristicLab.NRefactory", "5.5.0")]
+  public class HeuristicLabCodeEditorPlugin : PluginBase {
+  }
+}
Index: stable/HeuristicLab.CodeEditor/3.4/Properties/AssemblyInfo.cs.frame
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/Properties/AssemblyInfo.cs.frame	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/Properties/AssemblyInfo.cs.frame	(revision 11937)
@@ -0,0 +1,56 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.CodeEditor")]
+[assembly: AssemblyDescription("Code editor with syntax highlighting and code completion")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2014 HEAL & ic#code")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("89137802-6995-4da7-839b-1d09dc67b592")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("3.4.0.0")]
+[assembly: AssemblyFileVersion("3.4.0.$WCREV$")]
Index: stable/HeuristicLab.CodeEditor/3.4/TextMarkerService.cs
===================================================================
--- stable/HeuristicLab.CodeEditor/3.4/TextMarkerService.cs	(revision 11937)
+++ stable/HeuristicLab.CodeEditor/3.4/TextMarkerService.cs	(revision 11937)
@@ -0,0 +1,370 @@
+﻿#region License Information
+// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
+// 
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+// to whom the Software is furnished to do so, subject to the following conditions:
+// 
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Diagnostics;
+using System.Linq;
+using System.Windows;
+using System.Windows.Media;
+using System.Windows.Threading;
+using ICSharpCode.AvalonEdit.Document;
+using ICSharpCode.AvalonEdit.Rendering;
+using ICSharpCode.NRefactory.Editor;
+using ICSharpCode.SharpDevelop.Editor;
+
+namespace ICSharpCode.AvalonEdit.AddIn {
+  /// <summary>
+  /// Handles the text markers for a code editor.
+  /// </summary>
+  public sealed class TextMarkerService : DocumentColorizingTransformer, IBackgroundRenderer, ITextMarkerService, ITextViewConnect {
+    TextSegmentCollection<TextMarker> markers;
+    TextDocument document;
+
+    public TextMarkerService(TextDocument document) {
+      if (document == null)
+        throw new ArgumentNullException("document");
+      this.document = document;
+      this.markers = new TextSegmentCollection<TextMarker>(document);
+    }
+
+    #region ITextMarkerService
+    public ITextMarker Create(int startOffset, int length) {
+      if (markers == null)
+        throw new InvalidOperationException("Cannot create a marker when not attached to a document");
+
+      int textLength = document.TextLength;
+      if (startOffset < 0 || startOffset > textLength)
+        throw new ArgumentOutOfRangeException("startOffset", startOffset, "Value must be between 0 and " + textLength);
+      if (length < 0 || startOffset + length > textLength)
+        throw new ArgumentOutOfRangeException("length", length, "length must not be negative and startOffset+length must not be after the end of the document");
+
+      TextMarker m = new TextMarker(this, startOffset, length);
+      markers.Add(m);
+      // no need to mark segment for redraw: the text marker is invisible until a property is set
+      return m;
+    }
+
+    public IEnumerable<ITextMarker> GetMarkersAtOffset(int offset) {
+      if (markers == null)
+        return Enumerable.Empty<ITextMarker>();
+      else
+        return markers.FindSegmentsContaining(offset);
+    }
+
+    public IEnumerable<ITextMarker> TextMarkers {
+      get { return markers ?? Enumerable.Empty<ITextMarker>(); }
+    }
+
+    public void RemoveAll(Predicate<ITextMarker> predicate) {
+      if (predicate == null)
+        throw new ArgumentNullException("predicate");
+      if (markers != null) {
+        foreach (TextMarker m in markers.ToArray()) {
+          if (predicate(m))
+            Remove(m);
+        }
+      }
+    }
+
+    public void Remove(ITextMarker marker) {
+      if (marker == null)
+        throw new ArgumentNullException("marker");
+      TextMarker m = marker as TextMarker;
+      if (markers != null && markers.Remove(m)) {
+        Redraw(m);
+        m.OnDeleted();
+      }
+    }
+
+    /// <summary>
+    /// Redraws the specified text segment.
+    /// </summary>
+    internal void Redraw(ISegment segment) {
+      foreach (var view in textViews) {
+        view.Redraw(segment, DispatcherPriority.Normal);
+      }
+      if (RedrawRequested != null)
+        RedrawRequested(this, EventArgs.Empty);
+    }
+
+    public event EventHandler RedrawRequested;
+    #endregion
+
+    #region DocumentColorizingTransformer
+    protected override void ColorizeLine(DocumentLine line) {
+      if (markers == null)
+        return;
+      int lineStart = line.Offset;
+      int lineEnd = lineStart + line.Length;
+      foreach (TextMarker marker in markers.FindOverlappingSegments(lineStart, line.Length)) {
+        Brush foregroundBrush = null;
+        if (marker.ForegroundColor != null) {
+          foregroundBrush = new SolidColorBrush(marker.ForegroundColor.Value);
+          foregroundBrush.Freeze();
+        }
+        ChangeLinePart(
+          Math.Max(marker.StartOffset, lineStart),
+          Math.Min(marker.EndOffset, lineEnd),
+          element => {
+            if (foregroundBrush != null) {
+              element.TextRunProperties.SetForegroundBrush(foregroundBrush);
+            }
+            Typeface tf = element.TextRunProperties.Typeface;
+            element.TextRunProperties.SetTypeface(new Typeface(
+              tf.FontFamily,
+              marker.FontStyle ?? tf.Style,
+              marker.FontWeight ?? tf.Weight,
+              tf.Stretch
+            ));
+          }
+        );
+      }
+    }
+    #endregion
+
+    #region IBackgroundRenderer
+    public KnownLayer Layer {
+      get {
+        // draw behind selection
+        return KnownLayer.Selection;
+      }
+    }
+
+    public void Draw(TextView textView, DrawingContext drawingContext) {
+      if (textView == null)
+        throw new ArgumentNullException("textView");
+      if (drawingContext == null)
+        throw new ArgumentNullException("drawingContext");
+      if (markers == null || !textView.VisualLinesValid)
+        return;
+      var visualLines = textView.VisualLines;
+      if (visualLines.Count == 0)
+        return;
+      int viewStart = visualLines.First().FirstDocumentLine.Offset;
+      int viewEnd = visualLines.Last().LastDocumentLine.EndOffset;
+      foreach (TextMarker marker in markers.FindOverlappingSegments(viewStart, viewEnd - viewStart)) {
+        if (marker.BackgroundColor != null) {
+          BackgroundGeometryBuilder geoBuilder = new BackgroundGeometryBuilder();
+          geoBuilder.AlignToWholePixels = true;
+          geoBuilder.CornerRadius = 3;
+          geoBuilder.AddSegment(textView, marker);
+          Geometry geometry = geoBuilder.CreateGeometry();
+          if (geometry != null) {
+            Color color = marker.BackgroundColor.Value;
+            SolidColorBrush brush = new SolidColorBrush(color);
+            brush.Freeze();
+            drawingContext.DrawGeometry(brush, null, geometry);
+          }
+        }
+        var underlineMarkerTypes = TextMarkerTypes.SquigglyUnderline | TextMarkerTypes.NormalUnderline | TextMarkerTypes.DottedUnderline;
+        if ((marker.MarkerTypes & underlineMarkerTypes) != 0) {
+          foreach (Rect r in BackgroundGeometryBuilder.GetRectsForSegment(textView, marker)) {
+            Point startPoint = r.BottomLeft;
+            Point endPoint = r.BottomRight;
+
+            Brush usedBrush = new SolidColorBrush(marker.MarkerColor);
+            usedBrush.Freeze();
+            if ((marker.MarkerTypes & TextMarkerTypes.SquigglyUnderline) != 0) {
+              double offset = 2.5;
+
+              int count = Math.Max((int)((endPoint.X - startPoint.X) / offset) + 1, 4);
+
+              StreamGeometry geometry = new StreamGeometry();
+
+              using (StreamGeometryContext ctx = geometry.Open()) {
+                ctx.BeginFigure(startPoint, false, false);
+                ctx.PolyLineTo(CreatePoints(startPoint, endPoint, offset, count).ToArray(), true, false);
+              }
+
+              geometry.Freeze();
+
+              Pen usedPen = new Pen(usedBrush, 1);
+              usedPen.Freeze();
+              drawingContext.DrawGeometry(Brushes.Transparent, usedPen, geometry);
+            }
+            if ((marker.MarkerTypes & TextMarkerTypes.NormalUnderline) != 0) {
+              Pen usedPen = new Pen(usedBrush, 1);
+              usedPen.Freeze();
+              drawingContext.DrawLine(usedPen, startPoint, endPoint);
+            }
+            if ((marker.MarkerTypes & TextMarkerTypes.DottedUnderline) != 0) {
+              Pen usedPen = new Pen(usedBrush, 1);
+              usedPen.DashStyle = DashStyles.Dot;
+              usedPen.Freeze();
+              drawingContext.DrawLine(usedPen, startPoint, endPoint);
+            }
+          }
+        }
+      }
+    }
+
+    IEnumerable<Point> CreatePoints(Point start, Point end, double offset, int count) {
+      for (int i = 0; i < count; i++)
+        yield return new Point(start.X + i * offset, start.Y - ((i + 1) % 2 == 0 ? offset : 0));
+    }
+    #endregion
+
+    #region ITextViewConnect
+    readonly List<TextView> textViews = new List<TextView>();
+
+    void ITextViewConnect.AddToTextView(TextView textView) {
+      if (textView != null && !textViews.Contains(textView)) {
+        Debug.Assert(textView.Document == document);
+        textViews.Add(textView);
+      }
+    }
+
+    void ITextViewConnect.RemoveFromTextView(TextView textView) {
+      if (textView != null) {
+        Debug.Assert(textView.Document == document);
+        textViews.Remove(textView);
+      }
+    }
+    #endregion
+  }
+
+  public sealed class TextMarker : TextSegment, ITextMarker {
+    readonly TextMarkerService service;
+
+    public TextMarker(TextMarkerService service, int startOffset, int length) {
+      if (service == null)
+        throw new ArgumentNullException("service");
+      this.service = service;
+      this.StartOffset = startOffset;
+      this.Length = length;
+      this.markerTypes = TextMarkerTypes.None;
+    }
+
+    public event EventHandler Deleted;
+
+    public bool IsDeleted {
+      get { return !this.IsConnectedToCollection; }
+    }
+
+    public void Delete() {
+      service.Remove(this);
+    }
+
+    internal void OnDeleted() {
+      if (Deleted != null)
+        Deleted(this, EventArgs.Empty);
+    }
+
+    void Redraw() {
+      service.Redraw(this);
+    }
+
+    Color? backgroundColor;
+
+    public Color? BackgroundColor {
+      get { return backgroundColor; }
+      set {
+        if (backgroundColor != value) {
+          backgroundColor = value;
+          Redraw();
+        }
+      }
+    }
+
+    Color? foregroundColor;
+
+    public Color? ForegroundColor {
+      get { return foregroundColor; }
+      set {
+        if (foregroundColor != value) {
+          foregroundColor = value;
+          Redraw();
+        }
+      }
+    }
+
+    FontWeight? fontWeight;
+
+    public FontWeight? FontWeight {
+      get { return fontWeight; }
+      set {
+        if (fontWeight != value) {
+          fontWeight = value;
+          Redraw();
+        }
+      }
+    }
+
+    FontStyle? fontStyle;
+
+    public FontStyle? FontStyle {
+      get { return fontStyle; }
+      set {
+        if (fontStyle != value) {
+          fontStyle = value;
+          Redraw();
+        }
+      }
+    }
+
+    public object Tag { get; set; }
+
+    TextMarkerTypes markerTypes;
+
+    public TextMarkerTypes MarkerTypes {
+      get { return markerTypes; }
+      set {
+        if (markerTypes != value) {
+          markerTypes = value;
+          Redraw();
+        }
+      }
+    }
+
+    Color markerColor;
+
+    public Color MarkerColor {
+      get { return markerColor; }
+      set {
+        if (markerColor != value) {
+          markerColor = value;
+          Redraw();
+        }
+      }
+    }
+
+    public object ToolTip { get; set; }
+  }
+}
