diff --git a/java/java-tests/testSrc/com/intellij/projectView/NavigateFromSourceTest.java b/java/java-tests/testSrc/com/intellij/projectView/NavigateFromSourceTest.java index c49dfff32bd0..3bf910b757d5 100644 --- a/java/java-tests/testSrc/com/intellij/projectView/NavigateFromSourceTest.java +++ b/java/java-tests/testSrc/com/intellij/projectView/NavigateFromSourceTest.java @@ -1,17 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. */ package com.intellij.projectView; @@ -132,7 +120,7 @@ public class NavigateFromSourceTest extends BaseProjectViewTestCase { psiClass = psiFile.getClasses()[0]; pane.select(psiClass, virtualFile, true); - PlatformTestUtil.waitUntilBusy(tree); + PlatformTestUtil.waitWhileBusy(tree); PlatformTestUtil.assertTreeEqual(tree, expected, true); } } diff --git a/java/java-tests/testSrc/com/intellij/projectView/ProjectTreeSortingTest.java b/java/java-tests/testSrc/com/intellij/projectView/ProjectTreeSortingTest.java index a819c4b52c17..c2da56aa3162 100644 --- a/java/java-tests/testSrc/com/intellij/projectView/ProjectTreeSortingTest.java +++ b/java/java-tests/testSrc/com/intellij/projectView/ProjectTreeSortingTest.java @@ -1,17 +1,5 @@ /* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. */ package com.intellij.projectView; @@ -249,7 +237,7 @@ public class ProjectTreeSortingTest extends BaseProjectViewTestCase { private void assertTree(String expected) { TreePath path = PlatformTestUtil.waitForPromise(myPane.promisePathToElement(getContentDirectory())); - PlatformTestUtil.waitUntilBusy(myPane.getTree()); + PlatformTestUtil.waitWhileBusy(myPane.getTree()); Object element = path.getLastPathComponent(); assertNotNull("Element for " + getContentDirectory() + " not found", element); assertEquals(expected, PlatformTestUtil.print(myPane.getTree(), element, new Queryable.PrintInfo(), false)); diff --git a/java/java-tests/testSrc/com/intellij/projectView/ProjectViewUpdatingTest.java b/java/java-tests/testSrc/com/intellij/projectView/ProjectViewUpdatingTest.java index f3bcc99f8b8a..5ff8d4ca4a5d 100644 --- a/java/java-tests/testSrc/com/intellij/projectView/ProjectViewUpdatingTest.java +++ b/java/java-tests/testSrc/com/intellij/projectView/ProjectViewUpdatingTest.java @@ -1,17 +1,5 @@ /* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. */ package com.intellij.projectView; @@ -50,7 +38,7 @@ public class ProjectViewUpdatingTest extends BaseProjectViewTestCase { final AbstractProjectViewPSIPane pane = myStructure.createPane(); getProjectTreeStructure().setProviders(); pane.select(element, element.getContainingFile().getVirtualFile(), true); - PlatformTestUtil.waitUntilBusy(pane.getTree()); + PlatformTestUtil.waitWhileBusy(pane.getTree()); PlatformTestUtil.assertTreeEqual(pane.getTree(), "-Project\n" + " -PsiDirectory: standardProviders\n" + " -PsiDirectory: src\n" + @@ -102,7 +90,7 @@ public class ProjectViewUpdatingTest extends BaseProjectViewTestCase { final PsiClass aClass = classFile.getClasses()[0]; final PsiFile containingFile = aClass.getContainingFile(); pane.select(aClass, containingFile.getVirtualFile(), true); - PlatformTestUtil.waitUntilBusy(pane.getTree()); + PlatformTestUtil.waitWhileBusy(pane.getTree()); PlatformTestUtil.assertTreeEqual(pane.getTree(), "-Project\n" + " -PsiDirectory: updateProjectView\n" + " -PsiDirectory: src\n" + @@ -148,7 +136,7 @@ public class ProjectViewUpdatingTest extends BaseProjectViewTestCase { PlatformTestUtil.waitForAlarm(600); final PsiFile containingFile2 = aClass2.getContainingFile(); pane.select(aClass2, containingFile2.getVirtualFile(), true); - PlatformTestUtil.waitUntilBusy(pane.getTree()); + PlatformTestUtil.waitWhileBusy(pane.getTree()); PlatformTestUtil.assertTreeEqual(pane.getTree(), "-Project\n" + " -PsiDirectory: updateProjectView\n" + " -PsiDirectory: src\n" + @@ -181,7 +169,7 @@ public class ProjectViewUpdatingTest extends BaseProjectViewTestCase { PsiClass aClass = classFile.getClasses()[0]; PsiFile containingFile = aClass.getContainingFile(); pane.select(aClass, containingFile.getVirtualFile(), true); - PlatformTestUtil.waitUntilBusy(pane.getTree()); + PlatformTestUtil.waitWhileBusy(pane.getTree()); PlatformTestUtil.assertTreeEqual(pane.getTree(), "-Project\n" + " -PsiDirectory: showClassMembers\n" + " -PsiDirectory: src\n" + @@ -228,7 +216,7 @@ public class ProjectViewUpdatingTest extends BaseProjectViewTestCase { final PsiField lastField = aClass.getFields()[1]; pane.select(lastField, containingFile.getVirtualFile(), true); - PlatformTestUtil.waitUntilBusy(pane.getTree()); + PlatformTestUtil.waitWhileBusy(pane.getTree()); PlatformTestUtil.assertTreeEqual(pane.getTree(), "-Project\n" + " -PsiDirectory: showClassMembers\n" + " -PsiDirectory: src\n" + @@ -395,7 +383,7 @@ public class ProjectViewUpdatingTest extends BaseProjectViewTestCase { AbstractTreeBuilder builder = pane.getTreeBuilder(); if (builder == null) { pane.updateFromRoot(false); - PlatformTestUtil.waitUntilBusy(tree); + PlatformTestUtil.waitWhileBusy(tree); PlatformTestUtil.assertTreeEqual(tree, "-Project\n" + " -1\n" + " +01.2\n" + diff --git a/java/java-tests/testSrc/com/intellij/projectView/StructureViewUpdatingTest.java b/java/java-tests/testSrc/com/intellij/projectView/StructureViewUpdatingTest.java index 1ce282558ad9..d216f41f090c 100644 --- a/java/java-tests/testSrc/com/intellij/projectView/StructureViewUpdatingTest.java +++ b/java/java-tests/testSrc/com/intellij/projectView/StructureViewUpdatingTest.java @@ -1,17 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. */ package com.intellij.projectView; @@ -137,7 +125,7 @@ public class StructureViewUpdatingTest extends TestSourceBasedTestCase { svc.select(innerClassField, true); - PlatformTestUtil.waitUntilBusy(svc.getTree()); + PlatformTestUtil.waitWhileBusy(svc.getTree()); PlatformTestUtil.assertTreeEqual( svc.getTree(), "-Class2.java\n" + diff --git a/platform/testFramework/src/com/intellij/projectView/TestProjectTreeStructure.java b/platform/testFramework/src/com/intellij/projectView/TestProjectTreeStructure.java index ffa7871b5507..4b309ed7a14d 100644 --- a/platform/testFramework/src/com/intellij/projectView/TestProjectTreeStructure.java +++ b/platform/testFramework/src/com/intellij/projectView/TestProjectTreeStructure.java @@ -1,17 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. */ package com.intellij.projectView; @@ -42,7 +30,7 @@ public class TestProjectTreeStructure extends AbstractProjectTreeStructure imple public void checkNavigateFromSourceBehaviour(PsiElement element, VirtualFile virtualFile, AbstractProjectViewPSIPane pane) { Assert.assertNull(ProjectViewTestUtil.getNodeForElement(element, pane)); pane.select(element, virtualFile, true); - PlatformTestUtil.waitUntilBusy(pane.getTree()); + PlatformTestUtil.waitWhileBusy(pane.getTree()); Assert.assertTrue(ProjectViewTestUtil.isExpanded(element, pane)); } @@ -50,7 +38,7 @@ public class TestProjectTreeStructure extends AbstractProjectTreeStructure imple final AbstractProjectViewPSIPane pane = new TestProjectViewPSIPane(myProject, this, 9); pane.createComponent(); Disposer.register(this, pane); - PlatformTestUtil.waitUntilBusy(pane.getTree()); + PlatformTestUtil.waitWhileBusy(pane.getTree()); return pane; } diff --git a/platform/testFramework/src/com/intellij/testFramework/PlatformTestUtil.java b/platform/testFramework/src/com/intellij/testFramework/PlatformTestUtil.java index 148f35de710b..aba490efa046 100644 --- a/platform/testFramework/src/com/intellij/testFramework/PlatformTestUtil.java +++ b/platform/testFramework/src/com/intellij/testFramework/PlatformTestUtil.java @@ -1,17 +1,5 @@ /* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. */ package com.intellij.testFramework; @@ -258,7 +246,7 @@ public class PlatformTestUtil { public static void expand(JTree tree, int... rows) { for (int row : rows) { tree.expandRow(row); - waitUntilBusy(tree); + waitWhileBusy(tree); } } @@ -284,7 +272,7 @@ public class PlatformTestUtil { } @TestOnly - public static void waitUntilBusy(JTree tree) { + public static void waitWhileBusy(JTree tree) { assert EventQueue.isDispatchThread(); long millis = 10000L + System.currentTimeMillis(); while (isBusy(tree)) { diff --git a/plugins/properties/testSrc/com/intellij/lang/properties/PropertiesProjectViewTest.java b/plugins/properties/testSrc/com/intellij/lang/properties/PropertiesProjectViewTest.java index 826499dc6634..bf626ae80ba5 100644 --- a/plugins/properties/testSrc/com/intellij/lang/properties/PropertiesProjectViewTest.java +++ b/plugins/properties/testSrc/com/intellij/lang/properties/PropertiesProjectViewTest.java @@ -1,17 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. */ package com.intellij.lang.properties; @@ -115,7 +103,7 @@ public class PropertiesProjectViewTest extends LightPlatformCodeInsightFixtureTe PsiFile psiFile = getPsiManager().findFile(myFixture.findFileInTempDir(getTestName(true) + "/xxx.properties")); assert psiFile != null; pane.select(psiFile, psiFile.getVirtualFile(), sortByType); - PlatformTestUtil.waitUntilBusy(pane.getTree()); + PlatformTestUtil.waitWhileBusy(pane.getTree()); return pane; } }