diff --git a/java/compiler/impl/testSrc/com/intellij/compiler/BaseCompilerTestCase.java b/java/compiler/impl/testSrc/com/intellij/compiler/BaseCompilerTestCase.java index 3e34ee657a4c9..8544f14e254a2 100644 --- a/java/compiler/impl/testSrc/com/intellij/compiler/BaseCompilerTestCase.java +++ b/java/compiler/impl/testSrc/com/intellij/compiler/BaseCompilerTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -66,7 +66,7 @@ protected void setUpModule() { @Override protected void setUp() throws Exception { super.setUp(); - myProject.getMessageBus().connect(myTestRootDisposable).subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootAdapter() { + myProject.getMessageBus().connect(getTestRootDisposable()).subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootAdapter() { @Override public void rootsChanged(ModuleRootEvent event) { //todo[nik] projectOpened isn't called in tests so we need to add this listener manually @@ -249,7 +249,7 @@ private CompilationLog compile(final ParameterizedRunnable elements, @NotNull } }; LineMarkerProviders.INSTANCE.addExplicitExtension(JavaLanguage.INSTANCE, provider); - Disposer.register(myTestRootDisposable, () -> LineMarkerProviders.INSTANCE.removeExplicitExtension(JavaLanguage.INSTANCE, provider)); + Disposer.register(getTestRootDisposable(), () -> LineMarkerProviders.INSTANCE.removeExplicitExtension(JavaLanguage.INSTANCE, provider)); myDaemonCodeAnalyzer.restart(); try { TextRange range = FileStatusMap.getDirtyTextRange(getEditor(), Pass.UPDATE_ALL); @@ -2194,7 +2197,7 @@ public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file } }; IntentionManager.getInstance().addAction(longLongUpdate); - Disposer.register(myTestRootDisposable, () -> IntentionManager.getInstance().unregisterIntention(longLongUpdate)); + Disposer.register(getTestRootDisposable(), () -> IntentionManager.getInstance().unregisterIntention(longLongUpdate)); configureByText(JavaFileType.INSTANCE, "class X { }"); makeEditorWindowVisible(new Point(0, 0)); doHighlighting(); @@ -2221,7 +2224,7 @@ public void testLightBulbIsHiddenWhenFixRangeIsCollapsed() { ((EditorImpl)myEditor).getScrollPane().getViewport().setSize(1000, 1000); final Set visibleHints = ContainerUtil.newIdentityTroveSet(); - getProject().getMessageBus().connect(myTestRootDisposable).subscribe(EditorHintListener.TOPIC, new EditorHintListener() { + getProject().getMessageBus().connect(getTestRootDisposable()).subscribe(EditorHintListener.TOPIC, new EditorHintListener() { @Override public void hintShown(final Project project, final LightweightHint hint, final int flags) { visibleHints.add(hint); diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlighting8Test.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlighting8Test.java index 82d2f2e7151f1..6cf13ad22cb98 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlighting8Test.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlighting8Test.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * 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. @@ -803,7 +803,7 @@ private void doTest() { private void doTest(boolean warnings) { LanguageLevelProjectExtension.getInstance(getJavaFacade().getProject()).setLanguageLevel(LanguageLevel.JDK_1_8); - IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_8, getModule(), myTestRootDisposable); + IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_8, getModule(), getTestRootDisposable()); doTest(BASE_PATH + "/" + getTestName(false) + ".java", warnings, false); } diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlightingGenerated8Test.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlightingGenerated8Test.java index 383d3deb0ee98..020befac8ee10 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlightingGenerated8Test.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlightingGenerated8Test.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * 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. @@ -43,7 +43,7 @@ public void _testUnrelatedClassesExtendsTypeParams() throws Exception { private void doTest() { LanguageLevelProjectExtension.getInstance(getJavaFacade().getProject()).setLanguageLevel(LanguageLevel.JDK_1_8); - IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_8, getModule(), myTestRootDisposable); + IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_8, getModule(), getTestRootDisposable()); doTest(BASE_PATH + "/" + getTestName(false) + ".java", false, false); } } diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/ReplaceWithOfNullableFixTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/ReplaceWithOfNullableFixTest.java index 9c5c07013b7e0..8df4cf22e5c5b 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/ReplaceWithOfNullableFixTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/ReplaceWithOfNullableFixTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -45,7 +45,7 @@ protected String getBasePath() { @Override protected void beforeActionStarted(String testName, String contents) { if (testName.contains("Guava")) { - ReplaceFromOfNullableFixTest.addGuavaOptional(myTestRootDisposable); + ReplaceFromOfNullableFixTest.addGuavaOptional(getTestRootDisposable()); } super.beforeActionStarted(testName, contents); } diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/CanBeFinalTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/CanBeFinalTest.java index d48fd32632152..859e985f80a4f 100644 --- a/java/java-tests/testSrc/com/intellij/codeInspection/CanBeFinalTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInspection/CanBeFinalTest.java @@ -1,3 +1,19 @@ +/* + * 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. + */ + /* * Created by IntelliJ IDEA. * User: max @@ -11,7 +27,6 @@ import com.intellij.JavaTestUtil; import com.intellij.codeInsight.daemon.ImplicitUsageProvider; import com.intellij.codeInspection.canBeFinal.CanBeFinalInspection; -import com.intellij.openapi.extensions.Extensions; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiField; import com.intellij.psi.PsiNamedElement; @@ -143,7 +158,7 @@ public boolean isImplicitRead(PsiElement element) { public boolean isImplicitWrite(PsiElement element) { return element instanceof PsiField && "implicitWrite".equals(((PsiNamedElement)element).getName()); } - }, myTestRootDisposable); + }, getTestRootDisposable()); doTest(); } diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/DataFlowInspection8Test.java b/java/java-tests/testSrc/com/intellij/codeInspection/DataFlowInspection8Test.java index a382393b7feca..653a90b39d816 100644 --- a/java/java-tests/testSrc/com/intellij/codeInspection/DataFlowInspection8Test.java +++ b/java/java-tests/testSrc/com/intellij/codeInspection/DataFlowInspection8Test.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -75,7 +75,7 @@ private void setupCustomAnnotations() { NullableNotNullManager nnnManager = NullableNotNullManager.getInstance(getProject()); nnnManager.setNotNulls("foo.NotNull"); nnnManager.setNullables("foo.Nullable"); - Disposer.register(myTestRootDisposable, () -> { + Disposer.register(getTestRootDisposable(), () -> { nnnManager.setNotNulls(); nnnManager.setNullables(); }); diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/MagicConstantInspectionTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/MagicConstantInspectionTest.java index 7cf6062df848f..8588e37d1fbf6 100644 --- a/java/java-tests/testSrc/com/intellij/codeInspection/MagicConstantInspectionTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInspection/MagicConstantInspectionTest.java @@ -57,7 +57,7 @@ protected String getTestDataPath() { protected void setUp() throws Exception { super.setUp(); myFilter = new FileTreeAccessFilter(); - PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(myFilter, myTestRootDisposable); + PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(myFilter, getTestRootDisposable()); } @Override diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/NullableStuffInspectionTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/NullableStuffInspectionTest.java index 4a27815e27d2c..4747a86311e8f 100644 --- a/java/java-tests/testSrc/com/intellij/codeInspection/NullableStuffInspectionTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInspection/NullableStuffInspectionTest.java @@ -1,3 +1,19 @@ +/* + * 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. + */ + /* * Created by IntelliJ IDEA. * User: Alexey @@ -127,7 +143,7 @@ public void testOverrideCustomDefault() { final NullableNotNullManager nnnManager = NullableNotNullManager.getInstance(getProject()); nnnManager.setNullables("custom.CheckForNull"); - Disposer.register(myTestRootDisposable, new Disposable() { + Disposer.register(getTestRootDisposable(), new Disposable() { @Override public void dispose() { nnnManager.setNullables(); diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/RedundantSuppressTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/RedundantSuppressTest.java index 2e41a4d960d65..69b4b7c3a7945 100644 --- a/java/java-tests/testSrc/com/intellij/codeInspection/RedundantSuppressTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInspection/RedundantSuppressTest.java @@ -1,8 +1,25 @@ +/* + * 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. + */ package com.intellij.codeInspection; import com.intellij.codeInspection.deadCode.UnusedDeclarationInspection; import com.intellij.codeInspection.emptyMethod.EmptyMethodInspection; -import com.intellij.codeInspection.ex.*; +import com.intellij.codeInspection.ex.GlobalInspectionToolWrapper; +import com.intellij.codeInspection.ex.InspectionToolWrapper; +import com.intellij.codeInspection.ex.LocalInspectionToolWrapper; import com.intellij.codeInspection.i18n.I18nInspection; import com.intellij.psi.PsiElement; import com.intellij.psi.impl.source.tree.injected.MyTestInjector; @@ -55,7 +72,7 @@ public void testSuppressAll() throws Exception { public void testInjections() throws Exception { MyTestInjector testInjector = new MyTestInjector(getPsiManager()); - testInjector.injectAll(myTestRootDisposable); + testInjector.injectAll(getTestRootDisposable()); doTest(); } diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/RedundantTypeArgsInspectionTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/RedundantTypeArgsInspectionTest.java index fbcdfd0e14c47..88c33f2b0d55b 100644 --- a/java/java-tests/testSrc/com/intellij/codeInspection/RedundantTypeArgsInspectionTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInspection/RedundantTypeArgsInspectionTest.java @@ -1,3 +1,19 @@ +/* + * 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. + */ + /* * User: anna * Date: 19-Apr-2010 @@ -10,8 +26,6 @@ import com.intellij.openapi.projectRoots.JavaSdkVersion; import com.intellij.pom.java.LanguageLevel; import com.intellij.testFramework.IdeaTestUtil; -import com.intellij.testFramework.builders.JavaModuleFixtureBuilder; -import com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase; import org.jetbrains.annotations.NotNull; public class RedundantTypeArgsInspectionTest extends LightDaemonAnalyzerTestCase { @@ -34,7 +48,7 @@ protected String getTestDataPath() { } private void doTest() throws Throwable { - IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_6, getModule(), myTestRootDisposable); + IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_6, getModule(), getTestRootDisposable()); doTest("/inspection/redundantTypeArgs/" + getTestName(false) + ".java", true, false); } diff --git a/java/java-tests/testSrc/com/intellij/find/FindInEditorTest.java b/java/java-tests/testSrc/com/intellij/find/FindInEditorTest.java index 6a469b3b32607..39ac4dfa709b4 100644 --- a/java/java-tests/testSrc/com/intellij/find/FindInEditorTest.java +++ b/java/java-tests/testSrc/com/intellij/find/FindInEditorTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -45,7 +45,7 @@ protected void setUp() throws Exception { myOutputStream = new ByteArrayOutputStream(); LivePreview.ourTestOutput = new PrintStream(myOutputStream); EditorHintListener listener = (project, hint, flags) -> LivePreview.processNotFound(); - ApplicationManager.getApplication().getMessageBus().connect(myTestRootDisposable).subscribe(EditorHintListener.TOPIC, listener); + ApplicationManager.getApplication().getMessageBus().connect(getTestRootDisposable()).subscribe(EditorHintListener.TOPIC, listener); } private void initFind() { diff --git a/java/java-tests/testSrc/com/intellij/projectView/ProjectTreeStructureTest.java b/java/java-tests/testSrc/com/intellij/projectView/ProjectTreeStructureTest.java index 017f1d310ba15..46fb031dd4bd5 100644 --- a/java/java-tests/testSrc/com/intellij/projectView/ProjectTreeStructureTest.java +++ b/java/java-tests/testSrc/com/intellij/projectView/ProjectTreeStructureTest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ package com.intellij.projectView; import com.intellij.openapi.module.Module; @@ -127,7 +142,7 @@ public void testNoDuplicateModules() { ModuleManagerImpl.getInstanceImpl(myProject).setModuleGroupPath(module, new String[]{"modules"}); PsiTestUtil.addContentRoot(module, mainModuleRoot.findFileByRelativePath("src/com/package1/p2/p3")); - TestProjectTreeStructure structure = new TestProjectTreeStructure(myProject, myTestRootDisposable); + TestProjectTreeStructure structure = new TestProjectTreeStructure(myProject, getTestRootDisposable()); structure.setShowLibraryContents(false); String structureContent = PlatformTestUtil.print(structure, structure.getRootElement(), 0, null, 10, ' ', myPrintInfo).toString(); diff --git a/java/java-tests/testSrc/com/intellij/psi/ModifyAnnotationsTest.java b/java/java-tests/testSrc/com/intellij/psi/ModifyAnnotationsTest.java index e9d03cf7b4b6c..21a8c74684e8f 100644 --- a/java/java-tests/testSrc/com/intellij/psi/ModifyAnnotationsTest.java +++ b/java/java-tests/testSrc/com/intellij/psi/ModifyAnnotationsTest.java @@ -41,7 +41,7 @@ protected void setUp() throws Exception { public void testReplaceAnnotation() throws Exception { //be sure not to load tree - PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.ALL, myTestRootDisposable); + PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.ALL, getTestRootDisposable()); PsiClass aClass = myJavaFacade.findClass("Test", GlobalSearchScope.allScope(myProject)); assertNotNull(aClass); final PsiAnnotation[] annotations = aClass.getModifierList().getAnnotations(); @@ -49,7 +49,7 @@ public void testReplaceAnnotation() throws Exception { assertEquals("A", annotations[0].getNameReferenceElement().getReferenceName()); final PsiAnnotation newAnnotation = myJavaFacade.getElementFactory().createAnnotationFromText("@B", null); //here the tree is going to be loaded - PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.NONE, myTestRootDisposable); + PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.NONE, getTestRootDisposable()); CommandProcessor.getInstance().executeCommand(myProject, () -> WriteCommandAction.runWriteCommandAction(null, () -> { try { annotations[0].replace(newAnnotation); diff --git a/java/java-tests/testSrc/com/intellij/psi/Src15RepositoryUseTest.java b/java/java-tests/testSrc/com/intellij/psi/Src15RepositoryUseTest.java index 7a15775486080..e7b3885234b6e 100644 --- a/java/java-tests/testSrc/com/intellij/psi/Src15RepositoryUseTest.java +++ b/java/java-tests/testSrc/com/intellij/psi/Src15RepositoryUseTest.java @@ -299,7 +299,7 @@ public void testAnnotationIndex() throws Exception { public boolean accept(final VirtualFile file) { return !"package-info.java".equals(file.getName()); } - }, myTestRootDisposable); + }, getTestRootDisposable()); final PsiClass annotationTypeClass = findClass("annotations.AnnotationType"); assertTrue(annotationTypeClass.isAnnotationType()); @@ -321,11 +321,11 @@ public boolean accept(final VirtualFile file) { } private void setupLoadingFilter() { - PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.ALL, myTestRootDisposable); + PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.ALL, getTestRootDisposable()); } private void tearDownLoadingFilter() { - PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.NONE, myTestRootDisposable); + PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.NONE, getTestRootDisposable()); } @NotNull diff --git a/java/java-tests/testSrc/com/intellij/psi/SrcRepositoryUseTest.java b/java/java-tests/testSrc/com/intellij/psi/SrcRepositoryUseTest.java index 3d0aab8f05420..88239ad2e4db6 100644 --- a/java/java-tests/testSrc/com/intellij/psi/SrcRepositoryUseTest.java +++ b/java/java-tests/testSrc/com/intellij/psi/SrcRepositoryUseTest.java @@ -585,11 +585,11 @@ public void testAnonymousClass() throws Exception { } private void teardownLoadingFilter() { - PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.NONE, myTestRootDisposable); + PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.NONE, getTestRootDisposable()); } private void setupLoadingFilter() { - PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.ALL, myTestRootDisposable); + PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.ALL, getTestRootDisposable()); } public void testAnonymousClass2() throws Exception { diff --git a/java/java-tests/testSrc/com/intellij/psi/impl/file/impl/PsiEventsTest.java b/java/java-tests/testSrc/com/intellij/psi/impl/file/impl/PsiEventsTest.java index 98e99059211a7..0cb3282622b96 100644 --- a/java/java-tests/testSrc/com/intellij/psi/impl/file/impl/PsiEventsTest.java +++ b/java/java-tests/testSrc/com/intellij/psi/impl/file/impl/PsiEventsTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -781,7 +781,7 @@ public void childMoved(@NotNull PsiTreeChangeEvent event) { public void propertyChanged(@NotNull PsiTreeChangeEvent event) { checkCommitted(true, event); } - }, myTestRootDisposable); + }, getTestRootDisposable()); PsiDocumentManager documentManager = PsiDocumentManager.getInstance(getProject()); Document document = documentManager.getDocument(getFile()); diff --git a/java/java-tests/testSrc/com/intellij/psi/resolve/ResolveClassTest.java b/java/java-tests/testSrc/com/intellij/psi/resolve/ResolveClassTest.java index 21e7aa9fdd04e..81ef00ffdbbb3 100644 --- a/java/java-tests/testSrc/com/intellij/psi/resolve/ResolveClassTest.java +++ b/java/java-tests/testSrc/com/intellij/psi/resolve/ResolveClassTest.java @@ -236,7 +236,7 @@ public void testStaticImportNetworkPerformance() throws Exception { } public void testQualifiedAnonymousClass() throws Exception { - RecursionManager.assertOnRecursionPrevention(myTestRootDisposable); + RecursionManager.assertOnRecursionPrevention(getTestRootDisposable()); PsiReference ref = configure(); VirtualFile file = ref.getElement().getContainingFile().getVirtualFile(); diff --git a/java/java-tests/testSrc/com/intellij/psi/resolve/ResolveMethod15Test.java b/java/java-tests/testSrc/com/intellij/psi/resolve/ResolveMethod15Test.java index 983efed504666..72e62ae63cd58 100644 --- a/java/java-tests/testSrc/com/intellij/psi/resolve/ResolveMethod15Test.java +++ b/java/java-tests/testSrc/com/intellij/psi/resolve/ResolveMethod15Test.java @@ -1,3 +1,18 @@ +/* + * 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. + */ package com.intellij.psi.resolve; import com.intellij.navigation.NavigationItem; @@ -243,7 +258,7 @@ public void testFilterFixedVsVarargs8() throws Exception { assertTrue(!((PsiMethod) element).isVarArgs()); } public void testFilterFixedVsVarargs9() throws Exception { - RecursionManager.assertOnRecursionPrevention(myTestRootDisposable); + RecursionManager.assertOnRecursionPrevention(getTestRootDisposable()); final PsiReference ref = configureByFile(); assertThat(ref, instanceOf(PsiReferenceExpression.class)); @@ -488,7 +503,7 @@ public void testInheritance3() throws Exception{ } public void testInheritance4() throws Exception{ - RecursionManager.assertOnRecursionPrevention(myTestRootDisposable); + RecursionManager.assertOnRecursionPrevention(getTestRootDisposable()); PsiReference ref = configureByFile(); PsiElement target = ref.resolve(); diff --git a/java/java-tests/testSrc/com/intellij/refactoring/AbstractJavaInplaceIntroduceTest.java b/java/java-tests/testSrc/com/intellij/refactoring/AbstractJavaInplaceIntroduceTest.java index c7a6d9112f3c2..d8ccf02640bf3 100644 --- a/java/java-tests/testSrc/com/intellij/refactoring/AbstractJavaInplaceIntroduceTest.java +++ b/java/java-tests/testSrc/com/intellij/refactoring/AbstractJavaInplaceIntroduceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * 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. @@ -26,7 +26,6 @@ import com.intellij.psi.impl.source.tree.injected.MyTestInjector; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.refactoring.introduce.inplace.AbstractInplaceIntroducer; -import com.intellij.testFramework.IdeaTestCase; import com.intellij.testFramework.IdeaTestUtil; import com.intellij.testFramework.LightPlatformTestCase; import org.jetbrains.annotations.NotNull; @@ -84,7 +83,7 @@ protected AbstractInplaceIntroducer invokeRefactoring(MyIntroduceHandler introdu protected void doTestInsideInjection(final Pass pass) { MyTestInjector testInjector = new MyTestInjector(getPsiManager()); - testInjector.injectAll(myTestRootDisposable); + testInjector.injectAll(getTestRootDisposable()); doTest(pass); } diff --git a/java/java-tests/testSrc/com/intellij/roots/RootsChangedTest.java b/java/java-tests/testSrc/com/intellij/roots/RootsChangedTest.java index 28de3f097ae13..1648e6b42eb4d 100644 --- a/java/java-tests/testSrc/com/intellij/roots/RootsChangedTest.java +++ b/java/java-tests/testSrc/com/intellij/roots/RootsChangedTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -49,7 +49,7 @@ public class RootsChangedTest extends ModuleTestCase { @Override protected void setUp() throws Exception { super.setUp(); - MessageBusConnection connection = myProject.getMessageBus().connect(myTestRootDisposable); + MessageBusConnection connection = myProject.getMessageBus().connect(getTestRootDisposable()); myModuleRootListener = new MyModuleRootListener(); connection.subscribe(ProjectTopics.PROJECT_ROOTS, myModuleRootListener); } diff --git a/java/testFramework/src/com/intellij/codeInsight/CodeInsightTestCase.java b/java/testFramework/src/com/intellij/codeInsight/CodeInsightTestCase.java index 854e65f002dd4..e1c97dfa9cfe9 100644 --- a/java/testFramework/src/com/intellij/codeInsight/CodeInsightTestCase.java +++ b/java/testFramework/src/com/intellij/codeInsight/CodeInsightTestCase.java @@ -50,7 +50,6 @@ import com.intellij.psi.search.ProjectScope; import com.intellij.testFramework.*; import com.intellij.util.ArrayUtil; -import com.intellij.util.Function; import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -124,7 +123,7 @@ protected VirtualFile configureByFiles(@Nullable String projectRoot, @NotNull St } private void allowRootAccess(final String filePath) { - VfsRootAccess.allowRootAccess(myTestRootDisposable, filePath); + VfsRootAccess.allowRootAccess(getTestRootDisposable(), filePath); } protected VirtualFile configureByFile(String filePath, @Nullable String projectRoot) throws Exception { diff --git a/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java b/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java index 6cb7437682821..b5be6dd83c7fc 100644 --- a/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java +++ b/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java @@ -50,7 +50,6 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.roots.ModuleRootManager; import com.intellij.openapi.startup.StartupManager; -import com.intellij.openapi.util.Condition; import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.TextRange; import com.intellij.openapi.util.io.FileUtil; @@ -250,7 +249,7 @@ protected Collection checkHighlighting(@NotNull final ExpectedHig data.init(); PsiDocumentManager.getInstance(myProject).commitAllDocuments(); - PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(myVirtualFileFilter, myTestRootDisposable); + PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(myVirtualFileFilter, getTestRootDisposable()); try { Collection infos = doHighlighting(); @@ -261,7 +260,7 @@ protected Collection checkHighlighting(@NotNull final ExpectedHig return infos; } finally { - PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.NONE, myTestRootDisposable); + PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.NONE, getTestRootDisposable()); } } diff --git a/java/testFramework/src/com/intellij/codeInsight/daemon/LightDaemonAnalyzerTestCase.java b/java/testFramework/src/com/intellij/codeInsight/daemon/LightDaemonAnalyzerTestCase.java index ab439829ce9ab..6545648813f34 100644 --- a/java/testFramework/src/com/intellij/codeInsight/daemon/LightDaemonAnalyzerTestCase.java +++ b/java/testFramework/src/com/intellij/codeInsight/daemon/LightDaemonAnalyzerTestCase.java @@ -89,7 +89,7 @@ protected void doTestConfiguredFile(boolean checkWarnings, boolean checkInfos, @ } protected void doTestConfiguredFile(boolean checkWarnings, boolean checkWeakWarnings, boolean checkInfos, @Nullable String filePath) { - PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.NONE, myTestRootDisposable); + PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.NONE, getTestRootDisposable()); ExpectedHighlightingData data = getExpectedHighlightingData(checkWarnings, checkWeakWarnings, checkInfos); checkHighlighting(data, composeLocalPath(filePath)); @@ -110,7 +110,7 @@ private void checkHighlighting(ExpectedHighlightingData data, String filePath) { PsiDocumentManager.getInstance(getProject()).commitAllDocuments(); getFile().getText(); //to load text myJavaFilesFilter.allowTreeAccessForFile(getVFile()); - PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(myJavaFilesFilter, myTestRootDisposable); + PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(myJavaFilesFilter, getTestRootDisposable()); try { Collection infos = doHighlighting(); @@ -118,7 +118,7 @@ private void checkHighlighting(ExpectedHighlightingData data, String filePath) { data.checkResult(infos, getEditor().getDocument().getText(), filePath); } finally { - PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.NONE, myTestRootDisposable); + PsiManagerEx.getInstanceEx(getProject()).setAssertOnFileLoadingFilter(VirtualFileFilter.NONE, getTestRootDisposable()); } } diff --git a/java/testFramework/src/com/intellij/projectView/BaseProjectViewTestCase.java b/java/testFramework/src/com/intellij/projectView/BaseProjectViewTestCase.java index c578c7cffd8ed..70fec7bcf19f8 100644 --- a/java/testFramework/src/com/intellij/projectView/BaseProjectViewTestCase.java +++ b/java/testFramework/src/com/intellij/projectView/BaseProjectViewTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -20,16 +20,13 @@ import com.intellij.ide.projectView.impl.ClassesTreeStructureProvider; import com.intellij.ide.projectView.impl.nodes.PackageElementNode; import com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode; -import com.intellij.ide.util.treeView.AbstractTreeNode; import com.intellij.ide.util.treeView.AbstractTreeStructure; import com.intellij.openapi.application.ex.PathManagerEx; import com.intellij.openapi.ui.Queryable; -import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.PsiDirectory; import com.intellij.testFramework.PlatformTestUtil; import com.intellij.testFramework.ProjectViewTestUtil; import com.intellij.testFramework.TestSourceBasedTestCase; -import com.intellij.util.Function; import org.jetbrains.annotations.NonNls; import javax.swing.*; @@ -43,7 +40,7 @@ public abstract class BaseProjectViewTestCase extends TestSourceBasedTestCase { protected void setUp() throws Exception { super.setUp(); - myStructure = new TestProjectTreeStructure(myProject, myTestRootDisposable); + myStructure = new TestProjectTreeStructure(myProject, getTestRootDisposable()); } @Override diff --git a/json/tests/test/com/intellij/json/JsonLiveTemplateTest.java b/json/tests/test/com/intellij/json/JsonLiveTemplateTest.java index c4b0822d8131a..c6fc841d3b0c3 100644 --- a/json/tests/test/com/intellij/json/JsonLiveTemplateTest.java +++ b/json/tests/test/com/intellij/json/JsonLiveTemplateTest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ package com.intellij.json; import com.intellij.codeInsight.lookup.Lookup; @@ -36,7 +51,7 @@ private Template createJsonTemplate(@NotNull String name, @NotNull String group, assertNotNull(context); ((TemplateImpl)template).getTemplateContext().setEnabled(context, true); - CodeInsightTestUtil.addTemplate(template, myTestRootDisposable); + CodeInsightTestUtil.addTemplate(template, getTestRootDisposable()); return template; } diff --git a/json/tests/test/com/jetbrains/jsonSchema/JsonSchemaDocumentationTest.java b/json/tests/test/com/jetbrains/jsonSchema/JsonSchemaDocumentationTest.java index e437f05bc97d3..5c1bbaf854a50 100644 --- a/json/tests/test/com/jetbrains/jsonSchema/JsonSchemaDocumentationTest.java +++ b/json/tests/test/com/jetbrains/jsonSchema/JsonSchemaDocumentationTest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ package com.jetbrains.jsonSchema; import com.intellij.codeInsight.documentation.DocumentationManager; @@ -43,7 +58,7 @@ private void doTest(boolean hasDoc) throws Exception { JsonSchemaHighlightingTest.registerProvider(getProject(), schemaText); final JsonSchemaDocumentationProvider provider = new JsonSchemaDocumentationProvider(); LanguageDocumentation.INSTANCE.addExplicitExtension(JsonLanguage.INSTANCE, provider); - Disposer.register(myTestRootDisposable, new Disposable() { + Disposer.register(getTestRootDisposable(), new Disposable() { @Override public void dispose() { LanguageDocumentation.INSTANCE.removeExplicitExtension(JsonLanguage.INSTANCE, provider); diff --git a/json/tests/test/com/jetbrains/jsonSchema/JsonSchemaHighlightingTest.java b/json/tests/test/com/jetbrains/jsonSchema/JsonSchemaHighlightingTest.java index 020c5b4d615e5..e07730d735678 100644 --- a/json/tests/test/com/jetbrains/jsonSchema/JsonSchemaHighlightingTest.java +++ b/json/tests/test/com/jetbrains/jsonSchema/JsonSchemaHighlightingTest.java @@ -1,3 +1,18 @@ +/* + * 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. + */ package com.jetbrains.jsonSchema; import com.intellij.codeInsight.daemon.DaemonAnalyzerTestCase; @@ -291,7 +306,7 @@ private void testImpl(@NotNull final String schema, @NotNull final String text) registerProvider(getProject(), schema); LanguageAnnotators.INSTANCE.addExplicitExtension(JsonLanguage.INSTANCE, annotator); - Disposer.register(myTestRootDisposable, new Disposable() { + Disposer.register(getTestRootDisposable(), new Disposable() { @Override public void dispose() { LanguageAnnotators.INSTANCE.removeExplicitExtension(JsonLanguage.INSTANCE, annotator); diff --git a/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/service/project/ExternalProjectServiceTest.groovy b/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/service/project/ExternalProjectServiceTest.groovy index 4a9e23e7af200..da799ea0438d9 100644 --- a/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/service/project/ExternalProjectServiceTest.groovy +++ b/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/service/project/ExternalProjectServiceTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -205,7 +205,7 @@ public class ExternalProjectServiceTest extends AbstractExternalSystemTest { List allowedRoots = new ArrayList(); allowedRoots.add(myJdkHome); allowedRoots.addAll(collectRootsInside(myJdkHome)); - VfsRootAccess.allowRootAccess(myTestRootDisposable, ArrayUtil.toStringArray(allowedRoots)); + VfsRootAccess.allowRootAccess(testRootDisposable, ArrayUtil.toStringArray(allowedRoots)); new WriteAction() { @Override diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/SelectUnselectOccurrenceActionsTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/SelectUnselectOccurrenceActionsTest.java index 2bab6a25686e5..cf82305e0d4a5 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/SelectUnselectOccurrenceActionsTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/SelectUnselectOccurrenceActionsTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * 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. @@ -38,7 +38,7 @@ public void hintShown(Project project, LightweightHint hint, int flags) { hintCount++; } }; - ApplicationManager.getApplication().getMessageBus().connect(myTestRootDisposable).subscribe(EditorHintListener.TOPIC, listener); + ApplicationManager.getApplication().getMessageBus().connect(getTestRootDisposable()).subscribe(EditorHintListener.TOPIC, listener); } public void testAllWithoutInitialSelection() throws Exception { diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorImplTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorImplTest.java index 6f80ee23c22a8..0a0191ed796f8 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorImplTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorImplTest.java @@ -375,7 +375,7 @@ public void updateFinished(@NotNull Document doc) { } } }; - getProject().getMessageBus().connect(myTestRootDisposable).subscribe(DocumentBulkUpdateListener.TOPIC, listener); + getProject().getMessageBus().connect(getTestRootDisposable()).subscribe(DocumentBulkUpdateListener.TOPIC, listener); initText("abcdef"); DocumentEx document = (DocumentEx)myEditor.getDocument(); new WriteCommandAction.Simple(getProject()) { diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/fileEditor/NonProjectFileAccessTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/fileEditor/NonProjectFileAccessTest.java index d1e9b6666b243..861facf7fe3a6 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/fileEditor/NonProjectFileAccessTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/fileEditor/NonProjectFileAccessTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -60,7 +60,7 @@ public void setUp() throws Exception { super.setUp(); EditorNotifications notifications = new EditorNotificationsImpl(getProject()); ((ComponentManagerImpl)getProject()).registerComponentInstance(EditorNotifications.class, notifications); - NonProjectFileWritingAccessProvider.enableChecksInTests(myTestRootDisposable); + NonProjectFileWritingAccessProvider.enableChecksInTests(getTestRootDisposable()); ProjectManagerEx.getInstanceEx().blockReloadingProjectOnExternalChanges(); } @@ -322,7 +322,7 @@ public Collection requestWriting(VirtualFile... files) { public boolean isPotentiallyWritable(@NotNull VirtualFile file) { return true; } - }, myTestRootDisposable); + }, getTestRootDisposable()); return requested; } @@ -339,7 +339,7 @@ public boolean isNotWritable(@NotNull VirtualFile file) { return filesToDeny.contains(file); } }, - myTestRootDisposable); + getTestRootDisposable()); } @NotNull diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/fileTypes/impl/FileTypesTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/fileTypes/impl/FileTypesTest.java index 9d1d3cf2407c2..578e2084f7fba 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/fileTypes/impl/FileTypesTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/fileTypes/impl/FileTypesTest.java @@ -596,7 +596,7 @@ public int getVersion() { } public void _testStressPlainTextFileWithEverIncreasingLength() throws IOException, InterruptedException { - FrequentEventDetector.disableUntil(myTestRootDisposable); + FrequentEventDetector.disableUntil(getTestRootDisposable()); File f = createTempFile("xx.lkjlkjlkjlj", "a"); VirtualFile virtualFile = getVirtualFile(f); @@ -658,7 +658,7 @@ protected void run() throws Throwable { } public void _testStressPlainTextFileWithEverIncreasingLength2() throws IOException, InterruptedException { - FrequentEventDetector.disableUntil(myTestRootDisposable); + FrequentEventDetector.disableUntil(getTestRootDisposable()); File f = createTempFile("xx.asdkjfhlkasjdhf", StringUtil.repeatSymbol(' ', (int)PersistentFSConstants.FILE_LENGTH_TO_CACHE_THRESHOLD - 100)); VirtualFile virtualFile = getVirtualFile(f); diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/progress/impl/ProgressIndicatorTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/progress/impl/ProgressIndicatorTest.java index 230c21c64c6f2..7daea1cb009c1 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/progress/impl/ProgressIndicatorTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/progress/impl/ProgressIndicatorTest.java @@ -268,7 +268,7 @@ public void checkCanceled() throws ProcessCanceledException { private void ensureCheckCanceledCalled(@NotNull ProgressIndicator indicator) { myFlag = false; - Alarm alarm = new Alarm(Alarm.ThreadToUse.POOLED_THREAD, myTestRootDisposable); + Alarm alarm = new Alarm(Alarm.ThreadToUse.POOLED_THREAD, getTestRootDisposable()); alarm.addRequest(() -> myFlag = true, 100); final long start = System.currentTimeMillis(); try { diff --git a/platform/platform-tests/testSrc/com/intellij/platform/ProjectSetTest.java b/platform/platform-tests/testSrc/com/intellij/platform/ProjectSetTest.java index 31db5bf5e3432..802a1d408fe12 100644 --- a/platform/platform-tests/testSrc/com/intellij/platform/ProjectSetTest.java +++ b/platform/platform-tests/testSrc/com/intellij/platform/ProjectSetTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -20,7 +20,6 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.project.ProjectManager; import com.intellij.openapi.project.ex.ProjectManagerEx; -import com.intellij.openapi.util.Condition; import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.Ref; import com.intellij.openapi.vcs.VcsCheckoutProcessor; @@ -38,7 +37,10 @@ import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; /** * @author Dmitry Avdeev @@ -61,7 +63,7 @@ public String getId() { public void processEntries(@NotNull List> entries, @NotNull Context context, @NotNull Runnable runNext) { ref.set(entries); } - }, myTestRootDisposable); + }, getTestRootDisposable()); ProjectSetProcessor.Context context = new ProjectSetProcessor.Context(); context.directory = getSourceRoot(); @@ -89,7 +91,7 @@ public boolean checkout(@NotNull Map parameters, pairs.add(Pair.create(parameters.get("url"), directoryName)); return true; } - }, myTestRootDisposable); + }, getTestRootDisposable()); ProjectSetProcessor.Context context = new ProjectSetProcessor.Context(); context.directoryName = "newDir"; diff --git a/platform/platform-tests/testSrc/com/intellij/psi/impl/meta/MetaRegistryTest.java b/platform/platform-tests/testSrc/com/intellij/psi/impl/meta/MetaRegistryTest.java index ba2870adaa377..846c875c2bfb3 100644 --- a/platform/platform-tests/testSrc/com/intellij/psi/impl/meta/MetaRegistryTest.java +++ b/platform/platform-tests/testSrc/com/intellij/psi/impl/meta/MetaRegistryTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -44,7 +44,7 @@ public boolean isAcceptable(Object element, PsiElement context) { public boolean isClassAcceptable(Class hintClass) { return true; } - }, MyTrueMetaData.class, myTestRootDisposable); + }, MyTrueMetaData.class, getTestRootDisposable()); MetaRegistry.addMetadataBinding(new ElementFilter() { @Override public boolean isAcceptable(Object element, PsiElement context) { @@ -55,7 +55,7 @@ public boolean isAcceptable(Object element, PsiElement context) { public boolean isClassAcceptable(Class hintClass) { return true; } - }, MyFalseMetaData.class, myTestRootDisposable); + }, MyFalseMetaData.class, getTestRootDisposable()); final XmlTag tag = ((XmlFile)LightPlatformTestCase.createFile("a.xml", "")).getDocument().getRootTag(); UsefulTestCase.assertInstanceOf(tag.getMetaData(), MyFalseMetaData.class); diff --git a/platform/testFramework/src/com/intellij/testFramework/PlatformLiteFixture.java b/platform/testFramework/src/com/intellij/testFramework/PlatformLiteFixture.java index f832e4b90ab6a..f92bdaaba24df 100644 --- a/platform/testFramework/src/com/intellij/testFramework/PlatformLiteFixture.java +++ b/platform/testFramework/src/com/intellij/testFramework/PlatformLiteFixture.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * 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. @@ -24,8 +24,6 @@ import com.intellij.openapi.extensions.Extensions; import com.intellij.openapi.extensions.ExtensionsArea; import com.intellij.openapi.fileTypes.FileTypeManager; -import com.intellij.openapi.fileTypes.FileTypeRegistry; -import com.intellij.openapi.util.Getter; import com.intellij.openapi.vfs.encoding.EncodingManager; import com.intellij.openapi.vfs.encoding.EncodingManagerImpl; import org.jetbrains.annotations.NotNull; @@ -73,7 +71,7 @@ public void registerExtension(final ExtensionsArea area, final ExtensionPoin registerExtensionPoint(area, name, (Class)t.getClass()); - PlatformTestUtil.registerExtension(area, name, t, myTestRootDisposable); + PlatformTestUtil.registerExtension(area, name, t, getTestRootDisposable()); } protected void registerExtensionPoint(final ExtensionPointName extensionPointName, final Class aClass) { diff --git a/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java b/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java index 77e27365c04dc..76036affeb629 100644 --- a/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java +++ b/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java @@ -92,7 +92,7 @@ public abstract class UsefulTestCase extends TestCase { private static final Map TOTAL_TEARDOWN_COST_MILLIS = new HashMap<>(); @NotNull - protected final Disposable myTestRootDisposable = new Disposable() { + private final Disposable myTestRootDisposable = new Disposable() { @Override public void dispose() { } @@ -152,7 +152,7 @@ protected void setUp() throws Exception { @Override protected void tearDown() throws Exception { try { - Disposer.dispose(myTestRootDisposable); + Disposer.dispose(getTestRootDisposable()); cleanupSwingDataStructures(); cleanupDeleteOnExitHookList(); } @@ -716,7 +716,7 @@ public static void assertSize(int expectedSize, final Collection c) { } protected T disposeOnTearDown(final T disposable) { - Disposer.register(myTestRootDisposable, disposable); + Disposer.register(getTestRootDisposable(), disposable); return disposable; } diff --git a/platform/vcs-tests/testSrc/com/intellij/vcs/test/VcsPlatformTest.kt b/platform/vcs-tests/testSrc/com/intellij/vcs/test/VcsPlatformTest.kt index 162f55382acd3..37ffb300f54dd 100644 --- a/platform/vcs-tests/testSrc/com/intellij/vcs/test/VcsPlatformTest.kt +++ b/platform/vcs-tests/testSrc/com/intellij/vcs/test/VcsPlatformTest.kt @@ -133,7 +133,7 @@ abstract class VcsPlatformTest : PlatformTestCase() { } private fun enableDebugLogging(): String { - TestLoggerFactory.enableDebugLogging(myTestRootDisposable, *ArrayUtil.toStringArray(getDebugLogCategories())) + TestLoggerFactory.enableDebugLogging(testRootDisposable, *ArrayUtil.toStringArray(getDebugLogCategories())) val testStartedIndicator = createTestStartedIndicator() LOG.info(testStartedIndicator) return testStartedIndicator diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyDebuggerTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyDebuggerTest.groovy index 0836bd0d60476..a30de41e887eb 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyDebuggerTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyDebuggerTest.groovy @@ -57,7 +57,7 @@ class GroovyDebuggerTest extends GroovyCompilerTestCase implements DebuggerMetho } private void enableDebugLogging() { - TestLoggerFactory.enableDebugLogging(myTestRootDisposable, + TestLoggerFactory.enableDebugLogging(testRootDisposable, "#com.intellij.debugger.engine.DebugProcessImpl", "#com.intellij.debugger.engine.DebugProcessEvents", "#org.jetbrains.plugins.groovy.compiler.GroovyDebuggerTest"); diff --git a/plugins/properties/testSrc/com/intellij/lang/properties/PropertiesProjectViewTest.java b/plugins/properties/testSrc/com/intellij/lang/properties/PropertiesProjectViewTest.java index 9417754ad4e04..5cb22a9ef9c1b 100644 --- a/plugins/properties/testSrc/com/intellij/lang/properties/PropertiesProjectViewTest.java +++ b/plugins/properties/testSrc/com/intellij/lang/properties/PropertiesProjectViewTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * 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. @@ -30,7 +30,7 @@ public class PropertiesProjectViewTest extends LightPlatformCodeInsightFixtureTe @Override protected void setUp() throws Exception { super.setUp(); - myStructure = new TestProjectTreeStructure(getProject(), myTestRootDisposable); + myStructure = new TestProjectTreeStructure(getProject(), getTestRootDisposable()); } @Override diff --git a/plugins/tasks/tasks-tests/test/com/intellij/tasks/TaskManagerTest.java b/plugins/tasks/tasks-tests/test/com/intellij/tasks/TaskManagerTest.java index 416ad5f20f940..7d6ce8e094de6 100644 --- a/plugins/tasks/tasks-tests/test/com/intellij/tasks/TaskManagerTest.java +++ b/plugins/tasks/tasks-tests/test/com/intellij/tasks/TaskManagerTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -46,7 +46,7 @@ public void taskActivated(LocalTask task) { count.set(count.get() + 1); } }; - myTaskManager.addTaskListener(listener, myTestRootDisposable); + myTaskManager.addTaskListener(listener, getTestRootDisposable()); LocalTask localTask = myTaskManager.createLocalTask("foo"); myTaskManager.activateTask(localTask, false); assertEquals(1, count.get().intValue()); diff --git a/plugins/tasks/tasks-tests/test/com/intellij/tasks/vcs/TaskBranchesTest.java b/plugins/tasks/tasks-tests/test/com/intellij/tasks/vcs/TaskBranchesTest.java index 944752198d1af..e72dfe803be11 100644 --- a/plugins/tasks/tasks-tests/test/com/intellij/tasks/vcs/TaskBranchesTest.java +++ b/plugins/tasks/tasks-tests/test/com/intellij/tasks/vcs/TaskBranchesTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -146,7 +146,7 @@ public void testOpenTaskDialog() throws Exception { String defaultBranchName = getDefaultBranchName(); LocalTaskImpl task = myTaskManager.createLocalTask("foo"); OpenTaskDialog dialog = new OpenTaskDialog(getProject(), task); - Disposer.register(myTestRootDisposable, dialog.getDisposable()); + Disposer.register(getTestRootDisposable(), dialog.getDisposable()); dialog.createTask(); assertEquals("foo", myTaskManager.getActiveTask().getSummary()); List branches = task.getBranches(true); diff --git a/python/testSrc/com/jetbrains/python/fixtures/PyMultiFileResolveTestCase.java b/python/testSrc/com/jetbrains/python/fixtures/PyMultiFileResolveTestCase.java index fe5d5bb529671..a41db1d88840b 100644 --- a/python/testSrc/com/jetbrains/python/fixtures/PyMultiFileResolveTestCase.java +++ b/python/testSrc/com/jetbrains/python/fixtures/PyMultiFileResolveTestCase.java @@ -20,7 +20,6 @@ import com.intellij.openapi.vfs.VirtualFileFilter; import com.intellij.psi.*; import com.intellij.psi.impl.PsiManagerEx; -import com.intellij.util.Function; import com.intellij.util.containers.ContainerUtil; import com.jetbrains.python.PythonFileType; import com.jetbrains.python.PythonTestUtil; @@ -50,7 +49,7 @@ public boolean accept(VirtualFile file) { FileType fileType = file.getFileType(); return fileType == PythonFileType.INSTANCE; } - }, myTestRootDisposable); + }, getTestRootDisposable()); final PsiElement result; if (ref instanceof PsiPolyVariantReference) { final ResolveResult[] resolveResults = ((PsiPolyVariantReference)ref).multiResolve(false); @@ -59,7 +58,7 @@ public boolean accept(VirtualFile file) { else { result = ref.resolve(); } - psiManager.setAssertOnFileLoadingFilter(VirtualFileFilter.NONE, myTestRootDisposable); + psiManager.setAssertOnFileLoadingFilter(VirtualFileFilter.NONE, getTestRootDisposable()); return result; } diff --git a/xml/dom-tests/tests/com/intellij/util/xml/DomConcurrencyStressTest.java b/xml/dom-tests/tests/com/intellij/util/xml/DomConcurrencyStressTest.java index 88faf95ea6566..4f2a1bdcd755d 100644 --- a/xml/dom-tests/tests/com/intellij/util/xml/DomConcurrencyStressTest.java +++ b/xml/dom-tests/tests/com/intellij/util/xml/DomConcurrencyStressTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -49,7 +49,7 @@ public class DomConcurrencyStressTest extends DomTestCase { private static final int ITERATIONS = Timings.adjustAccordingToMySpeed(239, true); public void testInternalDomLocksReadConsistency() throws Throwable { - getDomManager().registerFileDescription(new DomFileDescription(MyElement.class, "a"), myTestRootDisposable); + getDomManager().registerFileDescription(new DomFileDescription(MyElement.class, "a"), getTestRootDisposable()); registerExtender(MyElement.class, MyExtender.class); @@ -111,7 +111,7 @@ private void registerExtender(final Class elementClass, final Class extenderClas final DomExtenderEP extenderEP = new DomExtenderEP(); extenderEP.domClassName = elementClass.getName(); extenderEP.extenderClassName = extenderClass.getName(); - PlatformTestUtil.registerExtension(Extensions.getRootArea(), DomExtenderEP.EP_NAME, extenderEP, myTestRootDisposable); + PlatformTestUtil.registerExtension(Extensions.getRootArea(), DomExtenderEP.EP_NAME, extenderEP, getTestRootDisposable()); } private static void runThreads(int threadCount, final Runnable runnable) throws Throwable { @@ -187,7 +187,7 @@ public void registerExtensions(@NotNull MyElement myElement, @NotNull DomExtensi } public void testBigCustomFile() throws Throwable { - getDomManager().registerFileDescription(new DomFileDescription(MyAllCustomElement.class, "component"), myTestRootDisposable); + getDomManager().registerFileDescription(new DomFileDescription(MyAllCustomElement.class, "component"), getTestRootDisposable()); registerExtender(MyAllCustomElement.class, MyAllCustomExtender.class); diff --git a/xml/dom-tests/tests/com/intellij/util/xml/DomExtensionsTest.java b/xml/dom-tests/tests/com/intellij/util/xml/DomExtensionsTest.java index d1e980be2f5f6..489a55438136e 100644 --- a/xml/dom-tests/tests/com/intellij/util/xml/DomExtensionsTest.java +++ b/xml/dom-tests/tests/com/intellij/util/xml/DomExtensionsTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * 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. @@ -17,9 +17,7 @@ import com.intellij.openapi.extensions.Extensions; import com.intellij.openapi.util.Key; -import com.intellij.testFramework.IdeaTestUtil; import com.intellij.testFramework.PlatformTestUtil; -import com.intellij.util.Consumer; import com.intellij.util.ParameterizedTypeImpl; import com.intellij.util.ReflectionUtil; import com.intellij.util.xml.impl.DomTestCase; @@ -192,7 +190,7 @@ public void registerDomExtender(final Class domClass, final DomExtenderEP extenderEP = new DomExtenderEP(); extenderEP.domClassName = domClass.getName(); extenderEP.extenderClassName = extenderClass.getName(); - PlatformTestUtil.registerExtension(Extensions.getRootArea(), DomExtenderEP.EP_NAME, extenderEP, myTestRootDisposable); + PlatformTestUtil.registerExtension(Extensions.getRootArea(), DomExtenderEP.EP_NAME, extenderEP, getTestRootDisposable()); } diff --git a/xml/dom-tests/tests/com/intellij/util/xml/impl/DomTestCase.java b/xml/dom-tests/tests/com/intellij/util/xml/impl/DomTestCase.java index ea38162e0f3dc..298d49275ccb5 100644 --- a/xml/dom-tests/tests/com/intellij/util/xml/impl/DomTestCase.java +++ b/xml/dom-tests/tests/com/intellij/util/xml/impl/DomTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -49,7 +49,7 @@ public void eventOccured(DomEvent event) { protected void setUp() throws Exception { super.setUp(); myCallRegistry = new CallRegistry(); - getDomManager().addDomEventListener(myListener, myTestRootDisposable); + getDomManager().addDomEventListener(myListener, getTestRootDisposable()); } protected void assertCached(final DomElement element, final XmlElement xmlElement) { diff --git a/xml/dom-tests/tests/com/intellij/util/xml/stubs/DomStubBuilderTest.java b/xml/dom-tests/tests/com/intellij/util/xml/stubs/DomStubBuilderTest.java index 59f0d74e27a66..e88127948fccd 100644 --- a/xml/dom-tests/tests/com/intellij/util/xml/stubs/DomStubBuilderTest.java +++ b/xml/dom-tests/tests/com/intellij/util/xml/stubs/DomStubBuilderTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * 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. @@ -81,7 +81,7 @@ public void testDomExtension() throws Exception { DomExtenderEP ep = new DomExtenderEP(); ep.domClassName = Bar.class.getName(); ep.extenderClassName = TestExtender.class.getName(); - PlatformTestUtil.registerExtension(Extensions.getRootArea(), DomExtenderEP.EP_NAME, ep, myTestRootDisposable); + PlatformTestUtil.registerExtension(Extensions.getRootArea(), DomExtenderEP.EP_NAME, ep, getTestRootDisposable()); doBuilderTest("extender.xml", "File:foo\n" + " Element:foo\n" + diff --git a/xml/dom-tests/tests/com/intellij/util/xml/stubs/DomStubUsingTest.java b/xml/dom-tests/tests/com/intellij/util/xml/stubs/DomStubUsingTest.java index 76610f2fe3d2d..a7b398a050a9b 100644 --- a/xml/dom-tests/tests/com/intellij/util/xml/stubs/DomStubUsingTest.java +++ b/xml/dom-tests/tests/com/intellij/util/xml/stubs/DomStubUsingTest.java @@ -122,7 +122,7 @@ public void testChildrenOfType() throws Exception { public void testFileLoading() throws Exception { XmlFile file = prepareFile("foo.xml"); - ((PsiManagerEx)getPsiManager()).setAssertOnFileLoadingFilter(VirtualFileFilter.ALL, myTestRootDisposable); + ((PsiManagerEx)getPsiManager()).setAssertOnFileLoadingFilter(VirtualFileFilter.ALL, getTestRootDisposable()); DomFileElement element = DomManager.getDomManager(getProject()).getFileElement(file, Foo.class); assertNotNull(element); GenericDomValue id = element.getRootElement().getId(); diff --git a/xml/relaxng/test/org/intellij/plugins/relaxNG/RngXmlHighlightingTest.java b/xml/relaxng/test/org/intellij/plugins/relaxNG/RngXmlHighlightingTest.java index 412b24e8d8f7d..9e5912d6ba1f4 100644 --- a/xml/relaxng/test/org/intellij/plugins/relaxNG/RngXmlHighlightingTest.java +++ b/xml/relaxng/test/org/intellij/plugins/relaxNG/RngXmlHighlightingTest.java @@ -40,18 +40,18 @@ protected void init() { ApplicationManager.getApplication().runWriteAction(() -> { final ExternalResourceManagerEx m = ExternalResourceManagerEx.getInstanceEx(); ExternalResourceManagerExImpl - .addTestResource("urn:test:simple.rng", toAbsolutePath("highlighting/simple.rng"), myTestRootDisposable); + .addTestResource("urn:test:simple.rng", toAbsolutePath("highlighting/simple.rng"), getTestRootDisposable()); ExternalResourceManagerExImpl.addTestResource("urn:test:addressBook", toAbsolutePath("highlighting/rnc/addressbook.rnc"), - myTestRootDisposable); + getTestRootDisposable()); //m.addResource("http://www.w3.org/1999/XSL/Transform", toAbsolutePath("highlighting/relaxng.rng")); ExternalResourceManagerExImpl.addTestResource("http://www.w3.org/1999/XSL/Format", toAbsolutePath("highlighting/rnc/fo/main.rnc"), - myTestRootDisposable); + getTestRootDisposable()); ExternalResourceManagerExImpl.addTestResource("http://docbook.org/ns/docbook", toAbsolutePath("highlighting/docbook.rng"), - myTestRootDisposable); + getTestRootDisposable()); ExternalResourceManagerExImpl.addTestResource("urn:intelliForm:AttachmentFilter", - toAbsolutePath("highlighting/attachment-filter.rng"), myTestRootDisposable); + toAbsolutePath("highlighting/attachment-filter.rng"), getTestRootDisposable()); ExternalResourceManagerExImpl - .addTestResource("http://www.w3.org/1999/xhtml", toAbsolutePath("highlighting/html5/xhtml5.rnc"), myTestRootDisposable); + .addTestResource("http://www.w3.org/1999/xhtml", toAbsolutePath("highlighting/html5/xhtml5.rnc"), getTestRootDisposable()); m.addIgnoredResource("urn:intelliForm:Spaces"); m.addIgnoredResource("http://www.w3.org/1999/xlink"); diff --git a/xml/tests/src/com/intellij/codeInsight/XmlEventsTest.java b/xml/tests/src/com/intellij/codeInsight/XmlEventsTest.java index f9b255862dc81..4194e078c5849 100644 --- a/xml/tests/src/com/intellij/codeInsight/XmlEventsTest.java +++ b/xml/tests/src/com/intellij/codeInsight/XmlEventsTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * 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. @@ -49,7 +49,7 @@ public void test1() throws Exception{ private Listener addPomListener() { final PomModel model = PomManager.getModel(getProject()); final Listener listener = new Listener(model.getModelAspect(XmlAspect.class)); - model.addModelListener(listener,myTestRootDisposable); + model.addModelListener(listener, getTestRootDisposable()); return listener; } diff --git a/xml/tests/src/com/intellij/codeInsight/completion/XmlCompletionTest.java b/xml/tests/src/com/intellij/codeInsight/completion/XmlCompletionTest.java index 40cb6c29d3926..8056b81e0abdf 100644 --- a/xml/tests/src/com/intellij/codeInsight/completion/XmlCompletionTest.java +++ b/xml/tests/src/com/intellij/codeInsight/completion/XmlCompletionTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * 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. @@ -78,7 +78,7 @@ private void addResource(final String url, final String location) { return; } - ExternalResourceManagerExImpl.addTestResource(url, location, myTestRootDisposable); + ExternalResourceManagerExImpl.addTestResource(url, location, getTestRootDisposable()); } @Override