Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/AssemblyLoader.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/AssemblyLoader.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/AssemblyLoader.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/AvalonEditWrapper.xaml.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/AvalonEditWrapper.xaml.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/AvalonEditWrapper.xaml.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/CodeEditor.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/CodeEditor.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/CodeEditor.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/CodeEditorBase.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/CodeEditorBase.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/CodeEditorBase.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/CodeViewer.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/CodeViewer.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/CodeViewer.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/GoToLineDialog.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/GoToLineDialog.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/GoToLineDialog.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/ITextMarker.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/ITextMarker.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/ITextMarker.cs	(revision 16692)
@@ -19,5 +19,5 @@
 
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CSharpLanguageFeatures.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CSharpLanguageFeatures.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CSharpLanguageFeatures.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionContext.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionContext.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionContext.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionDataFactory.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionDataFactory.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionDataFactory.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionStrategy.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionStrategy.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpCodeCompletionStrategy.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -44,55 +44,10 @@
       var document = codeEditor.TextEditor.Document;
       int offset = codeEditor.TextEditor.CaretOffset;
+      var result = new CodeCompletionResult();
 
-      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(
+      try {
+        var completionContext = new CSharpCodeCompletionContext(document, offset, projectContent);
+        var completionFactory = new CSharpCodeCompletionDataFactory(completionContext);
+        var cce = new CSharpCompletionEngine(
           completionContext.Document,
           completionContext.CompletionContextProvider,
@@ -100,8 +55,57 @@
           completionContext.ProjectContent,
           completionContext.TypeResolveContextAtCaret
-        );
+          );
 
-        var parameterDataProvider = pce.GetParameterDataProvider(completionContext.Offset, completionChar);
-        result.OverloadProvider = parameterDataProvider as IUpdatableOverloadProvider;
+        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;
+        }
+      } catch {
+        // ignore exceptions thrown during code completion
       }
 
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpDocumentationBuilder.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpDocumentationBuilder.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpDocumentationBuilder.cs	(revision 16692)
@@ -19,5 +19,5 @@
 
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpInsightItem.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpInsightItem.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpInsightItem.cs	(revision 16692)
@@ -19,5 +19,5 @@
 
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpOverloadProvider.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpOverloadProvider.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CSharpOverloadProvider.cs	(revision 16692)
@@ -21,5 +21,5 @@
 
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/CodeCompletionData.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/CodeCompletionData.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/CodeCompletionData.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/EntityCompletionData.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/EntityCompletionData.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/EntityCompletionData.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/Images/CompletionImage.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/Images/CompletionImage.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/Images/CompletionImage.cs	(revision 16692)
@@ -4,5 +4,5 @@
 
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/VariableCompletionData.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/VariableCompletionData.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CSharp/CompletionData/VariableCompletionData.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionResult.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionResult.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionResult.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionStrategy.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionStrategy.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionStrategy.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingContext.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingContext.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingContext.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingStrategy.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingStrategy.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CSharp/CSharpCodeFoldingStrategy.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -31,14 +31,19 @@
       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();
+      try {
+        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;
+        var firstError = foldingContext.SyntaxTree.Errors.FirstOrDefault();
+        firstErrorOffset = firstError != null
+          ? foldingContext.Document.GetOffset(firstError.Region.Begin)
+          : int.MaxValue;
+      } catch {
+        // ignore exceptions thrown during code folding
+        firstErrorOffset = int.MaxValue;
+      }
 
       return result;
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CodeFoldingResult.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CodeFoldingResult.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CodeFoldingResult.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CodeFoldingStrategy.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CodeFoldingStrategy.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/CodeFoldingStrategy.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/XML/XmlCodeFoldingStrategy.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/XML/XmlCodeFoldingStrategy.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeFolding/XML/XmlCodeFoldingStrategy.cs	(revision 16692)
@@ -19,5 +19,5 @@
 
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Helpers/CSharpParsingHelpers.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Helpers/CSharpParsingHelpers.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Helpers/CSharpParsingHelpers.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ICodeCompletionStrategy.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ICodeCompletionStrategy.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ICodeCompletionStrategy.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ICodeFoldingStrategy.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ICodeFoldingStrategy.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ICodeFoldingStrategy.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ILanguageFeatures.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ILanguageFeatures.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/ILanguageFeatures.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/IUpdatableOverloadProvider.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/IUpdatableOverloadProvider.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/Interfaces/IUpdatableOverloadProvider.cs	(revision 16692)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/LanguageFeatures.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/LanguageFeatures.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/LanguageFeatures.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/XmlLanguageFeatures.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/XmlLanguageFeatures.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/LanguageFeatures/XmlLanguageFeatures.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/MethodDefinitionReadOnlySectionProvider.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/MethodDefinitionReadOnlySectionProvider.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/MethodDefinitionReadOnlySectionProvider.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/Plugin.cs.frame
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/Plugin.cs.frame	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/Plugin.cs.frame	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -23,5 +23,5 @@
 
 namespace HeuristicLab.CodeEditor {
-  [Plugin("HeuristicLab.CodeEditor", "3.4.2.$WCREV$")]
+  [Plugin("HeuristicLab.CodeEditor", "3.4.4.$WCREV$")]
   [PluginFile("HeuristicLab.CodeEditor-3.4.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Common", "3.3")]
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/Properties/AssemblyInfo.cs.frame
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/Properties/AssemblyInfo.cs.frame	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/Properties/AssemblyInfo.cs.frame	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -31,5 +31,5 @@
 [assembly: AssemblyCompany("")]
 [assembly: AssemblyProduct("HeuristicLab")]
-[assembly: AssemblyCopyright("(c) 2002-2015 HEAL & ic#code")]
+[assembly: AssemblyCopyright("(c) 2002-2018 HEAL & ic#code")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
@@ -54,3 +54,3 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("3.4.0.0")]
-[assembly: AssemblyFileVersion("3.4.2.$WCREV$")]
+[assembly: AssemblyFileVersion("3.4.4.$WCREV$")]
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/SimpleCodeEditor.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/SimpleCodeEditor.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/SimpleCodeEditor.cs	(revision 16692)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/TextMarkerService.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/TextMarkerService.cs	(revision 15697)
+++ branches/2521_ProblemRefactoring/HeuristicLab.CodeEditor/3.4/TextMarkerService.cs	(revision 16692)
@@ -19,5 +19,5 @@
 
 /* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
