diff --git a/java/testFramework/src/com/intellij/testFramework/codeInsight/hierarchy/HierarchyViewTestBase.java b/java/testFramework/src/com/intellij/testFramework/codeInsight/hierarchy/HierarchyViewTestBase.java index 1cebeb8a490b..5e6a31fb1dfa 100755 --- a/java/testFramework/src/com/intellij/testFramework/codeInsight/hierarchy/HierarchyViewTestBase.java +++ b/java/testFramework/src/com/intellij/testFramework/codeInsight/hierarchy/HierarchyViewTestBase.java @@ -46,8 +46,21 @@ public abstract class HierarchyViewTestBase extends CodeInsightTestCase { } private static String dump(final HierarchyTreeStructure treeStructure, @Nullable HierarchyNodeDescriptor descriptor, int level) { + StringBuilder s = new StringBuilder(); + dump(treeStructure, descriptor, level, s); + return s.toString(); + } + + private static void dump(final HierarchyTreeStructure treeStructure, + @Nullable HierarchyNodeDescriptor descriptor, + int level, + StringBuilder b) { + if (level > 10) { + for(int i = 0; i\n"); + return; + } if(descriptor==null) descriptor = (HierarchyNodeDescriptor)treeStructure.getRootElement(); - StringBuilder b = new StringBuilder(); for(int i = 0; i0) { b.append(">\n"); - for(Object o : children) { + for (Object o : children) { HierarchyNodeDescriptor d = (HierarchyNodeDescriptor)o; - b.append(dump(treeStructure, d, level + 1)); + dump(treeStructure, d, level + 1, b); } for(int i = 0; i\n"); } else { b.append("/>\n"); } - return b.toString(); } private static void checkHierarchyTreeStructure(final HierarchyTreeStructure treeStructure, final Document document) { diff --git a/platform/util/src/com/intellij/util/CommonProcessors.java b/platform/util/src/com/intellij/util/CommonProcessors.java index 68c348423313..e0b3492610ae 100644 --- a/platform/util/src/com/intellij/util/CommonProcessors.java +++ b/platform/util/src/com/intellij/util/CommonProcessors.java @@ -58,6 +58,20 @@ public class CommonProcessors { public Collection getResults() { return myCollection; } + + public static class Sync extends CollectProcessor { + public Sync(final Collection collection) { + super(collection); + } + + public Sync() { + } + + @Override + public synchronized boolean process(final T t) { + return super.process(t); + } + } } @NotNull