Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael Istria2016-10-13 08:54:39 +0000
committerMickael Istria2016-10-13 09:09:28 +0000
commit1a9d72873c8c8c2b74bc39442a3a66dc786a9cf2 (patch)
treece0a499280a98fb181da4e9f074092b6fc76a506 /org.eclipse.ui.genericeditor/src
parent8cbe29285e04f0b0e23b0346e953a62f0a8ccd75 (diff)
downloadeclipse.platform.text-1a9d72873c8c8c2b74bc39442a3a66dc786a9cf2.tar.gz
eclipse.platform.text-1a9d72873c8c8c2b74bc39442a3a66dc786a9cf2.tar.xz
eclipse.platform.text-1a9d72873c8c8c2b74bc39442a3a66dc786a9cf2.zip
Bug 505842 - [generic editor] Test failure in HoverTest.testHoverY20161013-1000
Add more pauses to let event process Change-Id: I5005c4c8879cf07d2cad0ce11aa5057849ced55e Signed-off-by: Mickael Istria <mistria@redhat.com>
Diffstat (limited to 'org.eclipse.ui.genericeditor/src')
-rw-r--r--org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/ExtensionBasedTextViewerConfiguration.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/ExtensionBasedTextViewerConfiguration.java b/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/ExtensionBasedTextViewerConfiguration.java
index 10a89a3b3..d5b84b523 100644
--- a/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/ExtensionBasedTextViewerConfiguration.java
+++ b/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/ExtensionBasedTextViewerConfiguration.java
@@ -11,9 +11,10 @@
package org.eclipse.ui.internal.genericeditor;
import java.util.Arrays;
-import java.util.Iterator;
import java.util.LinkedHashSet;
+import java.util.LinkedList;
import java.util.List;
+import java.util.Queue;
import java.util.Set;
import org.eclipse.core.runtime.Platform;
@@ -58,10 +59,14 @@ public final class ExtensionBasedTextViewerConfiguration extends TextSourceViewe
private Set<IContentType> getContentTypes() {
if (this.contentTypes == null) {
this.contentTypes = new LinkedHashSet<>();
- this.contentTypes.addAll(Arrays.asList(Platform.getContentTypeManager().findContentTypesFor(editor.getEditorInput().getName())));
- Iterator<IContentType> it = this.contentTypes.iterator();
- while (it.hasNext()) {
- this.contentTypes.add(it.next().getBaseType());
+ Queue<IContentType> types = new LinkedList<>(Arrays.asList(Platform.getContentTypeManager().findContentTypesFor(editor.getEditorInput().getName())));
+ while (!types.isEmpty()) {
+ IContentType type = types.poll();
+ this.contentTypes.add(type);
+ IContentType parent = type.getBaseType();
+ if (parent != null) {
+ types.add(parent);
+ }
}
}
return this.contentTypes;

Back to the top