diff --git a/RegExpSupport/test/test/BaseParseTestcase.java b/RegExpSupport/test/test/BaseParseTestcase.java index a7f8cf4d00aa..b4dd145b0c18 100644 --- a/RegExpSupport/test/test/BaseParseTestcase.java +++ b/RegExpSupport/test/test/BaseParseTestcase.java @@ -38,6 +38,7 @@ public abstract class BaseParseTestcase extends TestCase { PlatformTestCase.initPlatformLangPrefix(); } + @Override protected void setUp() throws Exception { super.setUp(); final IdeaTestFixtureFactory fixtureFactory = IdeaTestFixtureFactory.getFixtureFactory(); @@ -50,6 +51,7 @@ public abstract class BaseParseTestcase extends TestCase { final Project project = myFixture.getProject(); new WriteCommandAction(project) { + @Override protected void run(Result result) throws Throwable { FileTypeManager.getInstance().registerFileType(RegExpFileType.INSTANCE, new String[]{"regexp"}); } @@ -57,6 +59,7 @@ public abstract class BaseParseTestcase extends TestCase { } + @Override protected void tearDown() throws Exception { myFixture.tearDown(); myFixture = null; diff --git a/RegExpSupport/test/test/MainParseTest.java b/RegExpSupport/test/test/MainParseTest.java index 6843b1b042a1..de43ef77a538 100644 --- a/RegExpSupport/test/test/MainParseTest.java +++ b/RegExpSupport/test/test/MainParseTest.java @@ -49,6 +49,7 @@ public class MainParseTest extends BaseParseTestcase { private final Map myMap = new LinkedHashMap(); + @Override protected void setUp() throws Exception { final Document document = new SAXBuilder().build(new File(getTestDataRoot(), "/RETest.xml")); final List list = XPath.selectNodes(document.getRootElement(), "//test"); @@ -95,6 +96,7 @@ public class MainParseTest extends BaseParseTestcase { System.setErr(new PrintStream(myOut)); } + @Override protected String getTestDataPath() { return super.getTestDataPath()+"/gen/"; } diff --git a/plugins/InspectionGadgets/testsrc/com/IGInspectionTestCase.java b/plugins/InspectionGadgets/testsrc/com/IGInspectionTestCase.java index 5792e2d7a393..2cc19f7002a3 100644 --- a/plugins/InspectionGadgets/testsrc/com/IGInspectionTestCase.java +++ b/plugins/InspectionGadgets/testsrc/com/IGInspectionTestCase.java @@ -11,10 +11,12 @@ import org.jetbrains.annotations.NonNls; */ public abstract class IGInspectionTestCase extends InspectionTestCase { + @Override protected String getTestDataPath() { return PluginPathManager.getPluginHomePath("InspectionGadgets") + "/test"; } + @Override public void doTest(@NonNls final String folderName, final LocalInspectionTool tool) throws Exception { super.doTest(folderName, new LocalInspectionToolWrapper(tool), "java 1.5"); } diff --git a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/bugs/CastConflictsWithInstanceofFixesTest.java b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/bugs/CastConflictsWithInstanceofFixesTest.java index 8a98e1bc2003..1dfa21a1f3db 100644 --- a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/bugs/CastConflictsWithInstanceofFixesTest.java +++ b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/bugs/CastConflictsWithInstanceofFixesTest.java @@ -35,6 +35,7 @@ public class CastConflictsWithInstanceofFixesTest extends IGQuickFixesTestCase { doTest("replaceInstanceOf", "Replace instanceof"); } + @Override protected String getRelativePath() { return "bugs/castconflicts"; } diff --git a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/inheritance/StaticInheritanceTest.java b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/inheritance/StaticInheritanceTest.java index 5b543fc02a12..c610a9bd6e97 100644 --- a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/inheritance/StaticInheritanceTest.java +++ b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/inheritance/StaticInheritanceTest.java @@ -32,6 +32,7 @@ public class StaticInheritanceTest extends LightQuickFixTestCase { doAllTests(); } + @Override protected String getBasePath() { return "/com/siyeh/igtest/inheritance/staticInheritance/"; } diff --git a/plugins/ant/tests/src/com/intellij/lang/ant/AntCompletionTest.java b/plugins/ant/tests/src/com/intellij/lang/ant/AntCompletionTest.java index 851b0557338b..a4717ad26458 100644 --- a/plugins/ant/tests/src/com/intellij/lang/ant/AntCompletionTest.java +++ b/plugins/ant/tests/src/com/intellij/lang/ant/AntCompletionTest.java @@ -31,10 +31,12 @@ import java.util.List; public class AntCompletionTest extends LightCodeInsightTestCase { + @Override protected String getTestDataPath() { return PluginPathManager.getPluginHomePath("ant") + "/tests/data/psi/completion/"; } + @Override protected void configureByFile(@TestDataFile @NonNls String filePath) throws Exception { super.configureByFile(filePath); AntSupport.markFileAsAntFile(myVFile, myFile.getProject(), true); @@ -209,6 +211,7 @@ public class AntCompletionTest extends LightCodeInsightTestCase { return list.toArray(new LookupElement[list.size()]); } + @Override protected void tearDown() throws Exception { LookupManager.getInstance(getProject()).hideActiveLookup(); super.tearDown(); diff --git a/plugins/ant/tests/src/com/intellij/lang/ant/AntHighlightingTest.java b/plugins/ant/tests/src/com/intellij/lang/ant/AntHighlightingTest.java index 104d06f33728..e15ea5c92bd6 100644 --- a/plugins/ant/tests/src/com/intellij/lang/ant/AntHighlightingTest.java +++ b/plugins/ant/tests/src/com/intellij/lang/ant/AntHighlightingTest.java @@ -55,6 +55,7 @@ public class AntHighlightingTest extends DaemonAnalyzerTestCase { doTest(getTestName(lowercaseFirstLetter) + ".xml", false, false); } + @Override protected void configureByFile(@TestDataFile @NonNls String filePath) throws Exception { super.configureByFile(filePath); AntSupport.markFileAsAntFile(myFile.getVirtualFile(), myFile.getProject(), true); @@ -110,6 +111,7 @@ public class AntHighlightingTest extends DaemonAnalyzerTestCase { try { myIgnoreInfos = true; IdeaTestUtil.assertTiming("Should be quite performant !", 3500, new Runnable() { + @Override public void run() { doDoTest(true, false); } @@ -121,6 +123,7 @@ public class AntHighlightingTest extends DaemonAnalyzerTestCase { } + @Override protected List doHighlighting() { final List infos = super.doHighlighting(); if (!myIgnoreInfos) { @@ -129,6 +132,7 @@ public class AntHighlightingTest extends DaemonAnalyzerTestCase { return Collections.emptyList(); } + @Override protected LocalInspectionTool[] configureLocalInspectionTools() { return new LocalInspectionTool[]{new AntDuplicateTargetsInspection(), new AntResolveInspection()}; } diff --git a/plugins/ant/tests/src/com/intellij/lang/ant/AntMultiFileCompletionTest.java b/plugins/ant/tests/src/com/intellij/lang/ant/AntMultiFileCompletionTest.java index 27a281ed3a23..4096060a4b25 100644 --- a/plugins/ant/tests/src/com/intellij/lang/ant/AntMultiFileCompletionTest.java +++ b/plugins/ant/tests/src/com/intellij/lang/ant/AntMultiFileCompletionTest.java @@ -65,6 +65,7 @@ public class AntMultiFileCompletionTest extends TestCase { myFixture.testCompletion(fileNames, initialTest + "_after." + ext); } + @Override protected void setUp() throws Exception { super.setUp(); final JavaTestFixtureFactory fixtureFactory = JavaTestFixtureFactory.getFixtureFactory(); @@ -74,6 +75,7 @@ public class AntMultiFileCompletionTest extends TestCase { myFixture.setUp(); } + @Override protected void tearDown() throws Exception { myFixture.tearDown(); myFixture = null; diff --git a/plugins/ant/tests/src/com/intellij/lang/ant/AntParsingTest.java b/plugins/ant/tests/src/com/intellij/lang/ant/AntParsingTest.java index 02d0a3c58513..d29e1dfa0ae5 100644 --- a/plugins/ant/tests/src/com/intellij/lang/ant/AntParsingTest.java +++ b/plugins/ant/tests/src/com/intellij/lang/ant/AntParsingTest.java @@ -26,6 +26,7 @@ public class AntParsingTest extends ParsingTestCase { super("", "ant"); } + @Override protected String getTestDataPath() { return PluginPathManager.getPluginHomePath("ant") + "/tests/data"; } diff --git a/plugins/ant/tests/src/com/intellij/lang/ant/AntPropertyExpansionTest.java b/plugins/ant/tests/src/com/intellij/lang/ant/AntPropertyExpansionTest.java index ce3e07d32e66..960e4a5bf632 100644 --- a/plugins/ant/tests/src/com/intellij/lang/ant/AntPropertyExpansionTest.java +++ b/plugins/ant/tests/src/com/intellij/lang/ant/AntPropertyExpansionTest.java @@ -77,15 +77,18 @@ public class AntPropertyExpansionTest extends TestCase{ myMap = map; } + @Override @NotNull public Iterator getNamesIterator() { return myMap.keySet().iterator(); } + @Override public String getPropertyValue(String propertyName) { return myMap.get(propertyName); } + @Override public PsiElement getNavigationElement(String propertyName) { return null; } diff --git a/plugins/ant/tests/src/com/intellij/lang/ant/AntRenameTest.java b/plugins/ant/tests/src/com/intellij/lang/ant/AntRenameTest.java index aea1a5b17d51..008299907693 100644 --- a/plugins/ant/tests/src/com/intellij/lang/ant/AntRenameTest.java +++ b/plugins/ant/tests/src/com/intellij/lang/ant/AntRenameTest.java @@ -128,6 +128,7 @@ public class AntRenameTest extends LightCodeInsightTestCase { doTest(); } + @Override protected String getTestDataPath() { return PluginPathManager.getPluginHomePath("ant").replace('\\', '/') + "/tests/data/psi/rename/"; } diff --git a/plugins/ant/tests/src/com/intellij/lang/ant/AntResolveTest.java b/plugins/ant/tests/src/com/intellij/lang/ant/AntResolveTest.java index 814c6043391b..62e17f4888d8 100644 --- a/plugins/ant/tests/src/com/intellij/lang/ant/AntResolveTest.java +++ b/plugins/ant/tests/src/com/intellij/lang/ant/AntResolveTest.java @@ -291,6 +291,7 @@ public class AntResolveTest extends ResolveTestCase { assertTrue(target instanceof PomTargetPsiElement && ((PomTargetPsiElement)target).getTarget().canNavigateToSource()); } + @Override protected String getTestDataPath() { return PluginPathManager.getPluginHomePath("ant") + "/tests/data/psi/resolve/"; } diff --git a/plugins/ant/tests/src/com/intellij/lang/ant/CustomTypesTest.java b/plugins/ant/tests/src/com/intellij/lang/ant/CustomTypesTest.java index 9139d49e039b..e9c1ceb20ca3 100644 --- a/plugins/ant/tests/src/com/intellij/lang/ant/CustomTypesTest.java +++ b/plugins/ant/tests/src/com/intellij/lang/ant/CustomTypesTest.java @@ -39,6 +39,7 @@ public class CustomTypesTest extends ParsingTestCase { super("", "ant"); } + @Override protected String getTestDataPath() { return PluginPathManager.getPluginHomePath("ant") + "/tests/data/psi/customTypes"; } @@ -55,12 +56,14 @@ public class CustomTypesTest extends ParsingTestCase { final Ref found = new Ref(false); antProject.accept(new AntDomRecursiveVisitor() { + @Override public void visitAntDomElement(AntDomElement element) { if (!found.get()) { super.visitAntDomElement(element); } } + @Override public void visitAntDomCustomElement(AntDomCustomElement element) { final Class clazz = element.getDefinitionClass(); if (clazz != null && AntCustomTask.class.getName().equals(clazz.getName())) { @@ -74,6 +77,7 @@ public class CustomTypesTest extends ParsingTestCase { assertTrue(found.get()); } + @Override protected String loadFile(String name) throws IOException { String fullName = getTestDataPath() + File.separatorChar + name; String text = new String(FileUtil.loadFileText(new File(fullName))).trim(); diff --git a/plugins/devkit/testSources/build/GenerateAntTest.java b/plugins/devkit/testSources/build/GenerateAntTest.java index c7ab30ddbc6e..484d3ed43944 100644 --- a/plugins/devkit/testSources/build/GenerateAntTest.java +++ b/plugins/devkit/testSources/build/GenerateAntTest.java @@ -45,6 +45,7 @@ public class GenerateAntTest extends IdeaTestCase { public void testP1() throws Exception { ApplicationManager.getApplication().runWriteAction(new Runnable() { + @Override public void run() { final ModifiableRootModel model = ModuleRootManager.getInstance(myModule).getModifiableModel(); final VirtualFile parent = myModule.getModuleFile().getParent(); diff --git a/plugins/devkit/testSources/codeInsight/PluginXmlFunctionalTest.java b/plugins/devkit/testSources/codeInsight/PluginXmlFunctionalTest.java index 1a5ad0f47b4a..27ba8b3ef621 100644 --- a/plugins/devkit/testSources/codeInsight/PluginXmlFunctionalTest.java +++ b/plugins/devkit/testSources/codeInsight/PluginXmlFunctionalTest.java @@ -107,6 +107,7 @@ public class PluginXmlFunctionalTest extends JavaCodeInsightFixtureTestCase { myTempDirFixture.createFile(root + "/META-INF/plugin.xml", text); new WriteCommandAction(getProject()) { + @Override protected void run(Result result) throws Throwable { PsiTestUtil.addSourceContentToRoots(myModule, myTempDirFixture.getFile(root)); } diff --git a/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/Eclipse2ModulesTest.java b/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/Eclipse2ModulesTest.java index 0245ec69d03e..46333beab9ab 100644 --- a/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/Eclipse2ModulesTest.java +++ b/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/Eclipse2ModulesTest.java @@ -73,6 +73,7 @@ public abstract class Eclipse2ModulesTest extends IdeaTestCase { final VirtualFile file = ApplicationManager.getApplication().runWriteAction( new Computable() { + @Override @Nullable public VirtualFile compute() { final VirtualFile baseDir = getProject().getBaseDir(); @@ -88,6 +89,7 @@ public abstract class Eclipse2ModulesTest extends IdeaTestCase { Assert.assertTrue("File not found", false); } ApplicationManager.getApplication().runWriteAction(new Runnable() { + @Override public void run(){ model.commit(); } diff --git a/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseClasspath2ModulesTest.java b/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseClasspath2ModulesTest.java index f7f54687ade0..785380a2efbe 100644 --- a/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseClasspath2ModulesTest.java +++ b/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseClasspath2ModulesTest.java @@ -42,6 +42,7 @@ public class EclipseClasspath2ModulesTest extends Eclipse2ModulesTest { doTest("multi", "main"); } + @Override protected void doTest(final String workspaceRoot, final String projectRoot) throws Exception { super.doTest(workspaceRoot, projectRoot); EclipseClasspathTest.doTest("/" + workspaceRoot + "/" + projectRoot, getProject()); diff --git a/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseClasspathTest.java b/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseClasspathTest.java index c0e51b9d16dd..3d046c5487b1 100644 --- a/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseClasspathTest.java +++ b/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseClasspathTest.java @@ -80,6 +80,7 @@ public class EclipseClasspathTest extends IdeaTestCase { } final Element classpathElement = JDOMUtil.loadDocument(fileText).getRootElement(); final Module module = ApplicationManager.getApplication().runWriteAction(new Computable() { + @Override public Module compute() { return ModuleManager.getInstance(project) .newModule(path + "/" + EclipseProjectFinder.findProjectName(path) + IdeaXml.IML_EXT, StdModuleTypes.JAVA); diff --git a/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseEmlTest.java b/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseEmlTest.java index 4bde31d949ef..405b0733d4b2 100644 --- a/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseEmlTest.java +++ b/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseEmlTest.java @@ -66,6 +66,7 @@ public class EclipseEmlTest extends IdeaTestCase { protected static void doTest(String relativePath, final Project project) throws Exception { final String path = project.getBaseDir().getPath() + relativePath; final Module module = ApplicationManager.getApplication().runWriteAction(new Computable() { + @Override public Module compute() { return ModuleManager.getInstance(project) .newModule(path + "/" + EclipseProjectFinder.findProjectName(path) + IdeaXml.IML_EXT, StdModuleTypes.JAVA); diff --git a/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseImlTest.java b/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseImlTest.java index e837baef9634..05a580e8b935 100644 --- a/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseImlTest.java +++ b/plugins/eclipse/testSources/org/jetbrains/idea/eclipse/EclipseImlTest.java @@ -84,6 +84,7 @@ public class EclipseImlTest extends IdeaTestCase { fileText = fileText.replaceAll("\\$" + JUNIT + "\\$", communityAppDir); final Element classpathElement = JDOMUtil.loadDocument(fileText).getRootElement(); final Module module = ApplicationManager.getApplication().runWriteAction(new Computable() { + @Override public Module compute() { return ModuleManager.getInstance(project) .newModule(new File(path) + File.separator + EclipseProjectFinder diff --git a/plugins/git4idea/tests/git4idea/tests/ChangeListManagerUpdateOnFileChangeTest.java b/plugins/git4idea/tests/git4idea/tests/ChangeListManagerUpdateOnFileChangeTest.java index 494f26a33858..0ee5ecfcfd0d 100644 --- a/plugins/git4idea/tests/git4idea/tests/ChangeListManagerUpdateOnFileChangeTest.java +++ b/plugins/git4idea/tests/git4idea/tests/ChangeListManagerUpdateOnFileChangeTest.java @@ -43,6 +43,7 @@ public class ChangeListManagerUpdateOnFileChangeTest extends GitTestCase { private ChangeListManagerImpl myChangeListManager; private VirtualFile afile; + @Override @BeforeMethod public void setUp() throws Exception { super.setUp(); diff --git a/plugins/git4idea/tests/git4idea/tests/GitHistoryUtilsTestCase.java b/plugins/git4idea/tests/git4idea/tests/GitHistoryUtilsTestCase.java index 7ceabcfc9fc2..924e7fbaac0c 100644 --- a/plugins/git4idea/tests/git4idea/tests/GitHistoryUtilsTestCase.java +++ b/plugins/git4idea/tests/git4idea/tests/GitHistoryUtilsTestCase.java @@ -130,11 +130,13 @@ public class GitHistoryUtilsTestCase extends GitTestCase { public void testAppendableHistory() throws Exception { final List revisions = new ArrayList(3); Consumer consumer = new Consumer() { + @Override public void consume(GitFileRevision gitFileRevision) { revisions.add(gitFileRevision); } }; Consumer exceptionConsumer = new Consumer() { + @Override public void consume(VcsException exception) { fail("No exception expected", exception); } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyGotoImplementationTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyGotoImplementationTest.java index 2223a3ee5594..0a065458dc9a 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyGotoImplementationTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyGotoImplementationTest.java @@ -39,6 +39,7 @@ public class GroovyGotoImplementationTest extends JavaCodeInsightFixtureTestCase dirFixture.setUp(); new WriteCommandAction(getProject()) { + @Override protected void run(Result result) throws Throwable { final VirtualFile outside = dirFixture.getFile("").createChildDirectory(this, "outside"); PsiTestUtil.addContentRoot(myModule, outside); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyGotoTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyGotoTest.java index 038a23c4bcaf..86f77bc2a0cf 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyGotoTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyGotoTest.java @@ -50,6 +50,7 @@ public class GroovyGotoTest extends LightCodeInsightFixtureTestCase { public void testNewExpression() throws Throwable { doTest(new Condition() { + @Override public boolean value(PsiElement element) { return element instanceof GrMethod && ((GrMethod)element).isConstructor() && ((GrMethod)element).getParameters().length == 0; } @@ -58,6 +59,7 @@ public class GroovyGotoTest extends LightCodeInsightFixtureTestCase { public void testNewExpressionWithNamedArgs() throws Throwable { doTest(new Condition() { + @Override public boolean value(PsiElement element) { return element instanceof PsiClass; } @@ -66,6 +68,7 @@ public class GroovyGotoTest extends LightCodeInsightFixtureTestCase { public void testNewExpressionWithMapParameter() throws Throwable { doTest(new Condition() { + @Override public boolean value(PsiElement element) { return element instanceof GrMethod && ((GrMethod)element).isConstructor() && ((GrMethod)element).getParameters().length == 1; } @@ -74,6 +77,7 @@ public class GroovyGotoTest extends LightCodeInsightFixtureTestCase { public void testNewExpressionWithAnonymousClass() throws Throwable { doTest(new Condition() { + @Override public boolean value(PsiElement element) { return element instanceof GrMethod && ((GrMethod)element).isConstructor() && ((GrMethod)element).getParameters().length == 2; } @@ -82,6 +86,7 @@ public class GroovyGotoTest extends LightCodeInsightFixtureTestCase { public void testGroovyDocParameter1() throws Throwable { doTest(new Condition() { + @Override public boolean value(PsiElement element) { return element instanceof GrParameter && ((GrParameter)element).getName().equals("x"); } @@ -90,6 +95,7 @@ public class GroovyGotoTest extends LightCodeInsightFixtureTestCase { public void testGroovyDocParameter2() throws Throwable { doTest(new Condition() { + @Override public boolean value(PsiElement element) { return element instanceof GrParameter && ((GrParameter)element).getName().equals("x"); } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/LightGroovyTestCase.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/LightGroovyTestCase.java index 752f7280b92d..dd8de05b8b32 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/LightGroovyTestCase.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/LightGroovyTestCase.java @@ -38,14 +38,17 @@ import org.jetbrains.plugins.groovy.util.TestUtils; */ public abstract class LightGroovyTestCase extends LightCodeInsightFixtureTestCase { public static final LightProjectDescriptor GROOVY_DESCRIPTOR = new LightProjectDescriptor() { + @Override public ModuleType getModuleType() { return StdModuleTypes.JAVA; } + @Override public Sdk getSdk() { return JavaSdkImpl.getMockJdk17("java 1.5"); } + @Override public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { final Library.ModifiableModel modifiableModel = model.getModuleLibraryTable().createLibrary("GROOVY").getModifiableModel(); final VirtualFile groovyJar = @@ -55,6 +58,7 @@ public abstract class LightGroovyTestCase extends LightCodeInsightFixtureTestCas } }; + @Override @NotNull protected LightProjectDescriptor getProjectDescriptor() { return GROOVY_DESCRIPTOR; @@ -66,6 +70,7 @@ public abstract class LightGroovyTestCase extends LightCodeInsightFixtureTestCas * * @return relative path to the test data. */ + @Override @NonNls protected abstract String getBasePath(); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyCompilerTestCase.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyCompilerTestCase.java index 01c7d6a9d682..42e74686e6bc 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyCompilerTestCase.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyCompilerTestCase.java @@ -66,6 +66,7 @@ public abstract class GroovyCompilerTestCase extends JavaCodeInsightFixtureTestC CompilerManagerImpl.testSetup(); new WriteCommandAction(getProject()) { + @Override protected void run(Result result) throws Throwable { CompilerProjectExtension.getInstance(getProject()).setCompilerOutputUrl(myMainOutput.findOrCreateDir("out").getUrl()); } @@ -95,6 +96,7 @@ public abstract class GroovyCompilerTestCase extends JavaCodeInsightFixtureTestC protected void setupTestSources() { new WriteCommandAction(getProject()) { + @Override protected void run(Result result) throws Throwable { final ModuleRootManager rootManager = ModuleRootManager.getInstance(myModule); final ModifiableRootModel rootModel = rootManager.getModifiableModel(); @@ -134,6 +136,7 @@ public abstract class GroovyCompilerTestCase extends JavaCodeInsightFixtureTestC protected void deleteClassFile(final String className) throws IOException { new WriteCommandAction(getProject()) { + @Override protected void run(Result result) throws Throwable { final CompilerModuleExtension extension = ModuleRootManager.getInstance(myModule).getModuleExtension(CompilerModuleExtension.class); //noinspection ConstantConditions @@ -148,6 +151,7 @@ public abstract class GroovyCompilerTestCase extends JavaCodeInsightFixtureTestC protected static void setFileText(final PsiFile file, final String barText) throws IOException { Runnable runnable = new Runnable() { + @Override public void run() { try { VfsUtil.saveText(ObjectUtils.assertNotNull(file.getVirtualFile()), barText); @@ -163,6 +167,7 @@ public abstract class GroovyCompilerTestCase extends JavaCodeInsightFixtureTestC protected void setFileName(final PsiFile bar, final String name) { new WriteCommandAction(getProject()) { + @Override protected void run(Result result) throws Throwable { bar.setName(name); } @@ -197,8 +202,10 @@ public abstract class GroovyCompilerTestCase extends JavaCodeInsightFixtureTestC semaphore.down(); runner.execute(extension, environment, new ProgramRunner.Callback() { + @Override public void processStarted(final RunContentDescriptor descriptor) { Disposer.register(myFixture.getProject(), new Disposable() { + @Override public void dispose() { descriptor.dispose(); } @@ -206,6 +213,7 @@ public abstract class GroovyCompilerTestCase extends JavaCodeInsightFixtureTestC final ProcessHandler handler = descriptor.getProcessHandler(); assert handler != null; handler.addProcessListener(new ProcessAdapter() { + @Override public void onTextAvailable(ProcessEvent event, Key outputType) { if (ProcessOutputTypes.SYSTEM != outputType) { sb.append(event.getText()); @@ -232,6 +240,7 @@ public abstract class GroovyCompilerTestCase extends JavaCodeInsightFixtureTestC mySemaphore = semaphore; } + @Override public void finished(boolean aborted, int errors, int warnings, final CompileContext compileContext) { try { assertFalse("Code did not compile!", aborted); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyLiveTemplatesTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyLiveTemplatesTest.java index 3528fb13e094..85d78b5cc9b8 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyLiveTemplatesTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyLiveTemplatesTest.java @@ -31,6 +31,7 @@ public class GroovyLiveTemplatesTest extends LightCodeInsightFixtureTestCase{ public static void expandTemplate(final Editor editor) { new WriteCommandAction(editor.getProject()) { + @Override protected void run(Result result) throws Throwable { new ListTemplatesAction().actionPerformedImpl(editor.getProject(), editor); ((LookupImpl)LookupManager.getActiveLookup(editor)).finishLookup(Lookup.NORMAL_SELECT_CHAR); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/actions/updown/GroovyMoveStatementTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/actions/updown/GroovyMoveStatementTest.java index ce58eab853b9..1e9bbe9eb953 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/actions/updown/GroovyMoveStatementTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/actions/updown/GroovyMoveStatementTest.java @@ -98,6 +98,7 @@ public class GroovyMoveStatementTest extends LightCodeInsightFixtureTestCase { final EditorActionHandler handler = EditorActionManager.getInstance().getActionHandler(actionId); new WriteCommandAction(getProject()) { + @Override protected void run(Result result) throws Throwable { final Editor editor = myFixture.getEditor(); handler.execute(editor, DataManager.getInstance().getDataContext(editor.getContentComponent())); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/completion/CompletionTestBase.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/completion/CompletionTestBase.java index e5fe2d8f3041..6bf21798bbfa 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/completion/CompletionTestBase.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/completion/CompletionTestBase.java @@ -49,6 +49,7 @@ public abstract class CompletionTestBase extends JavaCodeInsightFixtureTestCase List items = lookup.getItems(); if (!addReferenceVariants()) { items = ContainerUtil.findAll(items, new Condition() { + @Override public boolean value(LookupElement lookupElement) { final Object o = lookupElement.getObject(); return !(o instanceof PsiMember) && !(o instanceof GrVariable); @@ -56,6 +57,7 @@ public abstract class CompletionTestBase extends JavaCodeInsightFixtureTestCase }); } Collections.sort(items, new Comparator() { + @Override public int compare(LookupElement o1, LookupElement o2) { return o1.getLookupString().compareTo(o2.getLookupString()); } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/completion/KeywordCompletionTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/completion/KeywordCompletionTest.java index 78687544c4e7..0ab590f3bfe5 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/completion/KeywordCompletionTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/completion/KeywordCompletionTest.java @@ -91,6 +91,7 @@ public class KeywordCompletionTest extends CompletionTestBase { return TestUtils.getTestDataPath() + "groovy/oldCompletion/keyword"; } + @Override protected boolean addReferenceVariants() { return false; } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/completion/ReferenceCompletionTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/completion/ReferenceCompletionTest.java index 88f207b96ecd..a347da742038 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/completion/ReferenceCompletionTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/completion/ReferenceCompletionTest.java @@ -54,6 +54,7 @@ public class ReferenceCompletionTest extends CompletionTestBase { return TestUtils.getTestDataPath() + "groovy/oldCompletion/reference"; } + @Override protected boolean addKeywords() { return false; } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/formatter/FormatterTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/formatter/FormatterTest.java index 697f39e94dfc..b3b4005ab51d 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/formatter/FormatterTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/formatter/FormatterTest.java @@ -34,6 +34,7 @@ public class FormatterTest extends GroovyFormatterTestCase { return TestUtils.getTestDataPath() + "groovy/formatter/"; } + @Override protected void setUp() throws Exception { super.setUp(); myTempSettings.CLASS_BRACE_STYLE = CodeStyleSettings.END_OF_LINE; diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/formatter/GroovyFormatterTestCase.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/formatter/GroovyFormatterTestCase.java index 3f9b195e674c..f40d03e36863 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/formatter/GroovyFormatterTestCase.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/formatter/GroovyFormatterTestCase.java @@ -83,8 +83,10 @@ public abstract class GroovyFormatterTestCase extends LightCodeInsightFixtureTes protected void checkFormatting(String expected) throws IOException { CommandProcessor.getInstance().executeCommand(getProject(), new Runnable() { + @Override public void run() { ApplicationManager.getApplication().runWriteAction(new Runnable() { + @Override public void run() { try { final PsiFile file = myFixture.getFile(); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/overriding/AllSuperMethodsTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/overriding/AllSuperMethodsTest.java index f0d17bc6fd05..d5742dc1dd43 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/overriding/AllSuperMethodsTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/overriding/AllSuperMethodsTest.java @@ -22,6 +22,7 @@ public class AllSuperMethodsTest extends OverridingTester { public void testMethodWithoutParameters() throws Throwable { doTest(); } public void testMethodWithParameters() throws Throwable { doTest(); } + @Override PsiMethod[] findMethod(PsiMethod method) { return method.findSuperMethods(); } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/overriding/DeepestSuperMethodsTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/overriding/DeepestSuperMethodsTest.java index d764b0686d3c..d8d43420d035 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/overriding/DeepestSuperMethodsTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/overriding/DeepestSuperMethodsTest.java @@ -21,6 +21,7 @@ public class DeepestSuperMethodsTest extends OverridingTester { return super.getBasePath() + "deepestSuperMethods"; } + @Override PsiMethod[] findMethod(PsiMethod method) { return method.findDeepestSuperMethods(); } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/psi/PsiEventsTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/psi/PsiEventsTest.java index 08488e86dd13..d8cff6c77de1 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/psi/PsiEventsTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/psi/PsiEventsTest.java @@ -16,6 +16,7 @@ public class PsiEventsTest extends PsiTestCase { public void testEditingInDocComment() throws Exception { final Ref gotIt = new Ref(false); getPsiManager().addPsiTreeChangeListener(new PsiTreeChangeAdapter() { + @Override public void childReplaced(PsiTreeChangeEvent event) { gotIt.set(true); } @@ -27,8 +28,10 @@ public class PsiEventsTest extends PsiTestCase { assertNotNull(doc); CommandProcessor.getInstance().executeCommand(myProject, new Runnable() { + @Override public void run() { ApplicationManager.getApplication().runWriteAction(new Runnable() { + @Override public void run() { doc.insertString(3, " "); docManager.commitDocument(doc); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/smartEnter/SmartEnterTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/smartEnter/SmartEnterTest.java index 87138f32b31c..2b74226fd2b0 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/smartEnter/SmartEnterTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/smartEnter/SmartEnterTest.java @@ -50,6 +50,7 @@ public class SmartEnterTest extends LightCodeInsightFixtureTestCase { final List processors = getSmartProcessors(GroovyFileType.GROOVY_LANGUAGE); new WriteCommandAction(getProject()) { + @Override protected void run(Result result) throws Throwable { final Editor editor = myFixture.getEditor(); for (SmartEnterProcessor processor : processors) { diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/changeSignature/ChangeSignatureForJavaTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/changeSignature/ChangeSignatureForJavaTest.java index 3a7ee3b4c5e7..86f6aac1815b 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/changeSignature/ChangeSignatureForJavaTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/changeSignature/ChangeSignatureForJavaTest.java @@ -25,6 +25,7 @@ public class ChangeSignatureForJavaTest extends LightCodeInsightFixtureTestCase public void testGenericTypes() throws Exception { doTest(null, null, "T", new GenParams() { + @Override public ParameterInfoImpl[] genParams(PsiMethod method) throws IncorrectOperationException { final PsiElementFactory factory = JavaPsiFacade.getInstance(getProject()).getElementFactory(); return new ParameterInfoImpl[]{ @@ -37,6 +38,7 @@ public class ChangeSignatureForJavaTest extends LightCodeInsightFixtureTestCase public void testGenericTypesInOldParameters() throws Exception { doTest(null, null, null, new GenParams() { + @Override public ParameterInfoImpl[] genParams(PsiMethod method) throws IncorrectOperationException { final PsiElementFactory factory = JavaPsiFacade.getInstance(getProject()).getElementFactory(); return new ParameterInfoImpl[] { @@ -48,6 +50,7 @@ public class ChangeSignatureForJavaTest extends LightCodeInsightFixtureTestCase public void testTypeParametersInMethod() throws Exception { doTest(null, null, null, new GenParams() { + @Override public ParameterInfoImpl[] genParams(PsiMethod method) throws IncorrectOperationException { final PsiElementFactory factory = JavaPsiFacade.getInstance(getProject()).getElementFactory(); return new ParameterInfoImpl[]{ @@ -195,6 +198,7 @@ public class ChangeSignatureForJavaTest extends LightCodeInsightFixtureTestCase public void testAddException() throws Exception { doTest(null, null, null, new SimpleParameterGen(new ParameterInfoImpl[0]), new GenExceptions() { + @Override public ThrownExceptionInfo[] genExceptions(PsiMethod method) { return new ThrownExceptionInfo[] { new JavaThrownExceptionInfo(-1, JavaPsiFacade.getInstance(method.getProject()).getElementFactory().createTypeByFQClassName("java.lang.Exception", method.getResolveScope())) @@ -257,6 +261,7 @@ public class ChangeSignatureForJavaTest extends LightCodeInsightFixtureTestCase myInfos = infos; } + @Override public ParameterInfoImpl[] genParams(PsiMethod method) { for (ParameterInfoImpl info : myInfos) { info.updateFromMethod(method); @@ -280,6 +285,7 @@ public class ChangeSignatureForJavaTest extends LightCodeInsightFixtureTestCase myInfos = infos; } + @Override public ThrownExceptionInfo[] genExceptions(PsiMethod method) { for (ThrownExceptionInfo info : myInfos) { info.updateFromMethod(method); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/changeSignature/ChangeSignatureTestCase.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/changeSignature/ChangeSignatureTestCase.java index bb342d1d5c93..02a17928026a 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/changeSignature/ChangeSignatureTestCase.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/changeSignature/ChangeSignatureTestCase.java @@ -78,6 +78,7 @@ public abstract class ChangeSignatureTestCase extends LightCodeInsightFixtureTes myProject = project; } + @Override public GrParameterInfo[] genParams(GrMethod method) { GrParameter[] params = method.getParameterList().getParameters(); GrParameterInfo[] result = new GrParameterInfo[myInfos.length]; @@ -136,6 +137,7 @@ public abstract class ChangeSignatureTestCase extends LightCodeInsightFixtureTes myInfos = infos; } + @Override public ThrownExceptionInfo[] genExceptions(PsiMethod method) { for (ThrownExceptionInfo info : myInfos) { info.updateFromMethod(method); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/copy/GroovyCopyClassTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/copy/GroovyCopyClassTest.java index 4320b7789721..ee67421e5177 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/copy/GroovyCopyClassTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/copy/GroovyCopyClassTest.java @@ -30,6 +30,7 @@ import java.util.Collections; */ public class GroovyCopyClassTest extends LightCodeInsightFixtureTestCase { + @Override protected String getBasePath() { return TestUtils.getTestDataPath() + "refactoring/copy/"; } @@ -43,6 +44,7 @@ public class GroovyCopyClassTest extends LightCodeInsightFixtureTestCase { final PsiClass srcClass = myFixture.getJavaFacade().findClass("foo." + testName, GlobalSearchScope.allScope(getProject())); assertTrue(CopyClassesHandler.canCopyClass(srcClass)); new WriteCommandAction(getProject()) { + @Override protected void run(Result result) throws Throwable { CopyClassesHandler.doCopyClasses(Collections.singletonMap(srcClass.getNavigationElement().getContainingFile(), new PsiClass[]{srcClass}), testName + "_after", srcClass.getManager().findDirectory(myFixture.getTempDirFixture().getFile("bar")), getProject()); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/implExtQuickFix/ImplementsExtendsQuickFixTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/implExtQuickFix/ImplementsExtendsQuickFixTest.java index fa764c0bd9e9..da2c630d6327 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/implExtQuickFix/ImplementsExtendsQuickFixTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/implExtQuickFix/ImplementsExtendsQuickFixTest.java @@ -44,6 +44,7 @@ public class ImplementsExtendsQuickFixTest extends LightCodeInsightFixtureTestCa newText = ""; } else { new WriteCommandAction(getProject()) { + @Override protected void run(Result result) throws Throwable { ChangeExtendsImplementsQuickFix fix = new ChangeExtendsImplementsQuickFix(typeDefinition.getExtendsClause(), typeDefinition.getImplementsClause()); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/inline/InlineMethodTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/inline/InlineMethodTest.java index aa5957d5530d..75736e27de0e 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/inline/InlineMethodTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/inline/InlineMethodTest.java @@ -105,6 +105,7 @@ public class InlineMethodTest extends LightCodeInsightFixtureTestCase { @Override public Settings prepareInlineElement(PsiElement element, Editor editor, boolean invokedOnReference) { return new Settings() { + @Override public boolean isOnlyOneReferenceToInline() { return false; } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceParameter/IntroduceParameterTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceParameter/IntroduceParameterTest.java index 109853732d1b..82ead2c02a9f 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceParameter/IntroduceParameterTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceParameter/IntroduceParameterTest.java @@ -105,8 +105,10 @@ public class IntroduceParameterTest extends LightCodeInsightFixtureTestCase { parametersToRemove); CommandProcessor.getInstance().executeCommand(project, new Runnable() { + @Override public void run() { ApplicationManager.getApplication().runWriteAction(new Runnable() { + @Override public void run() { try { processor.run(); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassTest.java index de94d472dfbf..1ae43ed356aa 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassTest.java @@ -46,6 +46,7 @@ import java.util.Comparator; * @author Maxim.Medvedev */ public class GroovyMoveClassTest extends LightCodeInsightFixtureTestCase { + @Override protected String getBasePath() { return TestUtils.getTestDataPath() + "refactoring/move/moveClass/"; } @@ -136,8 +137,10 @@ public class GroovyMoveClassTest extends LightCodeInsightFixtureTestCase { final Application application = ApplicationManager.getApplication(); CommandProcessor.getInstance().executeCommand(myFixture.getProject(), new Runnable() { + @Override public void run() { application.runWriteAction(new Runnable() { + @Override public void run() { new MoveClassesOrPackagesProcessor(getProject(), classes, new SingleSourceRootMoveDestination( PackageWrapper.create(JavaDirectoryService.getInstance().getPackage(dirs[0])), dirs[0]), true, true, null).run(); @@ -168,12 +171,14 @@ public class GroovyMoveClassTest extends LightCodeInsightFixtureTestCase { final File[] ch1 = d1.listFiles(); final VirtualFile[] ch2 = d2.getChildren(); Arrays.sort(ch1, new Comparator() { + @Override public int compare(File o1, File o2) { return o1.getName().compareTo(o2.getName()); } }); Arrays.sort(ch2, new Comparator() { + @Override public int compare(VirtualFile o1, VirtualFile o2) { return o1.getName().compareTo(o2.getName()); } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveMembersTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveMembersTest.java index 9f49ea777942..43d69f9cb881 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveMembersTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveMembersTest.java @@ -158,10 +158,12 @@ public class GroovyMoveMembersTest extends LightCodeInsightFixtureTestCase { this(targetClassName, memberSet.toArray(new PsiMember[memberSet.size()])); } + @Override public String getMemberVisibility() { return myMemberVisibility; } + @Override public boolean makeEnumConstant() { return true; } @@ -170,10 +172,12 @@ public class GroovyMoveMembersTest extends LightCodeInsightFixtureTestCase { myMemberVisibility = visibility; } + @Override public PsiMember[] getSelectedMembers() { return mySelectedMembers; } + @Override public String getTargetClassName() { return myTargetClassName; } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveScriptTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveScriptTest.java index d644ae6a1df4..a379d53f47f9 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveScriptTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveScriptTest.java @@ -36,6 +36,7 @@ import java.io.File; */ public class GroovyMoveScriptTest extends LightCodeInsightFixtureTestCase { + @Override protected String getBasePath() { return TestUtils.getTestDataPath() + "refactoring/move/moveScript/"; } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/optimizeImports/OptimizeImportsTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/optimizeImports/OptimizeImportsTest.java index ef690bea0c2a..bc7116e45677 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/optimizeImports/OptimizeImportsTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/optimizeImports/OptimizeImportsTest.java @@ -167,6 +167,7 @@ public class OptimizeImportsTest extends LightCodeInsightFixtureTestCase { final Runnable runnable = optimizer.processFile(myFixture.getFile()); CommandProcessor.getInstance().executeCommand(getProject(), new Runnable() { + @Override public void run() { ApplicationManager.getApplication().runWriteAction(runnable); } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/testcases/FileSetTestCase.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/testcases/FileSetTestCase.java index 5ddc651bc861..5fa12175dd9d 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/testcases/FileSetTestCase.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/testcases/FileSetTestCase.java @@ -68,6 +68,7 @@ public abstract class FileSetTestCase extends TestSuite { addAllTests(); } + @Override public String getName() { return getClass().getName(); } @@ -94,20 +95,24 @@ public abstract class FileSetTestCase extends TestSuite { setName(testFile.getPath()); } + @Override protected void setUp() throws Exception { super.setUp(); FileSetTestCase.this.setUp(); } + @Override protected void tearDown() throws Exception { FileSetTestCase.this.tearDown(); super.tearDown(); } + @Override protected void runTest() throws Throwable { FileSetTestCase.this.runTest(myTestFile); } + @Override public int countTestCases() { return 1; } @@ -116,10 +121,12 @@ public abstract class FileSetTestCase extends TestSuite { return myTestFile.getAbsolutePath() + " "; } + @Override protected void resetAllFields() { // Do nothing otherwise myTestFile will be nulled out before getName() is called. } + @Override public String getName() { return myTestFile.getAbsolutePath(); } diff --git a/plugins/hg4idea/testSrc/org/zmlx/hg4idea/test/HgUpdateTestCase.java b/plugins/hg4idea/testSrc/org/zmlx/hg4idea/test/HgUpdateTestCase.java index 619f0e231675..c41444da1435 100644 --- a/plugins/hg4idea/testSrc/org/zmlx/hg4idea/test/HgUpdateTestCase.java +++ b/plugins/hg4idea/testSrc/org/zmlx/hg4idea/test/HgUpdateTestCase.java @@ -155,6 +155,7 @@ public class HgUpdateTestCase extends HgFromClonedTestCase { assertTrue(localChanges.contains(new HgChange(getHgFile(filepath), status))); } + @Override protected HgFile getHgFile(String... filepath) { File fileToInclude = projectRepo; for (int i = 0; i < filepath.length; i++) { diff --git a/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/ClassNameWithMistakesInspectionTest.java b/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/ClassNameWithMistakesInspectionTest.java index be802a859f5e..c5e5b12692df 100644 --- a/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/ClassNameWithMistakesInspectionTest.java +++ b/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/ClassNameWithMistakesInspectionTest.java @@ -22,6 +22,7 @@ import com.intellij.spellchecker.inspections.SpellCheckerInspectionToolProvider; * User: Ekaterina Shliakhovetskaja */ public class ClassNameWithMistakesInspectionTest extends JavaSpellcheckerInspectionTestCase { + @Override protected String getBasePath() { return getSpellcheckerTestDataPath() + "/inspection/classNameWithMistakes"; } diff --git a/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/DocCommentWithMistakesInspectionTest.java b/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/DocCommentWithMistakesInspectionTest.java index 061eb2d2aab5..36f1d808dc87 100644 --- a/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/DocCommentWithMistakesInspectionTest.java +++ b/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/DocCommentWithMistakesInspectionTest.java @@ -24,6 +24,7 @@ import com.intellij.spellchecker.inspections.SpellCheckerInspectionToolProvider; public class DocCommentWithMistakesInspectionTest extends JavaSpellcheckerInspectionTestCase { + @Override protected String getBasePath() { return getSpellcheckerTestDataPath() + "/inspection/docCommentWithMistakes"; } diff --git a/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/FieldNameWithMistakesInspectionTest.java b/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/FieldNameWithMistakesInspectionTest.java index 56d185e32fce..1fc2bf37a8b8 100644 --- a/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/FieldNameWithMistakesInspectionTest.java +++ b/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/FieldNameWithMistakesInspectionTest.java @@ -24,6 +24,7 @@ import com.intellij.spellchecker.inspections.SpellCheckerInspectionToolProvider; public class FieldNameWithMistakesInspectionTest extends JavaSpellcheckerInspectionTestCase { + @Override protected String getBasePath() { return getSpellcheckerTestDataPath() + "/inspection/fieldNameWithMistakes"; } diff --git a/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/LocalVariableWithMistakesInspectionTest.java b/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/LocalVariableWithMistakesInspectionTest.java index 5185491772b2..2823cdd75a35 100644 --- a/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/LocalVariableWithMistakesInspectionTest.java +++ b/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/LocalVariableWithMistakesInspectionTest.java @@ -23,6 +23,7 @@ import com.intellij.spellchecker.inspections.SpellCheckerInspectionToolProvider; */ public class LocalVariableWithMistakesInspectionTest extends JavaSpellcheckerInspectionTestCase { + @Override protected String getBasePath() { return getSpellcheckerTestDataPath() + "/inspection/localVariableNameWithMistakes"; } diff --git a/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/MethodNameWithMistakesInspectionTest.java b/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/MethodNameWithMistakesInspectionTest.java index 3545d80e632c..08a155b48266 100644 --- a/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/MethodNameWithMistakesInspectionTest.java +++ b/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/MethodNameWithMistakesInspectionTest.java @@ -23,6 +23,7 @@ import com.intellij.spellchecker.inspections.SpellCheckerInspectionToolProvider; */ public class MethodNameWithMistakesInspectionTest extends JavaSpellcheckerInspectionTestCase { + @Override protected String getBasePath() { return getSpellcheckerTestDataPath() + "/inspection/methodNameWithMistakes"; } diff --git a/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/StringWithMistakesInspectionTest.java b/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/StringWithMistakesInspectionTest.java index 606975191b31..595755cdd520 100644 --- a/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/StringWithMistakesInspectionTest.java +++ b/plugins/java-i18n/testSrc/com/intellij/spellchecker/inspection/StringWithMistakesInspectionTest.java @@ -24,6 +24,7 @@ import com.intellij.spellchecker.inspections.SpellCheckerInspectionToolProvider; */ public class StringWithMistakesInspectionTest extends JavaSpellcheckerInspectionTestCase { + @Override protected String getBasePath() { return getSpellcheckerTestDataPath() + "/inspection/stringWithMistakes"; } diff --git a/plugins/maven/facade-impl/test/org/jetbrains/idea/maven/embedder/MavenFacadeEmbedderTest.java b/plugins/maven/facade-impl/test/org/jetbrains/idea/maven/embedder/MavenFacadeEmbedderTest.java index 80c44ffdb473..13eb732ca776 100644 --- a/plugins/maven/facade-impl/test/org/jetbrains/idea/maven/embedder/MavenFacadeEmbedderTest.java +++ b/plugins/maven/facade-impl/test/org/jetbrains/idea/maven/embedder/MavenFacadeEmbedderTest.java @@ -202,30 +202,37 @@ public class MavenFacadeEmbedderTest extends MavenImportingTestCase { assertEquals("pom", p.getDependencies().get(0).getExtension()); } public static class MyArtifactHandler implements ArtifactHandler { + @Override public String getExtension() { return "pom"; } + @Override public String getDirectory() { throw new UnsupportedOperationException(); } + @Override public String getClassifier() { return null; } + @Override public String getPackaging() { return "foo"; } + @Override public boolean isIncludesDependencies() { return false; } + @Override public String getLanguage() { return "java"; } + @Override public boolean isAddedToClasspath() { return true; } diff --git a/plugins/maven/facade-impl/test/org/jetbrains/idea/maven/embedder/NexusIndexerTest.java b/plugins/maven/facade-impl/test/org/jetbrains/idea/maven/embedder/NexusIndexerTest.java index 934cc9cec40f..07f83324c49b 100644 --- a/plugins/maven/facade-impl/test/org/jetbrains/idea/maven/embedder/NexusIndexerTest.java +++ b/plugins/maven/facade-impl/test/org/jetbrains/idea/maven/embedder/NexusIndexerTest.java @@ -196,35 +196,45 @@ public class NexusIndexerTest extends MavenIndicesTestCase { } private static class NullScanningListener implements ArtifactScanningListener { + @Override public void scanningStarted(IndexingContext indexingContext) { } + @Override public void scanningFinished(IndexingContext indexingContext, ScanningResult scanningResult) { } + @Override public void artifactError(ArtifactContext artifactContext, Exception e) { } + @Override public void artifactDiscovered(ArtifactContext artifactContext) { } } private static class NullTransferListener implements TransferListener { + @Override public void transferInitiated(TransferEvent event) { } + @Override public void transferStarted(TransferEvent event) { } + @Override public void transferProgress(TransferEvent event, byte[] bytes, int i) { } + @Override public void transferCompleted(TransferEvent event) { } + @Override public void transferError(TransferEvent event) { } + @Override public void debug(String s) { } } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenImportingTestCase.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenImportingTestCase.java index 1e7f5e9d5964..eefec7494534 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenImportingTestCase.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenImportingTestCase.java @@ -418,6 +418,7 @@ public abstract class MavenImportingTestCase extends MavenTestCase { AsyncResult result = new AsyncResult(); result.doWhenDone(new AsyncResult.Handler() { + @Override public void run(MavenArtifactDownloader.DownloadResult unresolvedArtifacts) { unresolved[0] = unresolvedArtifacts; } @@ -481,6 +482,7 @@ public abstract class MavenImportingTestCase extends MavenTestCase { CompileScope scope = new ModuleCompileScope(myProject, modules.toArray(new Module[modules.size()]), false); CompilerManager.getInstance(myProject).make(scope, new CompileStatusNotification() { + @Override public void finished(boolean aborted, int errors, int warnings, CompileContext compileContext) { assertFalse(aborted); assertEquals(collectMessages(compileContext, CompilerMessageCategory.ERROR), 0, errors); @@ -501,6 +503,7 @@ public abstract class MavenImportingTestCase extends MavenTestCase { protected AtomicInteger configConfirmationForYesAnswer() { final AtomicInteger counter = new AtomicInteger(); Messages.setTestDialog(new TestDialog() { + @Override public int show(String message) { counter.set(counter.get() + 1); return 0; @@ -512,6 +515,7 @@ public abstract class MavenImportingTestCase extends MavenTestCase { protected AtomicInteger configConfirmationForNoAnswer() { final AtomicInteger counter = new AtomicInteger(); Messages.setTestDialog(new TestDialog() { + @Override public int show(String message) { counter.set(counter.get() + 1); return 1; diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java index 54ed5dd1a821..420e5e6ca1c9 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java @@ -86,6 +86,7 @@ public abstract class MavenTestCase extends UsefulTestCase { restoreSettingsFile(); ApplicationManager.getApplication().runWriteAction(new Runnable() { + @Override public void run() { try { setUpInWriteAction(); @@ -162,6 +163,7 @@ public abstract class MavenTestCase extends UsefulTestCase { try { if (runInWriteAction()) { new WriteAction() { + @Override protected void run(Result result) throws Throwable { MavenTestCase.super.runTest(); } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/NullMavenConsole.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/NullMavenConsole.java index 2bd3950452e8..e24ec3e15ca1 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/NullMavenConsole.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/NullMavenConsole.java @@ -24,20 +24,25 @@ public class NullMavenConsole extends MavenConsole { super(MavenExecutionOptions.LoggingLevel.DISABLED, false); } + @Override public boolean canPause() { return false; } + @Override public boolean isOutputPaused() { return false; } + @Override public void setOutputPaused(boolean outputPaused) { } + @Override public void attachToProcess(ProcessHandler processHandler) { } + @Override protected void doPrint(String text, MavenConsole.OutputType type) { } } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencyCompletionAndResolutionTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencyCompletionAndResolutionTest.java index 0cc55889f5ae..18ddf206e1c0 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencyCompletionAndResolutionTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencyCompletionAndResolutionTest.java @@ -1016,26 +1016,32 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi myFiles = files; } + @Override public FileChooserDialog createFileChooser(FileChooserDescriptor descriptor, Project project) { return new MyFileChooserDialog(myFiles); } + @Override public FileChooserDialog createFileChooser(FileChooserDescriptor descriptor, Component parent) { return new MyFileChooserDialog(myFiles); } + @Override public FileTextField createFileTextField(FileChooserDescriptor descriptor, boolean showHidden, Disposable parent) { throw new UnsupportedOperationException(); } + @Override public FileTextField createFileTextField(FileChooserDescriptor descriptor, Disposable parent) { throw new UnsupportedOperationException(); } + @Override public void installFileCompletion(JTextField field, FileChooserDescriptor descriptor, boolean showHidden, Disposable parent) { throw new UnsupportedOperationException(); } + @Override public FileSaverDialog createSaveFileDialog(FileSaverDescriptor descriptor, Project project) { throw new UnsupportedOperationException(); } @@ -1048,6 +1054,7 @@ public class MavenDependencyCompletionAndResolutionTest extends MavenDomWithIndi myFiles = files; } + @Override @NotNull public VirtualFile[] choose(@Nullable VirtualFile toSelect, @Nullable Project project) { return myFiles; diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDomTestCase.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDomTestCase.java index b07cd742dea7..6a31732e98dd 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDomTestCase.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDomTestCase.java @@ -329,6 +329,7 @@ public abstract class MavenDomTestCase extends MavenImportingTestCase { protected List search(VirtualFile file) throws IOException { final MapDataContext context = createDataContext(file); UsageTarget[] targets = UsageTargetUtil.findUsageTargets(new DataProvider() { + @Override public Object getData(@NonNls String dataId) { return context.getData(dataId); } @@ -336,6 +337,7 @@ public abstract class MavenDomTestCase extends MavenImportingTestCase { PsiElement target = ((PsiElement2UsageTargetAdapter)targets[0]).getElement(); List result = new ArrayList(ReferencesSearch.search(target).findAll()); return ContainerUtil.map(result, new Function() { + @Override public PsiElement fun(PsiReference psiReference) { return psiReference.getElement(); } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModelReadingAndWritingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModelReadingAndWritingTest.java index 28eec43cb1a4..62c965db38cb 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModelReadingAndWritingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModelReadingAndWritingTest.java @@ -47,6 +47,7 @@ public class MavenModelReadingAndWritingTest extends MavenImportingTestCase { public void testWriting() throws Exception { CommandProcessor.getInstance().executeCommand(myProject, new Runnable() { + @Override public void run() { MavenDomProjectModel model = getDomModel(); @@ -71,6 +72,7 @@ public class MavenModelReadingAndWritingTest extends MavenImportingTestCase { public void testAddingADependency() throws Exception { CommandProcessor.getInstance().executeCommand(myProject, new Runnable() { + @Override public void run() { MavenDomProjectModel model = getDomModel(); diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenExecutionTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenExecutionTest.java index 31c3dad2a363..6c83b0f4fa47 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenExecutionTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenExecutionTest.java @@ -96,6 +96,7 @@ public class MavenExecutionTest extends MavenImportingTestCase { MavenRunConfigurationType.runConfiguration(myProject, params, getMavenGeneralSettings(), new MavenRunnerSettings(), new ProgramRunner.Callback() { + @Override public void processStarted(final RunContentDescriptor descriptor) { descriptor.getProcessHandler().addProcessListener(new ProcessAdapter() { @Override diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenRunnerSettingsTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenRunnerSettingsTest.java index d29ee34933ae..c7e7a7086f8e 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenRunnerSettingsTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenRunnerSettingsTest.java @@ -35,6 +35,7 @@ public class MavenRunnerSettingsTest extends MavenImportingTestCase { @Override protected void tearDown() throws Exception { ApplicationManager.getApplication().runWriteAction(new Runnable() { + @Override public void run() { for (Sdk each : myOldJdks) { ProjectJdkTable.getInstance().addJdk(each); diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenPerformanceTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenPerformanceTest.java index 7dace904c9c7..bf7b01032c0f 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenPerformanceTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MavenPerformanceTest.java @@ -38,6 +38,7 @@ public abstract class MavenPerformanceTest extends MavenImportingTestCase { public void testReading() throws Exception { measure(4000, new Runnable() { + @Override public void run() { myProjectsManager.waitForReadingCompletion(); } @@ -47,6 +48,7 @@ public abstract class MavenPerformanceTest extends MavenImportingTestCase { public void testImporting() throws Exception { myProjectsManager.waitForReadingCompletion(); measure(8, new Runnable() { + @Override public void run() { myProjectsManager.importProjects(); } @@ -57,6 +59,7 @@ public abstract class MavenPerformanceTest extends MavenImportingTestCase { myProjectsManager.waitForReadingCompletion(); myProjectsManager.importProjects(); measure(2, new Runnable() { + @Override public void run() { myProjectsManager.importProjects(); } @@ -67,6 +70,7 @@ public abstract class MavenPerformanceTest extends MavenImportingTestCase { myProjectsManager.waitForReadingCompletion(); List mavenProjects = myProjectsManager.getProjects(); Collections.sort(mavenProjects, new Comparator() { + @Override public int compare(MavenProject o1, MavenProject o2) { return o1.getPath().compareToIgnoreCase(o2.getPath()); } @@ -76,6 +80,7 @@ public abstract class MavenPerformanceTest extends MavenImportingTestCase { myProjectsManager.scheduleResolveInTests(mavenProjects.subList(0, 100)); measure(50000, new Runnable() { + @Override public void run() { myProjectsManager.waitForResolvingCompletion(); } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MiscImportingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MiscImportingTest.java index a81fb83caeb4..a79467741aa4 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MiscImportingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/importing/MiscImportingTest.java @@ -36,10 +36,12 @@ public class MiscImportingTest extends MavenImportingTestCase { protected void setUp() throws Exception { super.setUp(); myProject.getMessageBus().connect().subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootListener() { + @Override public void beforeRootsChange(ModuleRootEvent event) { beforeRootsChangedCount++; } + @Override public void rootsChanged(ModuleRootEvent event) { rootsChangedCount++; } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/indices/MavenIndicesStressTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/indices/MavenIndicesStressTest.java index a24d51c12732..63f2b82afb37 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/indices/MavenIndicesStressTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/indices/MavenIndicesStressTest.java @@ -43,6 +43,7 @@ public abstract class MavenIndicesStressTest extends MavenIndicesTestCase implem final AtomicBoolean isFinished = new AtomicBoolean(false); Thread t1 = new Thread(new Runnable() { + @Override public void run() { try { for (int i = 0; i < 3; i++) { @@ -60,6 +61,7 @@ public abstract class MavenIndicesStressTest extends MavenIndicesTestCase implem }); Thread t2 = new Thread(new Runnable() { + @Override public void run() { Random random = new Random(); while (!isFinished.get()) { @@ -132,6 +134,7 @@ public abstract class MavenIndicesStressTest extends MavenIndicesTestCase implem private Thread createThread(final MavenIndex index, final AtomicInteger finishedCount) { Thread t2 = new Thread(new Runnable() { + @Override public void run() { try { for (int i = 0; i < 1000; i++) { @@ -148,6 +151,7 @@ public abstract class MavenIndicesStressTest extends MavenIndicesTestCase implem return t2; } + @Override public void indexIsBroken(MavenIndex index) { } } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/indices/MavenIndicesTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/indices/MavenIndicesTest.java index 4a54e7b8279f..6101cda220e1 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/indices/MavenIndicesTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/indices/MavenIndicesTest.java @@ -65,6 +65,7 @@ public class MavenIndicesTest extends MavenIndicesTestCase { myIndexer = MavenFacadeManager.getInstance().createIndexer(); myIndicesDir = new File(myDir, relativeDir); myIndices = new MavenIndices(myIndexer, myIndicesDir, new MavenIndex.IndexListener() { + @Override public void indexIsBroken(MavenIndex index) { isBroken = true; } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenFoldersImporterTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenFoldersImporterTest.java index d02596f9f1e1..4a4cc4be992f 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenFoldersImporterTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenFoldersImporterTest.java @@ -158,9 +158,11 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase { final int[] count = new int[]{0}; myProject.getMessageBus().connect().subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootListener() { + @Override public void beforeRootsChange(ModuleRootEvent event) { } + @Override public void rootsChanged(ModuleRootEvent event) { count[0]++; } @@ -196,9 +198,11 @@ public class MavenFoldersImporterTest extends MavenImportingTestCase { final int[] count = new int[]{0}; myProject.getMessageBus().connect().subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootListener() { + @Override public void beforeRootsChange(ModuleRootEvent event) { } + @Override public void rootsChanged(ModuleRootEvent event) { count[0]++; } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectReaderTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectReaderTest.java index 20cf1fbc011b..de23d158412c 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectReaderTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectReaderTest.java @@ -769,6 +769,7 @@ public class MavenProjectReaderTest extends MavenTestCase { "${prop}"); MavenModel p = readProject(module, new MavenProjectReaderProjectLocator() { + @Override public VirtualFile findProjectFile(MavenId coordinates) { return new MavenId("test", "parent", "1").equals(coordinates) ? parent : null; } @@ -993,6 +994,7 @@ public class MavenProjectReaderTest extends MavenTestCase { MavenModel p = readProject(module); assertOrderedElementsAreEqual(ContainerUtil.map(p.getProfiles(), new Function() { + @Override public Object fun(MavenProfile profile) { return profile.getId(); } @@ -1549,6 +1551,7 @@ public class MavenProjectReaderTest extends MavenTestCase { } private static class NullProjectLocator implements MavenProjectReaderProjectLocator { + @Override public VirtualFile findProjectFile(MavenId coordinates) { return null; } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectsTreeIgnoresTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectsTreeIgnoresTest.java index 51219fc2a07d..d4d30c8adac8 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectsTreeIgnoresTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectsTreeIgnoresTest.java @@ -86,6 +86,7 @@ public class MavenProjectsTreeIgnoresTest extends MavenProjectsTreeTestCase { private String format(List projects) { return StringUtil.join(projects, new Function() { + @Override public String fun(MavenProject project) { return project.getMavenId().getArtifactId(); } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectsTreeReadingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectsTreeReadingTest.java index 205c12c1a654..a4cf0690fd28 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectsTreeReadingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenProjectsTreeReadingTest.java @@ -2191,6 +2191,7 @@ public class MavenProjectsTreeReadingTest extends MavenProjectsTreeTestCase { return; } log += StringUtil.join(updated, new Function() { + @Override public String fun(MavenProject each) { return each.getMavenId().getArtifactId(); } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenSettingsTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenSettingsTest.java index f4e7b1e12ace..2dda71beb851 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenSettingsTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/project/MavenSettingsTest.java @@ -25,6 +25,7 @@ public class MavenSettingsTest extends MavenTestCase { MavenGeneralSettings s = new MavenGeneralSettings(); s.addListener(new MavenGeneralSettings.Listener() { + @Override public void pathsChanged() { log[0] += "changed "; } @@ -42,12 +43,15 @@ public class MavenSettingsTest extends MavenTestCase { MavenImportingSettings s = new MavenImportingSettings(); s.addListener(new MavenImportingSettings.Listener() { + @Override public void autoImportChanged() { } + @Override public void createModuleGroupsChanged() { } + @Override public void createModuleForAggregatorsChanged() { log[0] += "changed "; } diff --git a/plugins/spellchecker/testSrc/com/intellij/spellchecker/compress/DictionaryTest.java b/plugins/spellchecker/testSrc/com/intellij/spellchecker/compress/DictionaryTest.java index b60e36cd77ea..9ed90e0579c3 100644 --- a/plugins/spellchecker/testSrc/com/intellij/spellchecker/compress/DictionaryTest.java +++ b/plugins/spellchecker/testSrc/com/intellij/spellchecker/compress/DictionaryTest.java @@ -64,6 +64,7 @@ public class DictionaryTest extends TestCase { final Transformation transform = new Transformation(); PlatformTestUtil.assertTiming("Dictionary load time depends on words count. Approximate word count: " + wordCount + ".", times.get(name), new Runnable() { + @Override public void run() { dictionary = CompressedDictionary.create(new StreamLoader(DefaultBundledDictionariesProvider.class.getResourceAsStream(name), name), transform); } @@ -71,6 +72,7 @@ public class DictionaryTest extends TestCase { final Set wordsToStoreAndCheck = createWordSets(name, 50000, 1).getFirst(); PlatformTestUtil.assertTiming("Invoke 'contains' " + wordsToStoreAndCheck.size() + " times", 2000, new Runnable() { + @Override public void run() { for (String s : wordsToStoreAndCheck) { assertTrue(dictionary.contains(s)); @@ -82,12 +84,14 @@ public class DictionaryTest extends TestCase { private static Loader createLoader(final Set words) { return new Loader() { + @Override public void load(@NotNull Consumer consumer) { for (String word : words) { consumer.consume(word); } } + @Override public String getName() { return "test"; } @@ -103,6 +107,7 @@ public class DictionaryTest extends TestCase { loader.load(new Consumer() { private int counter = 0; + @Override public void consume(String s) { if (counter > maxCount) { return; diff --git a/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/CommentsWithMistakesInspectionTest.java b/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/CommentsWithMistakesInspectionTest.java index 540ebf221aa9..2bea16b5f83e 100644 --- a/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/CommentsWithMistakesInspectionTest.java +++ b/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/CommentsWithMistakesInspectionTest.java @@ -24,6 +24,7 @@ import com.intellij.spellchecker.inspections.SpellCheckerInspectionToolProvider; public class CommentsWithMistakesInspectionTest extends SpellcheckerInspectionTestCase { + @Override protected String getBasePath() { return getSpellcheckerTestDataPath() + "/inspection/commentsWithMistakes"; } diff --git a/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/GroovyFileWithTypos.java b/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/GroovyFileWithTypos.java index 05ba736f4008..ff106cfc3c83 100644 --- a/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/GroovyFileWithTypos.java +++ b/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/GroovyFileWithTypos.java @@ -23,6 +23,7 @@ import com.intellij.spellchecker.inspections.SpellCheckerInspectionToolProvider; */ public class GroovyFileWithTypos extends SpellcheckerInspectionTestCase { + @Override protected String getBasePath() { return getSpellcheckerTestDataPath() + "/inspection/groovy"; } diff --git a/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/JSFileWithTypos.java b/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/JSFileWithTypos.java index 47c9377893c7..1b8adb85027f 100644 --- a/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/JSFileWithTypos.java +++ b/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/JSFileWithTypos.java @@ -23,6 +23,7 @@ import com.intellij.spellchecker.inspections.SpellCheckerInspectionToolProvider; */ public class JSFileWithTypos extends SpellcheckerInspectionTestCase { + @Override protected String getBasePath() { return getSpellcheckerTestDataPath() + "/inspection/js"; } diff --git a/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/JavaSpellcheckingTest.java b/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/JavaSpellcheckingTest.java index 3d6ce4142f05..e22cc0b485b5 100644 --- a/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/JavaSpellcheckingTest.java +++ b/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/JavaSpellcheckingTest.java @@ -24,6 +24,7 @@ import com.intellij.spellchecker.inspections.SpellCheckerInspectionToolProvider; public class JavaSpellcheckingTest extends SpellcheckerInspectionTestCase { + @Override protected String getBasePath() { return getSpellcheckerTestDataPath() + "/inspection/java"; } diff --git a/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/PhpFileWithTypos.java b/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/PhpFileWithTypos.java index 6de802edc893..ef075d23f568 100644 --- a/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/PhpFileWithTypos.java +++ b/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/PhpFileWithTypos.java @@ -23,6 +23,7 @@ import com.intellij.spellchecker.inspections.SpellCheckerInspectionToolProvider; */ public class PhpFileWithTypos extends SpellcheckerInspectionTestCase { + @Override protected String getBasePath() { return getSpellcheckerTestDataPath() + "/inspection/php"; } diff --git a/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/PropertiesTest.java b/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/PropertiesTest.java index a3e1e1bc1bc5..2ef8130aefe2 100644 --- a/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/PropertiesTest.java +++ b/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/PropertiesTest.java @@ -21,6 +21,7 @@ import com.intellij.spellchecker.inspections.SpellCheckerInspectionToolProvider; * @author Konstantin Bulenkov */ public class PropertiesTest extends SpellcheckerInspectionTestCase { + @Override protected String getBasePath() { return getSpellcheckerTestDataPath() + "/inspection/propertiesWithMistakes"; } diff --git a/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/XmlWithMistakesInspectionTest.java b/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/XmlWithMistakesInspectionTest.java index 76d7125c5b46..3f676d77001f 100644 --- a/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/XmlWithMistakesInspectionTest.java +++ b/plugins/spellchecker/testSrc/com/intellij/spellchecker/inspection/XmlWithMistakesInspectionTest.java @@ -22,6 +22,7 @@ import com.intellij.spellchecker.inspections.SpellCheckerInspectionToolProvider; * User: Ekaterina Shliakhovetskaja */ public class XmlWithMistakesInspectionTest extends SpellcheckerInspectionTestCase { + @Override protected String getBasePath() { return getSpellcheckerTestDataPath() + "/inspection/xmlWithMistakes"; } diff --git a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnAddTest.java b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnAddTest.java index 7238fb14fd42..58838d5b1737 100644 --- a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnAddTest.java +++ b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnAddTest.java @@ -31,6 +31,7 @@ public class SvnAddTest extends SvnTestCase { public void testDirAndFileInCommand() throws Exception { enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD); new WriteCommandAction.Simple(myProject) { + @Override public void run() { try { VirtualFile dir = myWorkingCopyDir.createChildDirectory(this, "child"); diff --git a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnCachingRevisionsTest.java b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnCachingRevisionsTest.java index acc2c20aa94b..ef809649cca6 100644 --- a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnCachingRevisionsTest.java +++ b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnCachingRevisionsTest.java @@ -46,6 +46,7 @@ public class SvnCachingRevisionsTest extends CodeInsightFixtureTestCase { myRevisions = revisions; } + @Override public List loadInterval(final SVNRevision fromIncluding, final SVNRevision toIncluding, final int maxCount, final boolean includingYoungest, final boolean includeOldest) throws SVNException { long young = fromIncluding.getNumber(); @@ -91,6 +92,7 @@ public class SvnCachingRevisionsTest extends CodeInsightFixtureTestCase { super(iterator, origin); } + @Override public void doCacheUpdate(final List> fragments) { assert false; } diff --git a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnConcurrentChangeListManagerTest.java b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnConcurrentChangeListManagerTest.java index a1cf004c896f..0978b3f821e1 100644 --- a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnConcurrentChangeListManagerTest.java +++ b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnConcurrentChangeListManagerTest.java @@ -37,6 +37,7 @@ public class SvnConcurrentChangeListManagerTest extends SvnTestCase { final String newName = "renamed"; myScheme.doTest(new Runnable() { + @Override public void run() { changeListManager.editName(list.getName(), newName); checkFilesAreInList(new VirtualFile[] {file}, newName, changeListManager); @@ -63,6 +64,7 @@ public class SvnConcurrentChangeListManagerTest extends SvnTestCase { final String finalText = "final text"; myScheme.doTest(new Runnable() { + @Override public void run() { final String intermediate = "intermediate text"; changeListManager.editComment(list.getName(), intermediate); @@ -96,6 +98,7 @@ public class SvnConcurrentChangeListManagerTest extends SvnTestCase { changeListManager.moveChangesTo(list, new Change[] {changeListManager.getChange(file)}); myScheme.doTest(new Runnable() { + @Override public void run() { changeListManager.moveChangesTo(target, new Change[] {changeListManager.getChange(file)}); checkFilesAreInList(new VirtualFile[] {file}, target.getName(), changeListManager); @@ -120,6 +123,7 @@ public class SvnConcurrentChangeListManagerTest extends SvnTestCase { changeListManager.moveChangesTo(list, new Change[] {changeListManager.getChange(file)}); myScheme.doTest(new Runnable() { + @Override public void run() { changeListManager.setDefaultChangeList(target); assert changeListManager.getDefaultChangeList().getName().equals(target.getName()); @@ -144,6 +148,7 @@ public class SvnConcurrentChangeListManagerTest extends SvnTestCase { changeListManager.moveChangesTo(list, new Change[] {changeListManager.getChange(file)}); myScheme.doTest(new Runnable() { + @Override public void run() { changeListManager.removeChangeList(list.getName()); assert changeListManager.findChangeList(list.getName()) == null; @@ -172,6 +177,7 @@ public class SvnConcurrentChangeListManagerTest extends SvnTestCase { changeListManager.moveChangesTo(list, new Change[] {changeListManager.getChange(file)}); myScheme.doTest(new Runnable() { + @Override public void run() { changeListManager.moveChangesTo(target, new Change[] {changeListManager.getChange(file)}); checkFilesAreInList(new VirtualFile[] {file}, target.getName(), changeListManager); @@ -198,6 +204,7 @@ public class SvnConcurrentChangeListManagerTest extends SvnTestCase { changeListManager.moveChangesTo(list, new Change[] {changeListManager.getChange(file)}); myScheme.doTest(new Runnable() { + @Override public void run() { changeListManager.moveChangesTo(target, new Change[] {changeListManager.getChange(file)}); checkFilesAreInList(new VirtualFile[] {file}, target.getName(), changeListManager); @@ -225,6 +232,7 @@ public class SvnConcurrentChangeListManagerTest extends SvnTestCase { final String targetName = "target"; myScheme.doTest(new Runnable() { + @Override public void run() { final LocalChangeList target = changeListManager.addChangeList(targetName, null); changeListManager.moveChangesTo(target, new Change[] {changeListManager.getChange(file)}); @@ -273,6 +281,7 @@ public class SvnConcurrentChangeListManagerTest extends SvnTestCase { final String finalName = "final list name"; myScheme.doTest(new Runnable() { + @Override public void run() { final LocalChangeList target = changeListManager.addChangeList(targetName, null); changeListManager.moveChangesTo(target, new Change[] {changeListManager.getChange(file), changeListManager.getChange(fileB)}); diff --git a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnRenameTest.java b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnRenameTest.java index 5bbedcffee07..d6e3cc227fa2 100644 --- a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnRenameTest.java +++ b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnRenameTest.java @@ -309,6 +309,7 @@ public class SvnRenameTest extends SvnTestCase { private void moveToNewPackage(final VirtualFile file, final String packageName) throws Throwable { new WriteCommandAction.Simple(myProject) { + @Override public void run() { try { final VirtualFile dir = myWorkingCopyDir.createChildDirectory(this, packageName); diff --git a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnTestCase.java b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnTestCase.java index 9a1e08c64165..1a13eb3c09b0 100644 --- a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnTestCase.java +++ b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/SvnTestCase.java @@ -78,13 +78,17 @@ public abstract class SvnTestCase extends AbstractVcsTestCase { myGate = new MockChangeListManagerGate(ChangeListManager.getInstance(myProject)); myRefreshCopiesStub = new AtomicSectionsAware() { + @Override public void enter() { } + @Override public void exit() { } + @Override public boolean shouldExitAsap() { return false; } + @Override public void checkShouldExit() throws ProcessCanceledException { } }; diff --git a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/VcsWaitForUpdateForTest.java b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/VcsWaitForUpdateForTest.java index 961aa8850daa..5f522cb20126 100644 --- a/plugins/svn4idea/testSource/org/jetbrains/idea/svn/VcsWaitForUpdateForTest.java +++ b/plugins/svn4idea/testSource/org/jetbrains/idea/svn/VcsWaitForUpdateForTest.java @@ -16,6 +16,7 @@ public class VcsWaitForUpdateForTest extends SvnTestCase { final Ref done = new Ref(); final Thread thread = new Thread(new Runnable() { + @Override public void run() { new EnsureUpToDateFromNonAWTThread(myProject).execute(); done.set(Boolean.TRUE); diff --git a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/binding/FormEnumUsageTest.java b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/binding/FormEnumUsageTest.java index 34a684ff497c..7e6adb71817b 100644 --- a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/binding/FormEnumUsageTest.java +++ b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/binding/FormEnumUsageTest.java @@ -41,11 +41,13 @@ import com.intellij.util.IncorrectOperationException; public class FormEnumUsageTest extends PsiTestCase { private VirtualFile myTestProjectRoot; + @Override protected void setUp() throws Exception { super.setUp(); ApplicationManager.getApplication().runWriteAction( new Runnable() { + @Override public void run() { try{ String root = PluginPathManager.getPluginHomePath("ui-designer") + "/testData/binding/" + getTestName(true); @@ -68,6 +70,7 @@ public class FormEnumUsageTest extends PsiTestCase { public void testEnumUsage() throws IncorrectOperationException { LanguageLevelProjectExtension.getInstance(myJavaFacade.getProject()).setLanguageLevel(LanguageLevel.JDK_1_5); CommandProcessor.getInstance().executeCommand(myProject, new Runnable() { + @Override public void run() { try { createFile(myModule, myTestProjectRoot, "PropEnum.java", "public enum PropEnum { valueA, valueB }"); diff --git a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/binding/FormPropertyUsageTest.java b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/binding/FormPropertyUsageTest.java index 9fe4c30c492a..0b64bcfed5fd 100644 --- a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/binding/FormPropertyUsageTest.java +++ b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/binding/FormPropertyUsageTest.java @@ -40,11 +40,13 @@ import java.util.Collection; public class FormPropertyUsageTest extends PsiTestCase { private VirtualFile myTestProjectRoot; + @Override protected void setUp() throws Exception { super.setUp(); ApplicationManager.getApplication().runWriteAction( new Runnable() { + @Override public void run() { try{ String root = PluginPathManager.getPluginHomePath("ui-designer") + "/testData/binding/" + getTestName(true); diff --git a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/binding/RenameUIRelatedTest.java b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/binding/RenameUIRelatedTest.java index c6830069c4c2..b1f6f3e83d9a 100644 --- a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/binding/RenameUIRelatedTest.java +++ b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/binding/RenameUIRelatedTest.java @@ -31,6 +31,7 @@ import junit.framework.Assert; * @author ven */ public class RenameUIRelatedTest extends MultiFileTestCase { + @Override protected String getTestRoot() { return "/renameUIRelated/"; } @@ -45,6 +46,7 @@ public class RenameUIRelatedTest extends MultiFileTestCase { return JavaSdkImpl.getMockJdk17("java 1.5"); } + @Override protected void setupProject(VirtualFile rootDir) { LanguageLevelProjectExtension.getInstance(myJavaFacade.getProject()).setLanguageLevel(LanguageLevel.JDK_1_5); super.setupProject(rootDir); @@ -52,6 +54,7 @@ public class RenameUIRelatedTest extends MultiFileTestCase { public void testRenameBoundField() throws Exception { doTest(new PerformAction() { + @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) throws Exception { PsiClass aClass = myJavaFacade.findClass("UIClass", ProjectScope.getAllScope(myProject)); Assert.assertNotNull(aClass); @@ -65,6 +68,7 @@ public class RenameUIRelatedTest extends MultiFileTestCase { public void testRenamePackage() throws Exception { doTest(new PerformAction() { + @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) throws Exception { PsiPackage aPackage = JavaPsiFacade.getInstance(myPsiManager.getProject()).findPackage("gov"); Assert.assertNotNull(aPackage); @@ -77,6 +81,7 @@ public class RenameUIRelatedTest extends MultiFileTestCase { public void testRenamePackageNested() throws Exception { // IDEADEV-28864 doTest(new PerformAction() { + @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) throws Exception { PsiPackage aPackage = JavaPsiFacade.getInstance(myPsiManager.getProject()).findPackage("org.withoutForms"); Assert.assertNotNull(aPackage); @@ -88,6 +93,7 @@ public class RenameUIRelatedTest extends MultiFileTestCase { public void testRenamePackageWithComponentClass() throws Exception { // IDEADEV-5615 doTest(new PerformAction() { + @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) throws Exception { PsiPackage aPackage = JavaPsiFacade.getInstance(myPsiManager.getProject()).findPackage("org.withoutForms"); Assert.assertNotNull(aPackage); @@ -99,6 +105,7 @@ public class RenameUIRelatedTest extends MultiFileTestCase { public void testRenameEnumConstant() throws Exception { doTest(new PerformAction() { + @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) throws Exception { PsiClass aClass = myJavaFacade.findClass("PropEnum", ProjectScope.getAllScope(myProject)); Assert.assertNotNull(aClass); @@ -112,6 +119,7 @@ public class RenameUIRelatedTest extends MultiFileTestCase { public void testRenameResourceBundle() throws Exception { doTest(new PerformAction() { + @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) throws Exception { PsiFile file = myPsiManager.findFile(rootDir.findChild("F1.properties")); Assert.assertNotNull(file); @@ -124,6 +132,7 @@ public class RenameUIRelatedTest extends MultiFileTestCase { public void testRenameNestedForm() throws Exception { doTest(new PerformAction() { + @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) throws Exception { PsiFile file = myPsiManager.findFile(rootDir.findChild("p1").findChild("Form1.form")); Assert.assertNotNull(file); @@ -136,6 +145,7 @@ public class RenameUIRelatedTest extends MultiFileTestCase { public void testRenameImage() throws Exception { doTest(new PerformAction() { + @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) throws Exception { PsiFile file = myPsiManager.findFile(rootDir.findFileByRelativePath("org/withoutForms/child/abstractClass.png")); Assert.assertNotNull(file); diff --git a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/core/AsmCodeGeneratorTest.java b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/core/AsmCodeGeneratorTest.java index 3f158c997295..eb3ce4d3f83c 100644 --- a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/core/AsmCodeGeneratorTest.java +++ b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/core/AsmCodeGeneratorTest.java @@ -43,12 +43,14 @@ public class AsmCodeGeneratorTest extends TestCase { private MyNestedFormLoader myNestedFormLoader; private MyClassLoader myClassLoader; + @Override protected void setUp() throws Exception { super.setUp(); myNestedFormLoader = new MyNestedFormLoader(); myClassLoader = new MyClassLoader(getClass().getClassLoader()); } + @Override protected void tearDown() throws Exception { myClassLoader = null; myNestedFormLoader = null; @@ -78,6 +80,7 @@ public class AsmCodeGeneratorTest extends TestCase { classStream.close(); FileUtil.delete(new File(classPath)); final File[] inners = new File(tmpPath).listFiles(new FilenameFilter() { + @Override public boolean accept(File dir, String name) { return name.startsWith(className + "$") && name.endsWith(".class"); } @@ -339,10 +342,12 @@ public class AsmCodeGeneratorTest extends TestCase { return defineClass(name, data, 0, data.length); } + @Override public Class loadClass(String name) throws ClassNotFoundException { return super.loadClass(name); } + @Override public InputStream getResourceAsStream(String name) { if (name.equals("TestProperties.properties")) { return new ByteArrayInputStream(myTestProperties, 0, TEST_PROPERTY_CONTENT.length()); @@ -358,6 +363,7 @@ public class AsmCodeGeneratorTest extends TestCase { myFormMap.put(formName, fileName); } + @Override public LwRootContainer loadForm(String formFileName) throws Exception { final String fileName = myFormMap.get(formFileName); if (fileName != null) { @@ -366,6 +372,7 @@ public class AsmCodeGeneratorTest extends TestCase { throw new UnsupportedOperationException("No nested form found for name " + formFileName); } + @Override public String getClassToBindName(LwRootContainer container) { return container.getClassToBind(); } diff --git a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/make/FormSourceCodeGeneratorTest.java b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/make/FormSourceCodeGeneratorTest.java index 3b77645f6828..f317f62bcb1b 100644 --- a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/make/FormSourceCodeGeneratorTest.java +++ b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/make/FormSourceCodeGeneratorTest.java @@ -38,11 +38,13 @@ public class FormSourceCodeGeneratorTest extends PsiTestCase { private VirtualFile myTestProjectRoot; private FormSourceCodeGenerator myGenerator; + @Override protected void setUp() throws Exception { super.setUp(); ApplicationManager.getApplication().runWriteAction( new Runnable() { + @Override public void run() { try{ String root = PluginPathManager.getPluginHomePath("ui-designer") + "/testData/sourceCodeGenerator/" + getTestName(true); @@ -100,6 +102,7 @@ public class FormSourceCodeGeneratorTest extends PsiTestCase { final VirtualFile form = myTestProjectRoot.findChild("Test.form"); assertNotNull(form); CommandProcessor.getInstance().executeCommand(myProject, new Runnable() { + @Override public void run() { try { myGenerator.generate(form); diff --git a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/radComponents/GridInsertLocationTest.java b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/radComponents/GridInsertLocationTest.java index 1ea682f36e3c..2649de5b479f 100644 --- a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/radComponents/GridInsertLocationTest.java +++ b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/radComponents/GridInsertLocationTest.java @@ -32,6 +32,7 @@ public class GridInsertLocationTest extends TestCase { private RadContainer myContainer; private RadComponent myDropComponent; + @Override protected void setUp() throws Exception { super.setUp(); myManager = new RadGridLayoutManager(); diff --git a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/radComponents/RadFormLayoutManagerTest.java b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/radComponents/RadFormLayoutManagerTest.java index 68e1e99d468d..aba04ea94789 100644 --- a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/radComponents/RadFormLayoutManagerTest.java +++ b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/radComponents/RadFormLayoutManagerTest.java @@ -33,6 +33,7 @@ public class RadFormLayoutManagerTest extends TestCase { private RadContainer myContainer; private FormLayout myLayout; + @Override public void setUp() throws Exception { super.setUp(); myManager = new RadFormLayoutManager(); diff --git a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/radComponents/RadGridBagLayoutManagerTest.java b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/radComponents/RadGridBagLayoutManagerTest.java index 0db259a6bf0d..02fc524c81e4 100644 --- a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/radComponents/RadGridBagLayoutManagerTest.java +++ b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/radComponents/RadGridBagLayoutManagerTest.java @@ -31,6 +31,7 @@ public class RadGridBagLayoutManagerTest extends TestCase { private RadGridBagLayoutManager myManager; private RadContainer myContainer; + @Override protected void setUp() throws Exception { super.setUp(); myManager = new RadGridBagLayoutManager(); diff --git a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/refactoring/MoveFileTest.java b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/refactoring/MoveFileTest.java index c95da08c5b00..e2f900324d76 100644 --- a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/refactoring/MoveFileTest.java +++ b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/refactoring/MoveFileTest.java @@ -17,6 +17,7 @@ public class MoveFileTest extends MultiFileTestCase { return PluginPathManager.getPluginHomePath("ui-designer") + "/testData"; } + @Override protected String getTestRoot() { return "/move/"; } @@ -28,6 +29,7 @@ public class MoveFileTest extends MultiFileTestCase { //Both names are relative to root directory private void doTest(final String targetDirName, final String fileToMove) throws Exception { doTest(new PerformAction() { + @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) throws Exception { final VirtualFile child = rootDir.findFileByRelativePath(fileToMove); assertNotNull("File " + fileToMove + " not found", child); diff --git a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/XPathCompletionTest.java b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/XPathCompletionTest.java index 28a9e0fc8f37..4a4ebaad41bc 100644 --- a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/XPathCompletionTest.java +++ b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/XPathCompletionTest.java @@ -50,6 +50,7 @@ public class XPathCompletionTest extends TestBase { myFixture.testCompletionVariants(getTestFileName() + ".xpath", expectedVariants); } + @Override protected String getSubPath() { return "xpath/completion"; } diff --git a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/XPathHighlightingTest.java b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/XPathHighlightingTest.java index 51f3374bc078..01fe9c1a4676 100644 --- a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/XPathHighlightingTest.java +++ b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/XPathHighlightingTest.java @@ -61,6 +61,7 @@ public class XPathHighlightingTest extends TestBase { myFixture.testHighlighting(true, false, false, ArrayUtil.append(moreFiles, name + ".xpath")); } + @Override protected String getSubPath() { return "xpath/highlighting"; } diff --git a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltBasicTest.java b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltBasicTest.java index 21fe8a463250..e7a89d348d0b 100644 --- a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltBasicTest.java +++ b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltBasicTest.java @@ -107,6 +107,7 @@ public class XsltBasicTest extends TestBase { } } + @Override protected String getSubPath() { return "xslt"; } diff --git a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltCompletionTest.java b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltCompletionTest.java index dc7e9b487483..d92d58a4ec32 100644 --- a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltCompletionTest.java +++ b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltCompletionTest.java @@ -65,6 +65,7 @@ public class XsltCompletionTest extends TestBase { myFixture.testCompletion(name + ".xsl", name + "_after.xsl", moreFiles); } + @Override protected String getSubPath() { return "xslt/completion"; } diff --git a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltHighlightingTest.java b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltHighlightingTest.java index 36eb2fc1eea3..5d3a78456f90 100644 --- a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltHighlightingTest.java +++ b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltHighlightingTest.java @@ -103,6 +103,7 @@ public class XsltHighlightingTest extends TestBase { PsiDocumentManager.getInstance(project).commitAllDocuments(); return ApplicationManager.getApplication().runReadAction(new Computable() { + @Override public Long compute() { final long l = System.currentTimeMillis(); CodeInsightTestFixtureImpl.instantiateAndRun(myFixture.getFile(), myFixture.getEditor(), ArrayUtil.EMPTY_INT_ARRAY, false); @@ -116,6 +117,7 @@ public class XsltHighlightingTest extends TestBase { myFixture.testHighlighting(true, false, false, ArrayUtil.append(moreFiles, name + ".xsl")); } + @Override protected String getSubPath() { return "xslt/highlighting"; } diff --git a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltResolveTest.java b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltResolveTest.java index 86fcf1f72f7e..642d7f279dc9 100644 --- a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltResolveTest.java +++ b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltResolveTest.java @@ -116,6 +116,7 @@ public class XsltResolveTest extends TestBase { myFixture.configureByFile(getTestFileName() + ".xsl"); } + @Override protected String getSubPath() { return "xslt/resolve"; }