mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
removed unnecessary 'autodetectPlatformPrefix' calls
This commit is contained in:
@@ -4,7 +4,6 @@ import com.intellij.json.formatter.JsonCodeStyleSettings;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettingsManager;
|
||||
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
|
||||
import com.intellij.testFramework.PlatformTestCase;
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import com.intellij.testFramework.TestLoggerFactory;
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
|
||||
@@ -19,13 +18,6 @@ public abstract class JsonTestCase extends LightCodeInsightFixtureTestCase {
|
||||
Logger.setFactory(TestLoggerFactory.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUp() throws Exception {
|
||||
PlatformTestCase.autodetectPlatformPrefix();
|
||||
//IdeaTestCase.initPlatformPrefix();
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected CommonCodeStyleSettings getCommonCodeStyleSettings() {
|
||||
return CodeStyleSettingsManager.getSettings(getProject()).getCommonSettings(JsonLanguage.INSTANCE);
|
||||
|
||||
@@ -53,10 +53,6 @@ abstract class AbstractExternalSystemTest extends UsefulTestCase {
|
||||
TestExternalSystemManager externalSystemManager
|
||||
ExtensionPoint externalSystemManagerEP
|
||||
|
||||
AbstractExternalSystemTest() {
|
||||
PlatformTestCase.autodetectPlatformPrefix()
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp()
|
||||
|
||||
@@ -17,14 +17,9 @@ package com.intellij.openapi.editor;
|
||||
|
||||
import com.intellij.openapi.editor.impl.DocumentImpl;
|
||||
import com.intellij.testFramework.LightPlatformTestCase;
|
||||
import com.intellij.testFramework.PlatformTestCase;
|
||||
|
||||
public class FoldingStressTest extends LightPlatformTestCase {
|
||||
|
||||
static {
|
||||
PlatformTestCase.autodetectPlatformPrefix();
|
||||
}
|
||||
|
||||
public void testStressFoldingFromZeroOffset() throws Exception {
|
||||
for (int len = 2; len < 25; len++) {
|
||||
stress(len);
|
||||
|
||||
@@ -48,10 +48,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
* @author yole
|
||||
*/
|
||||
public class ProgressIndicatorTest extends LightPlatformTestCase {
|
||||
public ProgressIndicatorTest() {
|
||||
PlatformTestCase.autodetectPlatformPrefix();
|
||||
}
|
||||
|
||||
public void testCheckCanceledHasStackFrame() {
|
||||
ProgressIndicator pib = new ProgressIndicatorBase();
|
||||
pib.cancel();
|
||||
|
||||
@@ -21,7 +21,6 @@ import com.intellij.psi.codeStyle.CodeStyleSettingsManager;
|
||||
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
|
||||
import com.intellij.psi.codeStyle.autodetect.*;
|
||||
import com.intellij.testFramework.LightPlatformCodeInsightTestCase;
|
||||
import com.intellij.testFramework.PlatformTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.junit.Assert;
|
||||
@@ -30,10 +29,6 @@ import java.util.List;
|
||||
|
||||
public abstract class AbstractIndentAutoDetectionTest extends LightPlatformCodeInsightTestCase {
|
||||
|
||||
static {
|
||||
PlatformTestCase.autodetectPlatformPrefix();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected abstract String getFileNameWithExtension();
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ import com.intellij.psi.meta.PsiMetaData;
|
||||
import com.intellij.psi.xml.XmlFile;
|
||||
import com.intellij.psi.xml.XmlTag;
|
||||
import com.intellij.testFramework.LightPlatformTestCase;
|
||||
import com.intellij.testFramework.PlatformTestCase;
|
||||
import com.intellij.testFramework.UsefulTestCase;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
@@ -32,10 +31,6 @@ import org.jetbrains.annotations.NonNls;
|
||||
* @author peter
|
||||
*/
|
||||
public class MetaRegistryTest extends LightPlatformTestCase {
|
||||
public MetaRegistryTest() {
|
||||
PlatformTestCase.autodetectPlatformPrefix();
|
||||
}
|
||||
|
||||
public void testChangingMetaData() throws Throwable {
|
||||
final boolean[] flag = {false};
|
||||
MetaRegistry.addMetadataBinding(new ElementFilter() {
|
||||
|
||||
@@ -18,7 +18,4 @@ package com.intellij.testFramework;
|
||||
/** @deprecated platform autodetection should work well enough, just use base class instead (to be removed in IDEA 16) */
|
||||
@SuppressWarnings("ALL")
|
||||
public abstract class LightPlatformLangTestCase extends LightPlatformTestCase {
|
||||
protected LightPlatformLangTestCase() {
|
||||
PlatformTestCase.autodetectPlatformPrefix();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,6 @@ public abstract class PlatformTestCase extends UsefulTestCase implements DataPro
|
||||
|
||||
protected void initApplication() throws Exception {
|
||||
boolean firstTime = ourApplication == null;
|
||||
autodetectPlatformPrefix();
|
||||
ourApplication = IdeaTestApplication.getInstance(getApplicationConfigDirPath());
|
||||
ourApplication.setDataProvider(this);
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.PsiFileFactory;
|
||||
import com.intellij.psi.PsiManager;
|
||||
import com.intellij.testFramework.LightProjectDescriptor;
|
||||
import com.intellij.testFramework.PlatformTestCase;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.UsefulTestCase;
|
||||
import com.intellij.testFramework.fixtures.impl.LightTempDirTestFixtureImpl;
|
||||
@@ -44,10 +43,10 @@ public abstract class LightPlatformCodeInsightFixtureTestCase extends UsefulTest
|
||||
this(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated call {@link #LightPlatformCodeInsightFixtureTestCase()} instead
|
||||
*/
|
||||
protected LightPlatformCodeInsightFixtureTestCase(boolean autodetect) {
|
||||
if (autodetect) {
|
||||
PlatformTestCase.autodetectPlatformPrefix();
|
||||
}
|
||||
}
|
||||
|
||||
protected CodeInsightTestFixture myFixture;
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.testFramework.LightPlatformCodeInsightTestCase;
|
||||
import com.intellij.testFramework.PlatformTestCase;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@@ -13,10 +12,6 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class UnwrapTestCase extends LightPlatformCodeInsightTestCase {
|
||||
public UnwrapTestCase() {
|
||||
PlatformTestCase.autodetectPlatformPrefix();
|
||||
}
|
||||
|
||||
protected void assertUnwrapped(String codeBefore, String expectedCodeAfter) throws Exception {
|
||||
assertUnwrapped(codeBefore, expectedCodeAfter, 0);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import com.intellij.testFramework.PlatformTestCase;
|
||||
import com.intellij.testFramework.UsefulTestCase;
|
||||
import com.intellij.testFramework.fixtures.CodeInsightTestFixture;
|
||||
import com.intellij.testFramework.fixtures.IdeaProjectTestFixture;
|
||||
@@ -12,7 +11,6 @@ public abstract class CCTestCase extends UsefulTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
initPlatformPrefix();
|
||||
final TestFixtureBuilder<IdeaProjectTestFixture> projectBuilder = IdeaTestFixtureFactory.getFixtureFactory().createFixtureBuilder(
|
||||
getName());
|
||||
myFixture = IdeaTestFixtureFactory.getFixtureFactory().createCodeInsightFixture(projectBuilder.getFixture());
|
||||
@@ -20,10 +18,6 @@ public abstract class CCTestCase extends UsefulTestCase {
|
||||
myFixture.setTestDataPath(getTestDataPath());
|
||||
}
|
||||
|
||||
private static void initPlatformPrefix() {
|
||||
PlatformTestCase.autodetectPlatformPrefix();
|
||||
}
|
||||
|
||||
protected String getTestDataPath() {
|
||||
return PythonHelpersLocator.getPythonCommunityPath() + "/edu/course-creator-python/testData";
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.jetbrains.edu.learning;
|
||||
|
||||
import com.intellij.testFramework.PlatformTestCase;
|
||||
import com.intellij.testFramework.UsefulTestCase;
|
||||
import com.intellij.testFramework.fixtures.CodeInsightTestFixture;
|
||||
import com.intellij.testFramework.fixtures.IdeaProjectTestFixture;
|
||||
@@ -14,7 +13,6 @@ public abstract class StudyTestCase extends UsefulTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
initPlatformPrefix();
|
||||
final TestFixtureBuilder<IdeaProjectTestFixture> projectBuilder = IdeaTestFixtureFactory.getFixtureFactory().createFixtureBuilder(
|
||||
getName());
|
||||
myFixture = IdeaTestFixtureFactory.getFixtureFactory().createCodeInsightFixture(projectBuilder.getFixture());
|
||||
@@ -22,10 +20,6 @@ public abstract class StudyTestCase extends UsefulTestCase {
|
||||
myFixture.setTestDataPath(getTestDataPath());
|
||||
}
|
||||
|
||||
private static void initPlatformPrefix() {
|
||||
PlatformTestCase.autodetectPlatformPrefix();
|
||||
}
|
||||
|
||||
protected String getTestDataPath() {
|
||||
return PythonHelpersLocator.getPythonCommunityPath() + "/edu/interactive-learning-python/testData";
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.jetbrains.rest;
|
||||
|
||||
import com.intellij.testFramework.ParsingTestCase;
|
||||
import com.jetbrains.python.PythonHelpersLocator;
|
||||
import com.jetbrains.python.fixtures.PyTestCase;
|
||||
import com.jetbrains.rest.parsing.RestParserDefinition;
|
||||
|
||||
/**
|
||||
@@ -12,7 +11,6 @@ public class RestParsingTest extends ParsingTestCase {
|
||||
|
||||
public RestParsingTest() {
|
||||
super("", "rst", new RestParserDefinition());
|
||||
PyTestCase.initPlatformPrefix();
|
||||
}
|
||||
|
||||
public void testTitle() {
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.intellij.testFramework.fixtures.IdeaTestFixtureFactory;
|
||||
import com.intellij.testFramework.fixtures.TestFixtureBuilder;
|
||||
import com.intellij.testFramework.fixtures.impl.LightTempDirTestFixtureImpl;
|
||||
import com.jetbrains.python.PythonHelpersLocator;
|
||||
import com.jetbrains.python.fixtures.PyTestCase;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
@@ -22,7 +21,6 @@ public abstract class RestFixtureTestCase extends UsefulTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
PyTestCase.initPlatformPrefix();
|
||||
IdeaTestFixtureFactory factory = IdeaTestFixtureFactory.getFixtureFactory();
|
||||
TestFixtureBuilder<IdeaProjectTestFixture> fixtureBuilder = factory.createLightFixtureBuilder(getProjectDescriptor());
|
||||
final IdeaProjectTestFixture fixture = fixtureBuilder.getFixture();
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.testFramework.UsefulTestCase;
|
||||
import com.intellij.util.SystemProperties;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.jetbrains.python.fixtures.PyTestCase;
|
||||
import com.jetbrains.python.packaging.PyPackage;
|
||||
import com.jetbrains.python.packaging.PyPackageManager;
|
||||
import org.hamcrest.Matchers;
|
||||
@@ -57,8 +56,6 @@ public abstract class PyEnvTestCase extends UsefulTestCase {
|
||||
@SuppressWarnings("JUnitTestCaseWithNonTrivialConstructors")
|
||||
protected PyEnvTestCase(@NotNull final String... requiredTags) {
|
||||
myRequiredTags = requiredTags.length > 0 ? requiredTags.clone() : null;
|
||||
|
||||
PyTestCase.initPlatformPrefix();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -22,7 +22,6 @@ import com.intellij.testFramework.LightVirtualFile;
|
||||
import com.intellij.testFramework.ParsingTestCase;
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import com.jetbrains.python.console.PyConsoleUtil;
|
||||
import com.jetbrains.python.fixtures.PyTestCase;
|
||||
import com.jetbrains.python.psi.LanguageLevel;
|
||||
|
||||
/**
|
||||
@@ -35,7 +34,6 @@ public class PythonConsoleParsingTest extends ParsingTestCase {
|
||||
@SuppressWarnings("JUnitTestCaseWithNonTrivialConstructors")
|
||||
public PythonConsoleParsingTest() {
|
||||
super("psi", "py", new PythonParserDefinition());
|
||||
PyTestCase.initPlatformPrefix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.testFramework.ParsingTestCase;
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import com.jetbrains.python.fixtures.PyTestCase;
|
||||
import com.jetbrains.python.psi.LanguageLevel;
|
||||
import com.jetbrains.python.psi.PyFunction;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -40,7 +39,6 @@ public class PythonParsingTest extends ParsingTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
PyTestCase.initPlatformPrefix();
|
||||
registerExtensionPoint(PythonDialectsTokenSetContributor.EP_NAME, PythonDialectsTokenSetContributor.class);
|
||||
registerExtension(PythonDialectsTokenSetContributor.EP_NAME, new PythonTokenSetContributor());
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ public abstract class PyLexerTestCase extends PlatformLiteFixture {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
PyTestCase.initPlatformPrefix();
|
||||
registerExtensionPoint(PythonDialectsTokenSetContributor.EP_NAME, PythonDialectsTokenSetContributor.class);
|
||||
registerExtension(PythonDialectsTokenSetContributor.EP_NAME, new PythonTokenSetContributor());
|
||||
PythonDialectsTokenSetProvider.reset();
|
||||
|
||||
@@ -49,7 +49,6 @@ import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
|
||||
import com.intellij.psi.search.searches.ReferencesSearch;
|
||||
import com.intellij.refactoring.RefactoringActionHandler;
|
||||
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.*;
|
||||
@@ -121,7 +120,6 @@ public abstract class PyTestCase extends UsefulTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
initPlatformPrefix();
|
||||
IdeaTestFixtureFactory factory = IdeaTestFixtureFactory.getFixtureFactory();
|
||||
TestFixtureBuilder<IdeaProjectTestFixture> fixtureBuilder = factory.createLightFixtureBuilder(getProjectDescriptor());
|
||||
final IdeaProjectTestFixture fixture = fixtureBuilder.getFixture();
|
||||
@@ -347,10 +345,6 @@ public abstract class PyTestCase extends UsefulTestCase {
|
||||
configurator.configureProject(myFixture.getProject(), newPath, moduleRef);
|
||||
}
|
||||
|
||||
public static void initPlatformPrefix() {
|
||||
PlatformTestCase.autodetectPlatformPrefix();
|
||||
}
|
||||
|
||||
public static String getHelpersPath() {
|
||||
return new File(PythonHelpersLocator.getPythonCommunityPath(), "helpers").getPath();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user