mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
@Override inserted
This commit is contained in:
@@ -208,6 +208,7 @@ public class CompleteStatementTest extends EditorActionTestCase {
|
||||
doFileTest(path + getTestName(false) + "." + ext, path + getTestName(false) + "_after." + ext, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getActionId() {
|
||||
return IdeActions.ACTION_EDITOR_COMPLETE_STATEMENT;
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ public class NullityInferrerTest extends CodeInsightTestCase {
|
||||
private void doTest(boolean annotateLocalVariables) throws Exception {
|
||||
final String nullityPath = "/codeInsight/nullityinferrer";
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final VirtualFile aLib = LocalFileSystem.getInstance().findFileByPath(getTestDataPath() + nullityPath + "/lib/annotations.jar");
|
||||
if (aLib != null) {
|
||||
|
||||
+5
@@ -20,6 +20,7 @@ public class ClassNameCompletionTest extends CompletionTestCase {
|
||||
private static final String BASE_PATH = "/codeInsight/completion/className/";
|
||||
protected boolean myOldSetting;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
setType(CompletionType.CLASS_NAME);
|
||||
@@ -32,10 +33,12 @@ public class ClassNameCompletionTest extends CompletionTestCase {
|
||||
return JavaTestUtil.getJavaTestDataPath();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Sdk getTestProjectJdk() {
|
||||
return JavaSdkImpl.getMockJdk17("java 1.5");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CLASS_NAME_COMPLETION = myOldSetting;
|
||||
super.tearDown();
|
||||
@@ -133,6 +136,7 @@ public class ClassNameCompletionTest extends CompletionTestCase {
|
||||
checkResultByFile(path + "/implements3-result.java");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean clearModelBeforeConfiguring() {
|
||||
return "testAnnotationFiltering".equals(getName());
|
||||
}
|
||||
@@ -212,6 +216,7 @@ public class ClassNameCompletionTest extends CompletionTestCase {
|
||||
checkResultByFile(path + "/" + getTestName(false) + "-result.java");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureByFile(String filePath) throws Exception {
|
||||
final String path = getTestDataPath() + new File(filePath).getParent() + "/source";
|
||||
if (new File(path).exists()) {
|
||||
|
||||
+1
@@ -34,6 +34,7 @@ public abstract class CompletionSortingTestCase extends LightCompletionTestCase
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
LookupManager.getInstance(getProject()).hideActiveLookup();
|
||||
super.tearDown();
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.intellij.testFramework.TestDataPath;
|
||||
public class CompletionStyleTest extends LightCodeInsightTestCase{
|
||||
private static final String BASE_PATH = "/codeInsight/completion/style";
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
((StatisticsManagerImpl)StatisticsManager.getInstance()).clearStatistics();
|
||||
@@ -345,6 +346,7 @@ public class CompletionStyleTest extends LightCodeInsightTestCase{
|
||||
return LookupManager.getInstance(getProject()).getActiveLookup().getCurrentItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
LookupManager.getInstance(getProject()).hideActiveLookup();
|
||||
super.tearDown(); //To change body of overriden methods use Options | File Templates.
|
||||
|
||||
+1
@@ -230,6 +230,7 @@ public class SmartTypeCompletionOrderingTest extends CompletionSortingTestCase {
|
||||
assertPreferredItems(0, "myFoo", "myBar");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return BASE_PATH;
|
||||
}
|
||||
|
||||
+3
@@ -788,6 +788,7 @@ public class SmartTypeCompletionTest extends LightCompletionTestCase {
|
||||
"ElementType.METHOD", "ElementType.PACKAGE", "ElementType.PARAMETER", "ElementType.TYPE");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void checkResultByFile(@NonNls final String filePath) throws Exception {
|
||||
if (myItems != null) {
|
||||
//System.out.println("items = " + Arrays.asList(myItems));
|
||||
@@ -998,6 +999,7 @@ public class SmartTypeCompletionTest extends LightCompletionTestCase {
|
||||
configureByTestName();
|
||||
|
||||
getLookup().setCurrentItem(ContainerUtil.find(myItems, new Condition<LookupElement>() {
|
||||
@Override
|
||||
public boolean value(final LookupElement lookupItem) {
|
||||
return "Fubar.Bar".equals(lookupItem.getLookupString());
|
||||
}
|
||||
@@ -1068,6 +1070,7 @@ public class SmartTypeCompletionTest extends LightCompletionTestCase {
|
||||
checkResultByFile(BASE_PATH + "/" + getTestName(false) + "-out.java");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
setType(CompletionType.SMART);
|
||||
|
||||
@@ -28,6 +28,7 @@ public class TabCompletionTest extends LightCompletionTestCase {
|
||||
checkResultByFile("/codeInsight/completion/normal/TabInXml2_After.xml");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void complete() {
|
||||
super.complete();
|
||||
selectItem(myItems[0], '\t');
|
||||
|
||||
@@ -37,17 +37,21 @@ public class WordCompletionTest extends CompletionTestCase {
|
||||
|
||||
public void testNoWordCompletionForNonSoftReference() throws Throwable {
|
||||
final PsiReferenceProviderBase softProvider = new PsiReferenceProviderBase() {
|
||||
@Override
|
||||
@NotNull
|
||||
public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull final ProcessingContext context) {
|
||||
return new PsiReference[]{new PsiReferenceBase<PsiElement>(element) {
|
||||
@Override
|
||||
public PsiElement resolve() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSoft() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public Object[] getVariants() {
|
||||
return new Object[]{"MySoftVariant"};
|
||||
@@ -56,17 +60,21 @@ public class WordCompletionTest extends CompletionTestCase {
|
||||
}
|
||||
};
|
||||
final PsiReferenceProviderBase hardProvider = new PsiReferenceProviderBase() {
|
||||
@Override
|
||||
@NotNull
|
||||
public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull final ProcessingContext context) {
|
||||
return new PsiReference[]{new PsiReferenceBase<PsiElement>(element) {
|
||||
@Override
|
||||
public PsiElement resolve() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSoft() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public Object[] getVariants() {
|
||||
return new Object[]{"MyHardVariant"};
|
||||
|
||||
@@ -63,6 +63,7 @@ public class AdvHighlightingTest extends DaemonAnalyzerTestCase {
|
||||
public void testProtectedFieldAccessFromOtherPackage() throws Exception { doTest(BASE_PATH+"/protectedAccessFromOtherPackage/a/A.java", BASE_PATH+"/protectedAccessFromOtherPackage", false, false); }
|
||||
public void testPackageLocalClassInTheMiddle1() throws Exception { doTest(BASE_PATH+"/foreignPackageInBetween/a/A1.java", BASE_PATH+"/foreignPackageInBetween", false, false); }
|
||||
|
||||
@Override
|
||||
protected Sdk getTestProjectJdk() {
|
||||
@NonNls boolean is50 = "StaticImportConflict".equals(getTestName(false));
|
||||
LanguageLevelProjectExtension.getInstance(myProject).setLanguageLevel(is50 ? LanguageLevel.JDK_1_5 : LanguageLevel.JDK_1_4);
|
||||
@@ -147,6 +148,7 @@ public class AdvHighlightingTest extends DaemonAnalyzerTestCase {
|
||||
final ModuleRootManager rootManager4 = ModuleRootManager.getInstance(java4);
|
||||
final ModuleRootManager rootManager5 = ModuleRootManager.getInstance(java5);
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final ModifiableRootModel rootModel4 = rootManager4.getModifiableModel();
|
||||
rootModel4.setSdk(JavaSdkImpl.getMockJdk17("java 1.4"));
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.jetbrains.annotations.NonNls;
|
||||
public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
@NonNls private static final String BASE_PATH = "/codeInsight/daemonCodeAnalyzer/genericsHighlighting";
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{new UncheckedWarningLocalInspection(), new UnusedSymbolLocalInspection(), new UnusedImportLocalInspection()};
|
||||
}
|
||||
@@ -28,6 +29,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest(BASE_PATH + "/" + filePath, checkWarnings, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
LanguageLevel level = getTestName(false).contains("Level6") ? LanguageLevel.JDK_1_6 : LanguageLevel.JDK_1_5;
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.intellij.openapi.util.Comparing;
|
||||
public class I18nQuickFixTest extends LightQuickFix15TestCase {
|
||||
private boolean myMustBeAvailableAfterInvoke;
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{new I18nInspection()};
|
||||
}
|
||||
@@ -19,14 +20,17 @@ public class I18nQuickFixTest extends LightQuickFix15TestCase {
|
||||
doAllTests();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/i18n";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void beforeActionStarted(final String testName, final String contents) {
|
||||
myMustBeAvailableAfterInvoke = Comparing.strEqual(testName, "SystemCall.java");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldBeAvailableAfterExecution() {
|
||||
return myMustBeAvailableAfterInvoke;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import java.util.List;
|
||||
|
||||
@DaemonAnalyzerTestCase.CanChangeDocumentDuringHighlighting
|
||||
public class ImportHelperTest extends DaemonAnalyzerTestCase {
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{new UnusedImportLocalInspection()};
|
||||
}
|
||||
@@ -52,8 +53,10 @@ public class ImportHelperTest extends DaemonAnalyzerTestCase {
|
||||
public void testImportsInsertedAlphabetically() throws Exception {
|
||||
CommandProcessor.getInstance().executeCommand(
|
||||
getProject(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
@NonNls String text = "class I {}";
|
||||
@@ -82,8 +85,10 @@ public class ImportHelperTest extends DaemonAnalyzerTestCase {
|
||||
public void testStaticImportsGrouping() throws Exception {
|
||||
CommandProcessor.getInstance().executeCommand(
|
||||
getProject(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
@NonNls String text = "import static java.lang.Math.max;\n" +
|
||||
@@ -134,6 +139,7 @@ public class ImportHelperTest extends DaemonAnalyzerTestCase {
|
||||
}, "", "");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Sdk getTestProjectJdk() {
|
||||
return JavaSdkImpl.getMockJdk17();
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ public class JavadocHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
return JavaTestUtil.getJavaTestDataPath();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{
|
||||
new JavaDocLocalInspection(),
|
||||
@@ -106,6 +107,7 @@ public class JavadocHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
super.doTest(BASE_PATH + "/" + getTestName(false) + ".java", true, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Sdk getProjectJDK() {
|
||||
return JavaSdkImpl.getMockJdk17("java 1.5");
|
||||
}
|
||||
|
||||
+2
@@ -66,6 +66,7 @@ public class LightAdvHighlightingPerformanceTest extends LightDaemonAnalyzerTest
|
||||
}
|
||||
myExtensions = null;
|
||||
}
|
||||
@Override
|
||||
public void dispose() {
|
||||
unblock();
|
||||
}
|
||||
@@ -84,6 +85,7 @@ public class LightAdvHighlightingPerformanceTest extends LightDaemonAnalyzerTest
|
||||
|
||||
final List<HighlightInfo> infos = new ArrayList<HighlightInfo>();
|
||||
PlatformTestUtil.assertTiming("Performance failed", maxMillis, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
infos.clear();
|
||||
DaemonCodeAnalyzerImpl.getInstance(getProject()).restart();
|
||||
|
||||
@@ -50,12 +50,14 @@ public class LightAdvHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest(BASE_PATH + "/" + getTestName(false) + ".java", checkWarnings, checkInfos);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
setLanguageLevel(LanguageLevel.JDK_1_4);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
myUnusedSymbolLocalInspection = new UnusedSymbolLocalInspection();
|
||||
return new LocalInspectionTool[]{
|
||||
@@ -211,10 +213,12 @@ public class LightAdvHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readExternal(Element element) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeExternal(Element element) {
|
||||
|
||||
}
|
||||
@@ -241,6 +245,7 @@ public class LightAdvHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
}
|
||||
|
||||
public static class MyAnnotator implements Annotator {
|
||||
@Override
|
||||
public void annotate(@NotNull PsiElement psiElement, @NotNull final AnnotationHolder holder) {
|
||||
psiElement.accept(new XmlElementVisitor() {
|
||||
@Override public void visitXmlTag(XmlTag tag) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.Collection;
|
||||
public class LossyEncodingTest extends LightDaemonAnalyzerTestCase {
|
||||
@NonNls private static final String BASE_PATH = "/codeInsight/daemonCodeAnalyzer/lossyEncoding";
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{new LossyEncodingInspection()};
|
||||
}
|
||||
|
||||
@@ -18,9 +18,11 @@ public class RecursiveVisitorTest extends LightDaemonAnalyzerTestCase{
|
||||
final PsiElement expression = JavaPsiFacade.getInstance(getProject()).getElementFactory().createStatementFromText(text.toString(), null);
|
||||
final int[] n = {0};
|
||||
IdeaTestUtil.assertTiming("",20,new Runnable(){
|
||||
@Override
|
||||
public void run() {
|
||||
n[0]=0;
|
||||
expression.accept(new JavaRecursiveElementWalkingVisitor(){
|
||||
@Override
|
||||
public void visitBinaryExpression(final PsiBinaryExpression expression) {
|
||||
PsiExpression s = expression.getLOperand();
|
||||
super.visitBinaryExpression(expression);
|
||||
@@ -42,6 +44,7 @@ public class RecursiveVisitorTest extends LightDaemonAnalyzerTestCase{
|
||||
final PsiElement expression = JavaPsiFacade.getInstance(getProject()).getElementFactory().createStatementFromText(text.toString(), null);
|
||||
final int[] n = {0};
|
||||
IdeaTestUtil.assertTiming("",100,new Runnable(){
|
||||
@Override
|
||||
public void run() {
|
||||
n[0]=0;
|
||||
expression.accept(new JavaRecursiveElementWalkingVisitor() {
|
||||
|
||||
+1
@@ -33,6 +33,7 @@ public class ReplaceImplementsWithStaticImportTest extends LightQuickFixTestCase
|
||||
doAllTests();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/replaceImplementsWithStaticImport";
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ public class SuppressWarningsTest extends LightDaemonAnalyzerTestCase {
|
||||
return JavaSdkImpl.getMockJdk17("java 1.5");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{new UnusedSymbolLocalInspection()};
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.intellij.codeInspection.unusedImport.UnusedImportLocalInspection;
|
||||
public class UnusedImportsTest extends DaemonAnalyzerTestCase {
|
||||
private static final String BASE_PATH = "/codeInsight/daemonCodeAnalyzer/unusedImports";
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{new UnusedImportLocalInspection()};
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import java.util.Collection;
|
||||
public class UnusedSymbolLocalTest extends DaemonAnalyzerTestCase {
|
||||
private static final String BASE_PATH = "/codeInsight/daemonCodeAnalyzer/unusedDecls";
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{new UnusedSymbolLocalInspection()};
|
||||
}
|
||||
|
||||
+1
@@ -8,6 +8,7 @@ public class AccessStaticViaInstanceTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { enableInspectionTool(new AccessStaticViaInstance()); doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/accessStaticViaInstance";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class AddCatchBlockTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/addCatchBlock";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class AddMethodBodyTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/addMethodBody";
|
||||
}
|
||||
|
||||
+1
@@ -3,6 +3,7 @@ package com.intellij.codeInsight.daemon.quickFix;
|
||||
public class AddNewArrayExpressionTest extends LightQuickFixTestCase {
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/addNewArrayExpression";
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ public class AddReturnTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/addReturn";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ import com.intellij.codeInsight.daemon.LightIntentionActionTestCase;
|
||||
public class AddRuntimeExceptionToThrowsTest extends LightIntentionActionTestCase {
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/addRuntimeExceptionToThrows";
|
||||
}
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ public class AddTypeArgumentsTest extends LightQuickFix15TestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments";
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ public class AddTypeCastTest extends LightQuickFix15TestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/addTypeCast";
|
||||
}
|
||||
|
||||
+1
@@ -6,6 +6,7 @@ public class AddVariableInitializerTest extends LightQuickFixTestCase {
|
||||
doAllTests();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/addVariableInitializer";
|
||||
}
|
||||
|
||||
+4
@@ -9,12 +9,15 @@ import org.jetbrains.annotations.NonNls;
|
||||
public class AnnotateMethodTest extends LightQuickFix15TestCase {
|
||||
private boolean myMustBeAvailableAfterInvoke;
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/annotateMethod";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{new NullableStuffInspection(){
|
||||
@Override
|
||||
protected int annotateBaseMethod(final PsiMethod method, final PsiMethod superMethod, final Project project) {
|
||||
@NonNls String name = method.getName();
|
||||
int ret = name.startsWith("annotateBase") ? 0 // yes, annotate all
|
||||
@@ -26,6 +29,7 @@ public class AnnotateMethodTest extends LightQuickFix15TestCase {
|
||||
}};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldBeAvailableAfterExecution() {
|
||||
return myMustBeAvailableAfterInvoke;
|
||||
}
|
||||
|
||||
+3
@@ -11,6 +11,7 @@ import org.jdom.Element;
|
||||
public class AssignFieldFromParameterTest extends LightIntentionActionTestCase {
|
||||
private Element myOldSettings;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
|
||||
@@ -20,6 +21,7 @@ public class AssignFieldFromParameterTest extends LightIntentionActionTestCase {
|
||||
settings.STATIC_FIELD_NAME_PREFIX = "our";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
|
||||
settings.readExternal(myOldSettings);
|
||||
@@ -28,6 +30,7 @@ public class AssignFieldFromParameterTest extends LightIntentionActionTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/assignFieldFromParameter";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class BringVariableIntoScopeTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/bringVariableIntoScope";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class CastConstructorParametersTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/castConstructorParameters";
|
||||
}
|
||||
|
||||
+2
@@ -6,6 +6,7 @@ import com.intellij.pom.java.LanguageLevel;
|
||||
|
||||
public class CastMethodParametersTest extends LightQuickFixTestCase {
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
LanguageLevelProjectExtension.getInstance(getProject()).setLanguageLevel(LanguageLevel.JDK_1_3);
|
||||
@@ -13,6 +14,7 @@ public class CastMethodParametersTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/castMethodParameters";
|
||||
}
|
||||
|
||||
+1
@@ -3,6 +3,7 @@ package com.intellij.codeInsight.daemon.quickFix;
|
||||
public class ChangeExtendsToImplementsTest extends LightQuickFix15TestCase {
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/changeExtendsToImplements";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class ChangeMethodSignatureFromUsageTest extends LightQuickFix15TestCase
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/changeMethodSignatureFromUsage";
|
||||
}
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ public class ChangeNewOperatorTypeTest extends LightQuickFix15TestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/changeNewOperatorType";
|
||||
}
|
||||
|
||||
+1
@@ -12,6 +12,7 @@ public class ChangeParameterClassTest extends LightQuickFix15TestCase {
|
||||
doAllTests();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/changeParameterClass";
|
||||
}
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ public class ChangeStringLiteralToCharInMethodCallTest extends LightQuickFixTest
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/stringToCharacterLiteral";
|
||||
}
|
||||
|
||||
+1
@@ -3,6 +3,7 @@ package com.intellij.codeInsight.daemon.quickFix;import com.intellij.codeInsight
|
||||
public class CreateCastExpressionFromInstanceofTest extends LightIntentionActionTestCase {
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createCastExpressionFromInstanceof";
|
||||
}
|
||||
|
||||
+1
@@ -12,6 +12,7 @@ public class CreateClassFromNewTest extends LightQuickFixTestCase {
|
||||
doAllTests();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createClassFromNew";
|
||||
}
|
||||
|
||||
+1
@@ -6,6 +6,7 @@ package com.intellij.codeInsight.daemon.quickFix;
|
||||
public class CreateClassFromUsageTest extends LightQuickFixTestCase{
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createClassFromUsage";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class CreateConstructorFromCallTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createConstructorFromCall";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class CreateConstructorFromSuperTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createConstructorFromSuper";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class CreateConstructorMatchingSuperTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createConstructorMatchingSuper";
|
||||
}
|
||||
|
||||
+2
@@ -7,6 +7,7 @@ import com.intellij.codeInspection.unusedSymbol.UnusedSymbolLocalInspection;
|
||||
* @author cdr
|
||||
*/
|
||||
public class CreateConstructorParameterFromFieldTest extends LightQuickFixTestCase {
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{ new UnusedSymbolLocalInspection()};
|
||||
}
|
||||
@@ -14,6 +15,7 @@ public class CreateConstructorParameterFromFieldTest extends LightQuickFixTestCa
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createConstructorParameterFromField";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class CreateEnumConstantFromUsageTest extends LightQuickFix15TestCase{
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage";
|
||||
}
|
||||
|
||||
+3
@@ -10,12 +10,14 @@ import com.intellij.psi.codeStyle.CodeStyleSettingsManager;
|
||||
* @author ven
|
||||
*/
|
||||
public class CreateFieldFromParameterTest extends LightIntentionActionTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
|
||||
settings.FIELD_NAME_PREFIX = "my";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
|
||||
settings.FIELD_NAME_PREFIX = "";
|
||||
@@ -24,6 +26,7 @@ public class CreateFieldFromParameterTest extends LightIntentionActionTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createFieldFromParameter";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class CreateFieldFromUsageTest extends LightQuickFixTestCase{
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createFieldFromUsage";
|
||||
}
|
||||
|
||||
+1
@@ -6,6 +6,7 @@ package com.intellij.codeInsight.daemon.quickFix;
|
||||
public class CreateInnerClassFromNewTest extends LightQuickFixTestCase {
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createInnerClassFromNew";
|
||||
}
|
||||
|
||||
+1
@@ -6,6 +6,7 @@ package com.intellij.codeInsight.daemon.quickFix;
|
||||
public class CreateInnerClassFromUsageTest extends LightQuickFixTestCase{
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createInnerClassFromUsage";
|
||||
}
|
||||
|
||||
+1
@@ -6,6 +6,7 @@ package com.intellij.codeInsight.daemon.quickFix;
|
||||
public class CreateLocalFromUsageTest extends LightQuickFixTestCase {
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createLocalFromUsage";
|
||||
}
|
||||
|
||||
+1
@@ -6,6 +6,7 @@ package com.intellij.codeInsight.daemon.quickFix;import com.intellij.codeInsight
|
||||
public class CreateLocalVarFromInstanceofTest extends LightIntentionActionTestCase {
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createLocalVarFromInstanceof";
|
||||
}
|
||||
|
||||
+1
@@ -6,6 +6,7 @@ package com.intellij.codeInsight.daemon.quickFix;
|
||||
public class CreateMethodFromUsageTest extends LightQuickFix15TestCase {
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromUsage";
|
||||
}
|
||||
|
||||
+1
@@ -6,6 +6,7 @@ package com.intellij.codeInsight.daemon.quickFix;
|
||||
public class CreateParameterFromUsageTest extends LightQuickFixTestCase{
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/createParameterFromUsage";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class DeferFinalAssignmentTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/deferFinalAssignment";
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.intellij.codeInsight.daemon.quickFix;
|
||||
public class DeleteCatchTest extends LightQuickFixTestCase {
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/deleteCatch";
|
||||
}
|
||||
|
||||
+6
@@ -18,31 +18,37 @@ import java.util.List;
|
||||
* @author cdr
|
||||
*/
|
||||
public class EmptyIntentionInspectionQuickFixTest extends LightQuickFixTestCase{
|
||||
@Override
|
||||
@NonNls
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/emptyIntention";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{new LocalInspectionTool() {
|
||||
@Override
|
||||
@Nls
|
||||
@NotNull
|
||||
public String getGroupDisplayName() {
|
||||
return "MyGroup";
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nls
|
||||
@NotNull
|
||||
public String getDisplayName() {
|
||||
return "My";
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNls
|
||||
@NotNull
|
||||
public String getShortName() {
|
||||
return getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, boolean isOnTheFly) {
|
||||
return new JavaElementVisitor() {
|
||||
|
||||
+3
@@ -7,12 +7,14 @@ import com.intellij.codeInspection.unusedImport.UnusedImportLocalInspection;
|
||||
|
||||
|
||||
public class EnableOptimizeImportsOnTheFlyTest extends LightQuickFixTestCase {
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{new UnusedImportLocalInspection()};
|
||||
}
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected void doAction(final String text, final boolean actionShouldBeAvailable, final String testFullPath, final String testName)
|
||||
throws Exception {
|
||||
boolean old = CodeInsightSettings.getInstance().OPTIMIZE_IMPORTS_ON_THE_FLY;
|
||||
@@ -33,6 +35,7 @@ public class EnableOptimizeImportsOnTheFlyTest extends LightQuickFixTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/enableOptimizeImportsOnTheFly";
|
||||
}
|
||||
|
||||
+2
@@ -9,6 +9,7 @@ import com.intellij.codeInspection.dataFlow.DataFlowInspection;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
public class FixAllQuickfixTest extends LightQuickFixTestCase {
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[] {
|
||||
new DataFlowInspection()
|
||||
@@ -17,6 +18,7 @@ public class FixAllQuickfixTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
@NonNls
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/fixAll";
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class GeneralizeCatchTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/generalizeCatch";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class GenericCreateFromUsageTest extends LightQuickFix15TestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/genericCreateFromUsage";
|
||||
}
|
||||
|
||||
@@ -6,12 +6,14 @@ import com.intellij.codeInspection.uncheckedWarnings.UncheckedWarningLocalInspec
|
||||
|
||||
public class GenerifyFileTest extends LightQuickFixAvailabilityTestCase {
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[] {new UncheckedWarningLocalInspection()};
|
||||
}
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/generifyFile";
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ public class InsertNewTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/insertNew";
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ public class InsertSuperTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/insertSuper";
|
||||
}
|
||||
|
||||
+3
@@ -15,18 +15,21 @@ import com.intellij.codeInspection.javaDoc.JavaDocLocalInspection;
|
||||
|
||||
public class JavadocInspectionQuickFixTest extends LightQuickFix15TestCase {
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
final JavaDocLocalInspection javaDocLocalInspection = new JavaDocLocalInspection();
|
||||
javaDocLocalInspection.TOP_LEVEL_CLASS_OPTIONS.REQUIRED_TAGS = "param";
|
||||
return new LocalInspectionTool[]{javaDocLocalInspection};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/javadocTags";
|
||||
}
|
||||
|
||||
+1
@@ -8,6 +8,7 @@ import com.intellij.openapi.projectRoots.impl.JavaSdkImpl;
|
||||
*/
|
||||
public abstract class LightQuickFix15TestCase extends LightQuickFixTestCase {
|
||||
|
||||
@Override
|
||||
protected Sdk getProjectJDK() {
|
||||
return JavaSdkImpl.getMockJdk17("java 1.5");
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ import com.intellij.codeInsight.intention.IntentionAction;
|
||||
* @author cdr
|
||||
*/
|
||||
public abstract class LightQuickFixAvailabilityTestCase extends LightQuickFixTestCase {
|
||||
@Override
|
||||
protected void doAction(final String text, final boolean actionShouldBeAvailable, final String testFullPath, final String testName)
|
||||
throws Exception {
|
||||
IntentionAction action = findActionWithText(text);
|
||||
|
||||
+1
@@ -6,6 +6,7 @@ public class MethodReturnBooleanTest extends LightQuickFixTestCase {
|
||||
doAllTests();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/methodReturnBooleanFix";
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ public class MethodReturnTest extends LightQuickFix15TestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/methodReturn";
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ public class MethodThrowsTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { enableInspectionTool(new RedundantThrowsDeclaration()); doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/methodThrows";
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.intellij.codeInsight.daemon.quickFix;
|
||||
public class ModifierTest extends LightQuickFixTestCase {
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/modifier";
|
||||
}
|
||||
|
||||
+1
@@ -5,6 +5,7 @@ public class MoveBoundClassToFrontTest extends LightQuickFixTestCase {
|
||||
doAllTests();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/moveBoundClassToFront";
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ public class MoveCatchUpTest extends LightQuickFixTestCase {
|
||||
doAllTests();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/moveCatchUp";
|
||||
}
|
||||
|
||||
+1
@@ -3,6 +3,7 @@ package com.intellij.codeInsight.daemon.quickFix;
|
||||
public class NegationBroadScopeTest extends LightQuickFixTestCase {
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/negationBroadScope";
|
||||
}
|
||||
|
||||
@@ -28,11 +28,13 @@ import java.util.List;
|
||||
public class OrderEntryTest extends DaemonAnalyzerTestCase {
|
||||
@NonNls private static final String BASE_PATH = "/codeInsight/daemonCodeAnalyzer/quickFix/orderEntry/";
|
||||
|
||||
@Override
|
||||
protected void setUpProject() throws Exception {
|
||||
final String root = PathManagerEx.getTestDataPath() + BASE_PATH;
|
||||
|
||||
VirtualFile tempProjectRootDir =
|
||||
ApplicationManager.getApplication().runWriteAction(new Computable<VirtualFile>(){
|
||||
@Override
|
||||
public VirtualFile compute() {
|
||||
try {
|
||||
return PsiTestUtil.createTestProjectStructure(getTestName(true), null, FileUtil.toSystemIndependentName(root), myFilesToDelete, false);
|
||||
@@ -51,6 +53,7 @@ public class OrderEntryTest extends DaemonAnalyzerTestCase {
|
||||
myModule = ModuleManager.getInstance(getProject()).getModules()[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
removeLibs();
|
||||
((ProjectComponent)ModuleManager.getInstance(myProject)).projectClosed();
|
||||
@@ -130,6 +133,7 @@ public class OrderEntryTest extends DaemonAnalyzerTestCase {
|
||||
|
||||
private void removeLibs() {
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
for (Module module : ModuleManager.getInstance(getProject()).getModules()) {
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ public class PermuteArgumentsTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/permuteArguments";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class RemoveNewQualifierTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/removeNewQualifier";
|
||||
}
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ public class RemoveQualifierTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/removeQualifier";
|
||||
}
|
||||
|
||||
+1
@@ -23,6 +23,7 @@ public class RemoveRedundantElseActionTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/removeRedundantElse";
|
||||
}
|
||||
|
||||
+2
@@ -8,12 +8,14 @@ import com.intellij.codeInspection.unusedSymbol.UnusedSymbolLocalInspection;
|
||||
public class RemoveUnusedParameterTest extends LightQuickFixTestCase {
|
||||
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{ new UnusedSymbolLocalInspection()};
|
||||
}
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/removeUnusedParameter";
|
||||
}
|
||||
|
||||
+2
@@ -5,6 +5,7 @@ import com.intellij.codeInspection.LocalInspectionTool;
|
||||
import com.intellij.codeInspection.unusedSymbol.UnusedSymbolLocalInspection;
|
||||
|
||||
public class RemoveUnusedVariableTest extends LightQuickFixTestCase {
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{ new UnusedSymbolLocalInspection()};
|
||||
}
|
||||
@@ -14,6 +15,7 @@ public class RemoveUnusedVariableTest extends LightQuickFixTestCase {
|
||||
doAllTests();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/removeUnusedVariable";
|
||||
}
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ public class RenameWrongReferenceTest extends LightQuickFixAvailabilityTestCase
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/renameWrongReference";
|
||||
}
|
||||
|
||||
+1
@@ -12,6 +12,7 @@ public class ReplaceAddAllArrayToCollectionsFixTest extends LightQuickFixTestCas
|
||||
doAllTests();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/replaceAddAllArrayToCollections";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class ReuseVariableDeclarationtTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/reuseVariableDeclaration";
|
||||
}
|
||||
|
||||
+1
@@ -5,6 +5,7 @@ import com.intellij.codeInsight.daemon.LightIntentionActionTestCase;
|
||||
public class SimplifyBooleanExpressionTest extends LightIntentionActionTestCase {
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/simplifyBooleanExpression";
|
||||
}
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ public class StaticImportMethodTest extends LightQuickFix15TestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/staticImportMethod";
|
||||
}
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ public class SuperMethodReturnTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception {doAllTests();}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/superMethodReturn";
|
||||
}
|
||||
|
||||
+2
@@ -20,6 +20,7 @@ public class Suppress15InspectionsTest extends LightQuickFixTestCase {
|
||||
return JavaSdkImpl.getMockJdk17();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{
|
||||
new RedundantThrowsDeclaration(),
|
||||
@@ -34,6 +35,7 @@ public class Suppress15InspectionsTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/suppress15Inspections";
|
||||
}
|
||||
|
||||
+4
@@ -9,21 +9,25 @@ import com.intellij.pom.java.LanguageLevel;
|
||||
|
||||
public class SuppressLocalInspectionTest extends LightQuickFixTestCase {
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
LanguageLevelProjectExtension.getInstance(getProject()).setLanguageLevel(LanguageLevel.JDK_1_3);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{new LocalCanBeFinal()};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/suppressLocalInspection";
|
||||
}
|
||||
|
||||
+3
@@ -15,11 +15,13 @@ import com.intellij.pom.java.LanguageLevel;
|
||||
|
||||
public class SuppressNonInspectionsTest extends LightQuickFixTestCase {
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
LanguageLevelProjectExtension.getInstance(getProject()).setLanguageLevel(LanguageLevel.JDK_1_3);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[]{
|
||||
new RedundantThrowsDeclaration(),
|
||||
@@ -34,6 +36,7 @@ public class SuppressNonInspectionsTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/suppressNonInspections";
|
||||
}
|
||||
|
||||
+1
@@ -12,6 +12,7 @@ public class SurroundWithArrayFixTest extends LightQuickFix15TestCase {
|
||||
doAllTests();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithArray";
|
||||
}
|
||||
|
||||
+1
@@ -19,6 +19,7 @@ public class SurroundWithIfFixTest extends LightQuickFixTestCase {
|
||||
doAllTests();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithIf";
|
||||
}
|
||||
|
||||
+1
@@ -19,6 +19,7 @@ public class UnimplementIntentionTest extends LightQuickFixTestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/unimplement";
|
||||
}
|
||||
|
||||
+1
@@ -17,6 +17,7 @@ public class VariableAccessFromInnerClassTest extends LightQuickFixTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/mustBeFinal";
|
||||
}
|
||||
|
||||
+1
@@ -3,6 +3,7 @@ package com.intellij.codeInsight.daemon.quickFix;
|
||||
public class VariableArrayTypeTest extends LightQuickFixTestCase {
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/variableArrayType";
|
||||
}
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ public class VariableParameterizedTypeTest extends LightQuickFix15TestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/variableParameterizedType";
|
||||
}
|
||||
|
||||
+1
@@ -20,6 +20,7 @@ public class VariableTypeFromCallTest extends LightQuickFix15TestCase {
|
||||
|
||||
public void test() throws Exception { doAllTests(); }
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/varTypeFromCall";
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user