Restore PathManagerEx.getCommunityPath(), keep using it in tests (IDEA-CR-39037)

This commit is contained in:
Dmitry Jemerov
2018-11-06 10:42:15 +01:00
parent 3f5e641add
commit 7412bb71b4
60 changed files with 129 additions and 120 deletions
@@ -2,7 +2,7 @@
package org.intellij.lang.regexp;
import com.intellij.mock.MockSmartPointerManager;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.psi.PsiComment;
import com.intellij.psi.SmartPointerManager;
import com.intellij.psi.SmartPsiElementPointer;
@@ -32,7 +32,7 @@ public class RegExpParsingTest extends ParsingTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/RegExpSupport/testData";
return PathManagerEx.getCommunityHomePath() + "/RegExpSupport/testData";
}
public void testSimple1() throws IOException { doCodeTest("|"); }
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.intellij.lang.regexp.ecmascript;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.testFramework.ParsingTestCase;
import org.intellij.lang.regexp.RegExpParserDefinition;
@@ -18,7 +18,7 @@ public class EcmaScriptRegExpParsingTest extends ParsingTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/RegExpSupport/testData";
return PathManagerEx.getCommunityHomePath() + "/RegExpSupport/testData";
}
public void testDanglingMetaCharacter1() throws IOException {
@@ -6,6 +6,7 @@ import com.intellij.codeInsight.ExternalAnnotationsManager;
import com.intellij.codeInsight.ExternalAnnotationsManagerImpl;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.projectRoots.impl.JavaAwareProjectJdkTableImpl;
import com.intellij.openapi.roots.OrderRootType;
@@ -58,7 +59,7 @@ public class ExternalAnnotationsManagerTest extends IdeaTestCase {
}
public void testBundledAnnotationXmlSyntax() {
String root = PathManager.getCommunityHomePath() + "/java/jdkAnnotations";
String root = PathManagerEx.getCommunityHomePath() + "/java/jdkAnnotations";
findAnnotationsXmlAndCheckSyntax(root);
}
@@ -78,7 +79,7 @@ public class ExternalAnnotationsManagerTest extends IdeaTestCase {
// some android classes are missing in IDEA, e.g. android.support.annotation.NonNull
public void _testAndroidAnnotationsXml() {
VirtualFile lib = LocalFileSystem.getInstance().findFileByPath(PathManager.getCommunityHomePath() + "/android/android/lib");
VirtualFile lib = LocalFileSystem.getInstance().findFileByPath(PathManagerEx.getCommunityHomePath() + "/android/android/lib");
VirtualFile[] androidJars = Arrays.stream(lib.getChildren())
.map(file -> file.getName().endsWith(".jar") ?
JarFileSystem.getInstance().getJarRootForLocalFile(file) :
@@ -88,7 +89,7 @@ public class ExternalAnnotationsManagerTest extends IdeaTestCase {
ApplicationManager.getApplication().runWriteAction(() -> ProjectRootManager.getInstance(getProject())
.setProjectSdk(PsiTestUtil.addRootsToJdk(getTestProjectJdk(), OrderRootType.CLASSES, androidJars)));
String root = PathManager.getCommunityHomePath() + "/android/android/annotations";
String root = PathManagerEx.getCommunityHomePath() + "/android/android/annotations";
findAnnotationsXmlAndCheckSyntax(root);
}
@@ -7,7 +7,7 @@ import com.intellij.codeInsight.daemon.HighlightDisplayKey;
import com.intellij.codeInspection.InspectionProfileEntry;
import com.intellij.codeInspection.ex.InspectionProfileImpl;
import com.intellij.codeInspection.ex.InspectionToolWrapper;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.roots.AnnotationOrderRootType;
@@ -138,7 +138,7 @@ class LightTestMigration {
'"';
}
else {
Path basePath = Paths.get(PathManager.getCommunityHomePath());
Path basePath = Paths.get(PathManagerEx.getCommunityHomePath());
if (myBaseDir.startsWith(basePath)) {
Path relativePath = basePath.relativize(myBaseDir);
String pathText = '/' + relativePath.toString().replace('\\', '/');
@@ -1,9 +1,9 @@
// Copyright 2000-2018 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.jvm.analysis;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
public final class JvmAnalysisTestsUtil {
public static final String TEST_DATA_PROJECT_RELATIVE_BASE_PATH =
PathManager.getCommunityHomePath() + "/jvm/jvm-analysis-java-tests/testData";
PathManagerEx.getCommunityHomePath() + "/jvm/jvm-analysis-java-tests/testData";
}
@@ -4,8 +4,8 @@ package com.intellij.configurationStore
import com.intellij.externalDependencies.DependencyOnPlugin
import com.intellij.externalDependencies.ExternalDependenciesManager
import com.intellij.externalDependencies.ProjectExternalDependency
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.ApplicationManagerEx
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.openapi.application.runWriteAction
import com.intellij.openapi.components.*
import com.intellij.openapi.project.ProjectManager
@@ -117,7 +117,7 @@ internal class DefaultProjectStoreTest {
}
@Test fun `new project from default - remove workspace component configuration`() {
val testData = Paths.get(PathManager.getCommunityHomePath(), "platform/configuration-store-impl/testData")
val testData = Paths.get(PathManagerEx.getCommunityHomePath(), "platform/configuration-store-impl/testData")
val element = loadElement(testData.resolve("testData1.xml"))
val tempDir = fsRule.fs.getPath("")
@@ -129,7 +129,7 @@ internal class DefaultProjectStoreTest {
}
@Test fun `new IPR project from default - remove workspace component configuration`() {
val testData = Paths.get(PathManager.getCommunityHomePath(), "platform/configuration-store-impl/testData")
val testData = Paths.get(PathManagerEx.getCommunityHomePath(), "platform/configuration-store-impl/testData")
val element = loadElement(testData.resolve("testData1.xml"))
val tempDir = fsRule.fs.getPath("")
@@ -4,8 +4,8 @@ package com.intellij.openapi.vfs.encoding;
import com.intellij.ide.impl.ProjectUtil;
import com.intellij.lang.Language;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.WriteAction;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.command.CommandProcessor;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.command.undo.UndoManager;
@@ -213,7 +213,7 @@ public class FileEncodingTest extends PlatformTestCase implements TestDialog {
}
private static VirtualFile getTestRoot() {
final File testRoot = new File(PathManager.getCommunityHomePath(), "platform/platform-tests/testData/vfs/encoding");
final File testRoot = new File(PathManagerEx.getCommunityHomePath(), "platform/platform-tests/testData/vfs/encoding");
return LocalFileSystem.getInstance().findFileByIoFile(testRoot);
}
@@ -2,7 +2,7 @@
package com.intellij.ui
import com.intellij.icons.AllIcons
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.openapi.util.IconLoader
import com.intellij.openapi.util.SystemInfoRt
import com.intellij.openapi.util.io.FileUtilRt
@@ -104,7 +104,7 @@ internal class SvgRenderer(val svgFileDir: Path, private val deviceConfiguration
"intellij.platform.ide.impl" to "platform/platform-impl/src")) {
val index = outputPath.indexOf(moduleName)
if (index > 0) {
val iconPath = Paths.get(PathManager.getCommunityHomePath(), relativePath, outputPath.substring(index + moduleName.length + 1 /* slash */))
val iconPath = Paths.get(PathManagerEx.getCommunityHomePath(), relativePath, outputPath.substring(index + moduleName.length + 1 /* slash */))
assertThat(iconPath).exists()
return FileUtilRt.toSystemIndependentName(svgFileDir.relativize(iconPath).toString())
}
@@ -16,6 +16,7 @@ import junit.framework.TestCase;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.model.serialization.JDomSerializationUtil;
@@ -148,6 +149,14 @@ public class PathManagerEx {
return getTestDataPath(strategy);
}
/**
* @return path to 'community' project home irrespective of current project
*/
@NotNull
public static String getCommunityHomePath() {
return PathManager.getCommunityHomePath();
}
/**
* @return path to 'community' project home if {@code testClass} is located in the community project and path to 'ultimate' project otherwise
*/
@@ -8,7 +8,7 @@ import com.intellij.openapi.actionSystem.ActionManager
import com.intellij.openapi.application.ApplicationBundle
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.application.ApplicationNamesInfo
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.openapi.application.impl.ApplicationInfoImpl
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.progress.ProgressManager
@@ -103,7 +103,7 @@ object GuiTestUtil {
val testDataDirEnvVar = getSystemPropertyOrEnvironmentVariable(TEST_DATA_DIR)
if (testDataDirEnvVar != null) return File(testDataDirEnvVar)
var testDataPath = PathManager.getCommunityHomePath() + "/platform/testGuiFramework/testData"
var testDataPath = PathManagerEx.getCommunityHomePath() + "/platform/testGuiFramework/testData"
assertNotNull(testDataPath)
assertThat(testDataPath).isNotEmpty
testDataPath = toCanonicalPath(toSystemDependentName(testDataPath))
@@ -3,7 +3,7 @@ package com.siyeh.ig.fixes;
import com.intellij.codeInsight.daemon.quickFix.LightQuickFixParameterizedTestCase;
import com.intellij.codeInspection.LocalInspectionTool;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.siyeh.ig.LightInspectionTestCase;
import com.siyeh.ig.bugs.ResultOfObjectAllocationIgnoredInspection;
import com.siyeh.ig.imports.StaticImportInspection;
@@ -35,6 +35,6 @@ public class IgnoreClassFixTest extends LightQuickFixParameterizedTestCase {
@NotNull
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + LightInspectionTestCase.INSPECTION_GADGETS_TEST_DATA_PATH;
return PathManagerEx.getCommunityHomePath() + LightInspectionTestCase.INSPECTION_GADGETS_TEST_DATA_PATH;
}
}
@@ -3,7 +3,7 @@ package com.siyeh.ig.fixes.bugs;
import com.intellij.codeInsight.daemon.quickFix.LightQuickFixParameterizedTestCase;
import com.intellij.codeInspection.LocalInspectionTool;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.siyeh.ig.LightInspectionTestCase;
import com.siyeh.ig.bugs.SuspiciousToArrayCallInspection;
import org.jetbrains.annotations.NotNull;
@@ -23,6 +23,6 @@ public class SuspiciousToArrayCallFixTest extends LightQuickFixParameterizedTest
@NotNull
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + LightInspectionTestCase.INSPECTION_GADGETS_TEST_DATA_PATH;
return PathManagerEx.getCommunityHomePath() + LightInspectionTestCase.INSPECTION_GADGETS_TEST_DATA_PATH;
}
}
@@ -3,7 +3,7 @@ package com.siyeh.ig.fixes.controlflow;
import com.intellij.codeInsight.daemon.quickFix.LightQuickFixParameterizedTestCase;
import com.intellij.codeInspection.LocalInspectionTool;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.siyeh.ig.LightInspectionTestCase;
import com.siyeh.ig.controlflow.EnumSwitchStatementWhichMissesCasesInspection;
import org.jetbrains.annotations.NotNull;
@@ -23,6 +23,6 @@ public class CreateMissingSwitchBranchesFixTest extends LightQuickFixParameteriz
@NotNull
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + LightInspectionTestCase.INSPECTION_GADGETS_TEST_DATA_PATH;
return PathManagerEx.getCommunityHomePath() + LightInspectionTestCase.INSPECTION_GADGETS_TEST_DATA_PATH;
}
}
@@ -17,7 +17,7 @@ package com.siyeh.ig.fixes.performance;
import com.intellij.codeInsight.daemon.quickFix.LightQuickFixParameterizedTestCase;
import com.intellij.codeInspection.LocalInspectionTool;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.siyeh.ig.LightInspectionTestCase;
import com.siyeh.ig.performance.ListRemoveInLoopInspection;
import org.jetbrains.annotations.NotNull;
@@ -38,6 +38,6 @@ public class ListRemoveInLoopFixTest extends LightQuickFixParameterizedTestCase
@NotNull
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + LightInspectionTestCase.INSPECTION_GADGETS_TEST_DATA_PATH;
return PathManagerEx.getCommunityHomePath() + LightInspectionTestCase.INSPECTION_GADGETS_TEST_DATA_PATH;
}
}
@@ -5,7 +5,7 @@ import com.intellij.analysis.AnalysisScope;
import com.intellij.codeInspection.ex.GlobalInspectionToolWrapper;
import com.intellij.codeInspection.ex.InspectionToolWrapper;
import com.intellij.codeInspection.unusedImport.UnusedImportInspection;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.testFramework.InspectionTestUtil;
import com.intellij.testFramework.InspectionsKt;
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
@@ -17,7 +17,7 @@ import java.util.Collections;
public class UnusedImportGlobalInspectionTest extends LightCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/InspectionGadgets/test/com/siyeh/igtest/imports/globalInspection";
return PathManagerEx.getCommunityHomePath() + "/plugins/InspectionGadgets/test/com/siyeh/igtest/imports/globalInspection";
}
public void testInnerClassImport() {
@@ -2,12 +2,12 @@
package org.editorconfig.language
import com.intellij.codeInsight.generation.actions.CommentByLineCommentAction
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
class EditorConfigCommenterTest : LightPlatformCodeInsightFixtureTestCase() {
override fun getTestDataPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/commenter/"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/commenter/"
fun testComment() = doTest()
fun testUncomment() = doTest()
@@ -2,14 +2,14 @@
package org.editorconfig.language
import com.intellij.application.options.CodeStyle
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.openapi.command.WriteCommandAction
import com.intellij.psi.codeStyle.CodeStyleManager
import com.intellij.psi.codeStyle.CommonCodeStyleSettings
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
class EditorConfigFormattingTest : LightPlatformCodeInsightFixtureTestCase() {
override fun getTestDataPath() = "${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/formatting"
override fun getTestDataPath() = "${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/formatting"
private fun doTestWithSettings(settings: CommonCodeStyleSettings.() -> Unit) {
val file = myFixture.configureByFile("${getTestName(true)}/before/.editorconfig")
@@ -13,7 +13,7 @@ class EditorConfigLexerTest : LexerTestCase() {
override fun createLexer(): Lexer = EditorConfigLexerAdapter()
override fun getDirPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/lexer/"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/lexer/"
.substring(PathManager.getHomePath().length)
fun testEmpty() = doTest()
@@ -2,7 +2,7 @@
package org.editorconfig.language.codeinsight
import com.intellij.codeInsight.lookup.LookupElement
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.openapi.util.registry.Registry
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
import org.editorconfig.EditorConfigRegistry
@@ -10,7 +10,7 @@ import org.editorconfig.language.assertIterableEquals
class EditorConfigCompletionTest : LightPlatformCodeInsightFixtureTestCase() {
override fun getTestDataPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/completion/"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/completion/"
init {
// calling this from setUp() turns out to be too late
@@ -1,12 +1,12 @@
// Copyright 2000-2018 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 org.editorconfig.language.codeinsight
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
class EditorConfigFoldingBuilderTest : LightPlatformCodeInsightFixtureTestCase() {
override fun getTestDataPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/folding/"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/folding/"
fun testSection() = doTest()
fun testSimpleComment() = doTest()
@@ -1,19 +1,17 @@
// Copyright 2000-2018 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.
// Copyright 2000-2018 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.
// Copyright 2000-2018 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.
// Copyright 2000-2018 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.
// Copyright 2000-2018 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.
import com.intellij.codeInsight.daemon.impl.HighlightInfoType.ELEMENT_UNDER_CARET_READ
import com.intellij.codeInsight.daemon.impl.HighlightInfoType.ELEMENT_UNDER_CARET_WRITE
import com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPassFactory.doWithHighlightingEnabled
import com.intellij.codeInsight.daemon.impl.SeveritiesProvider
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.testFramework.PlatformTestUtil.registerExtension
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
class EditorConfigHighlightUsagesTest : LightPlatformCodeInsightFixtureTestCase() {
override fun getTestDataPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/highlightUsages/"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/highlightUsages/"
fun testParentlessOption() = doTest()
fun testSubcaseParentOption() = doTest()
@@ -2,14 +2,14 @@
package org.editorconfig.language.codeinsight
import com.intellij.codeInspection.LocalInspectionTool
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
import org.editorconfig.language.codeinsight.inspections.*
import kotlin.reflect.KClass
class EditorConfigInspectionsTest : LightPlatformCodeInsightFixtureTestCase() {
override fun getTestDataPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/inspections"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/inspections"
// Inspections
@@ -3,7 +3,7 @@ package org.editorconfig.language.codeinsight
import com.intellij.codeInsight.intention.IntentionAction
import com.intellij.codeInspection.LocalInspectionTool
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
import org.editorconfig.language.codeinsight.inspections.*
import org.editorconfig.language.messages.EditorConfigBundle
@@ -12,7 +12,7 @@ import kotlin.reflect.KClass
class EditorConfigQuickfixesTest : LightPlatformCodeInsightFixtureTestCase() {
override fun getTestDataPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/quickfixes/"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/quickfixes/"
fun testCleanupValueList() =
doTest(EditorConfigUnexpectedCommaInspection::class,
@@ -1,14 +1,14 @@
// Copyright 2000-2018 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 org.editorconfig.language.codeinsight
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.testFramework.fixtures.CodeInsightTestUtil
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
import org.editorconfig.language.codeinsight.refactoring.EditorConfigRenameHandler
class EditorConfigRefactoringTest : LightPlatformCodeInsightFixtureTestCase() {
override fun getTestDataPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/refactoring/"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/refactoring/"
fun testRenameDeclarations() = doInplaceTest("my_rule")
fun testRenameReferenceAndDeclarations() = doInplaceTest("my_symbols")
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.editorconfig.language.codeinsight
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiElementVisitor
import com.intellij.psi.PsiFile
@@ -13,7 +13,7 @@ import java.util.*
class EditorConfigResolveTest : LightPlatformCodeInsightFixtureTestCase() {
override fun getTestDataPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/resolve/"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/resolve/"
fun testSubcaseHeader() = doTest()
fun testSiblingHeader() = doTest()
@@ -2,14 +2,14 @@
package org.editorconfig.language.codeinsight.actions
import com.intellij.codeInsight.intention.IntentionAction
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
import org.editorconfig.language.messages.EditorConfigBundle
import org.jetbrains.annotations.PropertyKey
class EditorConfigIntentionTest : LightPlatformCodeInsightFixtureTestCase() {
override fun getTestDataPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/actions/intention/"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/actions/intention/"
fun testInvertBooleanValue() = doTest("intention.invert-option-value")
fun testInvertSpaceValue() = doTest("intention.invert-option-value")
@@ -1,12 +1,12 @@
// Copyright 2000-2018 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 org.editorconfig.language.codeinsight.actions
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
class EnterInEditorConfigFileHandlerTest : LightPlatformCodeInsightFixtureTestCase() {
override fun getTestDataPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/actions/enter/"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/codeinsight/actions/enter/"
fun testEnterInsideOfWordInComment() = doTest()
fun testEnterBeforeSpaceInComment() = doTest()
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.editorconfig.language.headers
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
import org.editorconfig.language.services.EditorConfigElementFactory
import org.editorconfig.language.util.isSubcaseOf
@@ -9,7 +9,7 @@ import org.junit.Test
class EditorConfigGlobUtilTest : LightPlatformCodeInsightFixtureTestCase() {
override fun getTestDataPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/globs/"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/globs/"
// ---- ---- complex tests ---- ----
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.editorconfig.language.headers
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
import org.editorconfig.language.assertIterableEquals
import org.editorconfig.language.psi.EditorConfigPsiFile
@@ -12,7 +12,7 @@ import org.editorconfig.language.util.headers.EditorConfigOverridingHeaderSearch
class EditorConfigHeaderHierarchyTest : LightPlatformCodeInsightFixtureTestCase() {
override fun getTestDataPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/headers/"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/headers/"
fun testSimple() {
testOverriding(0 to listOf(), 1 to listOf(0))
@@ -1,12 +1,12 @@
// Copyright 2000-2018 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 org.editorconfig.language.highlighting
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
class EditorConfigErrorHighlightingTest : LightPlatformCodeInsightFixtureTestCase() {
override fun getTestDataPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/highlighting/error/"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/highlighting/error/"
fun testDanglingDot() = doTest()
fun testDanglingKey() = doTest()
@@ -1,12 +1,12 @@
// Copyright 2000-2018 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 org.editorconfig.language.highlighting
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
class EditorConfigInfoHighlightingTest : LightPlatformCodeInsightFixtureTestCase() {
override fun getTestDataPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/highlighting/info/"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/highlighting/info/"
fun testRootDeclaration() = doTest()
fun testSimpleHeader() = doTest()
@@ -1,12 +1,12 @@
// Copyright 2000-2018 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 org.editorconfig.language.parser
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.testFramework.ParsingTestCase
abstract class EditorConfigParsingTestBase(dataPath: String) : ParsingTestCase(dataPath, "editorconfig", true, EditorConfigParserDefinition()) {
override fun getTestDataPath() =
"${PathManager.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/parser"
"${PathManagerEx.getCommunityHomePath()}/plugins/editorconfig/testSrc/org/editorconfig/language/parser"
protected fun doTest() = doTest(true)
}
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.jetbrains.plugins.groovy.uast
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.openapi.vfs.LocalFileSystem
import com.intellij.openapi.vfs.VirtualFile
import org.jetbrains.uast.test.common.RenderLogTestBase
@@ -10,7 +10,7 @@ import java.io.File
abstract class AbstractGroovyUastTest : AbstractUastFixtureTest() {
protected companion object {
val TEST_GROOVY_MODEL_DIR = File(PathManager.getCommunityHomePath(), "plugins/groovy/groovy-uast-tests/testData")
val TEST_GROOVY_MODEL_DIR = File(PathManagerEx.getCommunityHomePath(), "plugins/groovy/groovy-uast-tests/testData")
}
override fun getVirtualFile(testName: String): VirtualFile {
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.jetbrains.yaml.breadcrumbs;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.editor.Caret;
import com.intellij.openapi.editor.CaretModel;
import com.intellij.openapi.ide.CopyPasteManager;
@@ -24,7 +24,7 @@ public class YAMLBreadcrumbsTest extends LightPlatformCodeInsightFixtureTestCase
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/breadcrumbs/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/breadcrumbs/data/";
}
public void testText() {
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.jetbrains.yaml.editing;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.ex.EditorEx;
import com.intellij.openapi.editor.highlighter.EditorHighlighter;
@@ -14,7 +14,7 @@ import org.jetbrains.annotations.NotNull;
public class YAMLInteractiveLexingTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/editing/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/editing/data/";
}
public void testChangeOfBlockScalarValueInInlineMap() {
@@ -3,7 +3,7 @@ package org.jetbrains.yaml.editing;
import com.intellij.application.options.CodeStyle;
import com.intellij.openapi.actionSystem.IdeActions;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
import com.intellij.util.ObjectUtils;
@@ -13,7 +13,7 @@ import org.jetbrains.yaml.formatter.YAMLCodeStyleSettings;
public class YAMLTypingTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/editing/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/editing/data/";
}
public void testEmptyValue() {
@@ -1,13 +1,13 @@
// Copyright 2000-2018 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 org.jetbrains.yaml.folding;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
public class YAMLFoldingTest extends LightPlatformCodeInsightFixtureTestCase {
public static final String RELATIVE_TEST_DATA_PATH = "/plugins/yaml/testSrc/org/jetbrains/yaml/";
public static final String TEST_DATA_PATH = PathManager.getCommunityHomePath() + RELATIVE_TEST_DATA_PATH;
public static final String TEST_DATA_PATH = PathManagerEx.getCommunityHomePath() + RELATIVE_TEST_DATA_PATH;
public void testFolding() {
defaultTest();
@@ -2,7 +2,7 @@
package org.jetbrains.yaml.formatting;
import com.intellij.application.options.CodeStyle;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.LogicalPosition;
@@ -23,7 +23,7 @@ import java.util.function.Consumer;
public class YAMLFormattingTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/formatting/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/formatting/data/";
}
public void testSample_default() {
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.jetbrains.yaml.highlighting;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
import org.jetbrains.yaml.inspections.YAMLDuplicatedKeysInspection;
import org.jetbrains.yaml.inspections.YAMLRecursiveAliasInspection;
@@ -11,7 +11,7 @@ import org.jetbrains.yaml.inspections.YAMLUnusedAnchorInspection;
public class YAMLHighlightingTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/highlighting/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/highlighting/data/";
}
public void testBlockScalarHeaderError() {
@@ -2,7 +2,7 @@
package org.jetbrains.yaml.intention;
import com.intellij.codeInsight.intention.IntentionAction;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.yaml.inspections.YAMLDuplicatedKeysInspection;
@@ -14,7 +14,7 @@ import java.util.Optional;
public class YAMLIntentionTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/intention/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/intention/data/";
}
public void testDeleteDuplicatedKey() {
@@ -3,6 +3,7 @@ package org.jetbrains.yaml.lexer;
import com.intellij.lexer.Lexer;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.testFramework.LexerTestCase;
public class YAMLLexerTest extends LexerTestCase {
@@ -13,7 +14,7 @@ public class YAMLLexerTest extends LexerTestCase {
@Override
protected String getDirPath() {
return (PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/lexer/data/")
return (PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/lexer/data/")
.substring(PathManager.getHomePath().length());
}
@@ -3,7 +3,7 @@ package org.jetbrains.yaml.navigation;
import com.intellij.ide.actions.CopyReferenceAction;
import com.intellij.openapi.actionSystem.IdeActions;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.ide.CopyPasteManager;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
@@ -18,7 +18,7 @@ import java.io.IOException;
public class YAMLCopyReferenceTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/navigation/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/navigation/data/";
}
public void testSimpleConfig() {
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.jetbrains.yaml.parser;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.testFramework.ParsingTestCase;
import org.jetbrains.yaml.YAMLParserDefinition;
@@ -18,7 +18,7 @@ public class YAMLParserTest extends ParsingTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/parser/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/parser/data/";
}
public void test2docs() throws Throwable {
@@ -2,7 +2,7 @@
package org.jetbrains.yaml.paste;
import com.intellij.openapi.actionSystem.IdeActions;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.ide.CopyPasteManager;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
@@ -19,7 +19,7 @@ import java.awt.datatransfer.StringSelection;
public class YAMLKeyPasteTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/paste/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/paste/data/";
}
public void testPasteKeysInStart1() {
@@ -3,7 +3,7 @@ package org.jetbrains.yaml.paste;
import com.intellij.codeInsight.CodeInsightSettings;
import com.intellij.openapi.actionSystem.IdeActions;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.ide.CopyPasteManager;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
@@ -55,7 +55,7 @@ public abstract class YAMLPasteTest extends LightPlatformCodeInsightFixtureTestC
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/paste/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/paste/data/";
}
public void testOneLinePaste() {
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.jetbrains.yaml.psi;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.psi.PsiElement;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
@@ -10,7 +10,7 @@ import org.jetbrains.yaml.YAMLParserDefinition;
public class YAMLScalarContentTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/psi/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/psi/data/";
}
@Override
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.jetbrains.yaml.psi;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.util.TextRange;
import com.intellij.psi.LiteralTextEscaper;
import com.intellij.psi.PsiElement;
@@ -15,7 +15,7 @@ import java.util.Arrays;
public class YAMLScalarLiteralEscaperTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/psi/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/psi/data/";
}
@Override
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.jetbrains.yaml.psiModification;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.psi.PsiElement;
import com.intellij.psi.util.PsiTreeUtil;
@@ -15,7 +15,7 @@ import org.jetbrains.yaml.psi.YAMLMapping;
public class YAMLMappingModificationTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/psiModification/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/psiModification/data/";
}
// TODO make
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.jetbrains.yaml.resolve;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.refactoring.BaseRefactoringProcessor;
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
@@ -13,7 +13,7 @@ import java.io.IOException;
public class YAMLRenameTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/resolve/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/resolve/data/";
}
public void testAnchorsAndAliases() {
@@ -2,7 +2,7 @@
package org.jetbrains.yaml.resolve;
import com.intellij.lang.ASTNode;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.util.TextRange;
import com.intellij.psi.*;
@@ -15,7 +15,7 @@ import java.util.*;
public class YAMLResolveTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/resolve/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/resolve/data/";
}
public void testAnchorsAndAliases() {
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.jetbrains.yaml.resolve;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.editor.Editor;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiElementVisitor;
@@ -17,7 +17,7 @@ import java.util.stream.Collectors;
public class YAMLUsageViewTreeTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/resolve/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/resolve/data/";
}
public void testAnchorsAndAliases() {
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.jetbrains.yaml.resolve;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.RangeMarker;
import com.intellij.openapi.editor.colors.EditorColors;
@@ -18,7 +18,7 @@ import java.util.*;
public class YAMLUsagesHighlighterTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/resolve/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/resolve/data/";
}
public void testAnchorsAndAliases() {
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.jetbrains.yaml.scalarConversion;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.util.Computable;
import com.intellij.openapi.util.io.FileUtil;
@@ -22,7 +22,7 @@ public class YAMLScalarConversionTest extends LightPlatformCodeInsightFixtureTes
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/scalarConversion/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/scalarConversion/data/";
}
@Override
@@ -1,13 +1,13 @@
// Copyright 2000-2018 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 org.jetbrains.yaml.schema;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.jetbrains.jsonSchema.JsonBySchemaDocumentationBaseTest;
public class YamlByJsonSchemaDocumentationTest extends JsonBySchemaDocumentationBaseTest {
@Override
public String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/schema/data";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/schema/data";
}
@Override
@@ -6,8 +6,8 @@ import com.intellij.json.psi.JsonFile;
import com.intellij.json.psi.JsonObject;
import com.intellij.json.psi.JsonStringLiteral;
import com.intellij.json.psi.JsonValue;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.WriteAction;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.PsiFileFactory;
@@ -18,7 +18,7 @@ import org.junit.Assert;
public class YamlByJsonSchemaHeavyCompletionTest extends JsonBySchemaHeavyCompletionTest {
@Override
public String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/schema/data/completion";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/schema/data/completion";
}
@Override
@@ -2,7 +2,7 @@
package org.jetbrains.yaml.schema;
import com.intellij.codeInspection.InspectionProfileEntry;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.fileTypes.LanguageFileType;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil;
@@ -19,7 +19,7 @@ import java.util.List;
public class YamlByJsonSchemaHighlightingTest extends JsonSchemaHighlightingTestBase {
@Override
public String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/schema/data/highlighting";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/schema/data/highlighting";
}
@Override
@@ -4,7 +4,7 @@ package org.jetbrains.yaml.search;
import com.intellij.ide.actions.searcheverywhere.ContributorSearchResult;
import com.intellij.mock.MockProgressIndicator;
import com.intellij.navigation.NavigationItem;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.project.DumbService;
import com.intellij.openapi.project.DumbServiceImpl;
import com.intellij.openapi.util.io.FileUtil;
@@ -21,7 +21,7 @@ import java.util.List;
public class YAMLSearchEverywhereTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/search/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/search/data/";
}
public void testSearch() throws IOException {
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.jetbrains.yaml.structure;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.testFramework.PlatformTestUtil;
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
import com.intellij.util.ui.tree.TreeUtil;
@@ -12,7 +12,7 @@ import javax.swing.tree.TreePath;
public class YAMLStructureTest extends LightPlatformCodeInsightFixtureTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/structure/data/";
return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/structure/data/";
}
@@ -1,7 +1,7 @@
// Copyright 2000-2018 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 org.jetbrains.uast.test.java
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.application.ex.PathManagerEx
import com.intellij.openapi.vfs.LocalFileSystem
import com.intellij.openapi.vfs.VirtualFile
import org.jetbrains.uast.test.env.AbstractUastFixtureTest
@@ -9,7 +9,7 @@ import java.io.File
abstract class AbstractJavaUastTest : AbstractUastFixtureTest() {
protected companion object {
val TEST_JAVA_MODEL_DIR = File(PathManager.getCommunityHomePath(), "uast/uast-tests/java")
val TEST_JAVA_MODEL_DIR = File(PathManagerEx.getCommunityHomePath(), "uast/uast-tests/java")
}
override fun getVirtualFile(testName: String): VirtualFile {
@@ -2,7 +2,7 @@
package com.intellij.psi.formatter;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.command.CommandProcessor;
import com.intellij.openapi.util.TextRange;
import com.intellij.psi.impl.source.xml.XmlFileImpl;
@@ -25,6 +25,6 @@ public abstract class XmlFormatterTestBase extends FormatterTestCase {
@Override
protected String getTestDataPath() {
return PathManager.getCommunityHomePath() + "/xml/tests/testData";
return PathManagerEx.getCommunityHomePath() + "/xml/tests/testData";
}
}