mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
removed duplicated code
This commit is contained in:
@@ -14,6 +14,7 @@ import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.PsiDocumentManager;
|
||||
import com.intellij.psi.PsiReference;
|
||||
import com.intellij.testFramework.LightProjectDescriptor;
|
||||
import com.intellij.testFramework.PlatformTestCase;
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import com.intellij.testFramework.UsefulTestCase;
|
||||
import com.intellij.testFramework.fixtures.CodeInsightTestFixture;
|
||||
@@ -46,7 +47,6 @@ public abstract class PyTestCase extends UsefulTestCase {
|
||||
private static final String PARSED_ERROR_MSG = "Operations should have been performed on stubs but caused file to be parsed";
|
||||
|
||||
protected CodeInsightTestFixture myFixture;
|
||||
private static boolean ourPlatformPrefixInitialized;
|
||||
|
||||
@Nullable
|
||||
protected static VirtualFile getVirtualFileByName(String fileName) {
|
||||
@@ -147,18 +147,6 @@ public abstract class PyTestCase extends UsefulTestCase {
|
||||
}
|
||||
|
||||
public static void initPlatformPrefix() {
|
||||
if (!ourPlatformPrefixInitialized) {
|
||||
ourPlatformPrefixInitialized = true;
|
||||
boolean isIDEA = true;
|
||||
try {
|
||||
PyTestCase.class.getClassLoader().loadClass(IDEA_MARKER_CLASS);
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
isIDEA = false;
|
||||
}
|
||||
if (!isIDEA) {
|
||||
System.setProperty(PlatformUtils.PLATFORM_PREFIX_KEY, PlatformUtils.PYCHARM_PREFIX);
|
||||
}
|
||||
}
|
||||
PlatformTestCase.initPlatformPrefix(IDEA_MARKER_CLASS, PlatformUtils.PYCHARM_PREFIX);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user