From d210263775ce238c4faf0518122299f81266efda Mon Sep 17 00:00:00 2001
From: Sebastian Bergemann <bergemann@fortiss.org>
Date: Mon, 17 Jul 2023 10:03:47 +0200
Subject: [PATCH] GREEN accepted

Issue-ref: 4299
Issue-Url: https://git.fortiss.org/af3/af3/-/issues/4299

Signed-off-by: Sebastian Bergemann <bergemann@fortiss.org>
---
 .../org/fortiss/tooling/base/ui/editor/.ratings |  2 +-
 .../editor/SourceEditorConfigurationBase.java   | 17 +----------------
 2 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/org.fortiss.tooling.base.ui/src/org/fortiss/tooling/base/ui/editor/.ratings b/org.fortiss.tooling.base.ui/src/org/fortiss/tooling/base/ui/editor/.ratings
index 3c972e10f..4d53ae602 100644
--- a/org.fortiss.tooling.base.ui/src/org/fortiss/tooling/base/ui/editor/.ratings
+++ b/org.fortiss.tooling.base.ui/src/org/fortiss/tooling/base/ui/editor/.ratings
@@ -2,6 +2,6 @@ AdvancedTreeViewerEditorBase.java 9d9eded6848ee78991d1416592d1136efd71d2b7 GREEN
 FormsEditorBase.java b113501b98ffffcac362ca9f474ad02a42bde186 GREEN
 GEFEditorBase.java e668f596f45f07215994cbbd3929a9438331718f GREEN
 SourceEditorBase.java 47e69e2e6788b9897339c384cd03f9a22755037c GREEN
-SourceEditorConfigurationBase.java f7cf7c51d7a5ef5ab997ad842e7255995aae9a60 YELLOW
+SourceEditorConfigurationBase.java 67c674248e31d467937ed33e455c07587ad0b3b1 GREEN
 SourceEditorUndoRedo.java 08127a8e0afb4f9c2f4c21294ca3220282c25bf0 GREEN
 TreeViewerEditorBase.java 1c59689ff57c4f3cc180d85f13021fc03461ecb0 GREEN
diff --git a/org.fortiss.tooling.base.ui/src/org/fortiss/tooling/base/ui/editor/SourceEditorConfigurationBase.java b/org.fortiss.tooling.base.ui/src/org/fortiss/tooling/base/ui/editor/SourceEditorConfigurationBase.java
index f7cf7c51d..67c674248 100644
--- a/org.fortiss.tooling.base.ui/src/org/fortiss/tooling/base/ui/editor/SourceEditorConfigurationBase.java
+++ b/org.fortiss.tooling.base.ui/src/org/fortiss/tooling/base/ui/editor/SourceEditorConfigurationBase.java
@@ -110,32 +110,17 @@ public abstract class SourceEditorConfigurationBase<T extends EObject>
 
 	/** Returns the rule based scanner. */
 	private RuleBasedScanner getScannerForSyntaxHighlighting() {
-		/*
-		 * FIXME (AB): Wouldn't it be cleaner and more efficient, to collect all rules in one List
-		 * that can be converted to an array at once?
-		 * 
-		 * Answer (SeBe): Yes, but you cannot directly cast the whole list to the more generic
-		 * IRule. Either, I would need to go through all lists and cast each WordRule and each
-		 * PatternRule separately to an IRule before I could merge them in one List, or I would need
-		 * to turn every initial List directly into an array and then concatenate these arrays. Both
-		 * needs more effort and computation power than the current solution.
-		 * I would therefore suggest to leave it like it is now.
-		 * 
-		 * Answer (AB): Isn't this equivalent? This way, there is no cast necessary.
-		 */
 		List<IRule> allRules = new ArrayList<IRule>();
 
-		// word rules
 		allRules.addAll(getCommonRules());
 		allRules.add(getRuleSpecificToEditor());
-
-		// pattern rules
 		allRules.add(getCommentRuleSpecificToEditor());
 
 		IRule[] rules = allRules.toArray(new IRule[0]);
 
 		RuleBasedScanner scanner = new RuleBasedScanner();
 		scanner.setRules(rules);
+
 		return scanner;
 	}
 
-- 
GitLab