Bug 528251 - view CTabFolders result in not highlighted part stack tab

When a view contains a selected CTabFolder, selecting another view in
the same part stack results in non-highlighted view tab. This is the
case, since CTabFolder.onActivate/onDeactivate will tell ancestor
CTabFolders to highlight resp. not highlight. Selecting another view
results in deactivating the nested CTabFolder and so removing
highlighting from the part stack tabs. This regression was introduced
with the fix for Bug 474444.

With this change, highlighting is toggled only for the CTabFolder which
is being activated/deactivated. The change was verified both on Windows
and on RHEL+GTK3.14. The problem from Bug 474444 is not observed.

Change-Id: I6fd4bf7f049e84d95bd5e83332a6484164623576
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
index ecffcf5..cc547ca 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
@@ -370,13 +370,7 @@
 	if (!highlightEnabled) {
 		return;
 	}
-	Composite current = this;
-	while (current != null) {
-		if (current instanceof CTabFolder) {
-			((CTabFolder) current).highlight = false;
-		}
-		current = current.getParent();
-	}
+	this.highlight = false;
 	redraw();
 }
 
@@ -384,13 +378,7 @@
 	if (!highlightEnabled) {
 		return;
 	}
-	Composite current = this;
-	while (current != null) {
-		if (current instanceof CTabFolder) {
-			((CTabFolder) current).highlight = true;
-		}
-		current = current.getParent();
-	}
+	this.highlight = true;
 	redraw();
 }