diff --git a/java/java-impl/src/com/intellij/openapi/projectRoots/impl/JavaSdkImpl.java b/java/java-impl/src/com/intellij/openapi/projectRoots/impl/JavaSdkImpl.java index 2c1d56c63d0b..54bc8c7a885f 100644 --- a/java/java-impl/src/com/intellij/openapi/projectRoots/impl/JavaSdkImpl.java +++ b/java/java-impl/src/com/intellij/openapi/projectRoots/impl/JavaSdkImpl.java @@ -68,7 +68,7 @@ public class JavaSdkImpl extends JavaSdk { super("JavaSDK"); fileManager.addVirtualFileListener(new VirtualFileAdapter() { - + @Override public void fileDeleted(@NotNull VirtualFileEvent event) { updateCache(event); } @@ -500,6 +500,7 @@ public class JavaSdkImpl extends JavaSdk { return sdkVersion != null && sdkVersion.isAtLeast(version); } + @NotNull @Override public Sdk createJdk(@NotNull String jdkName, @NotNull String home, boolean isJre) { ProjectJdkImpl jdk = new ProjectJdkImpl(jdkName, this); diff --git a/java/openapi/src/com/intellij/openapi/projectRoots/JavaSdk.java b/java/openapi/src/com/intellij/openapi/projectRoots/JavaSdk.java index 8221324356f5..5bc30f2c229d 100644 --- a/java/openapi/src/com/intellij/openapi/projectRoots/JavaSdk.java +++ b/java/openapi/src/com/intellij/openapi/projectRoots/JavaSdk.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,7 @@ public abstract class JavaSdk extends SdkType implements JavaSdkType { return ApplicationManager.getApplication().getComponent(JavaSdk.class); } + @NotNull public final Sdk createJdk(@NotNull String jdkName, @NotNull String jreHome) { return createJdk(jdkName, jreHome, true); } @@ -41,6 +42,7 @@ public abstract class JavaSdk extends SdkType implements JavaSdkType { */ public abstract int compareTo(@NotNull String versionString, @NotNull String versionNumber); + @NotNull public abstract Sdk createJdk(@NonNls String jdkName, @NotNull String home, boolean isJre); @Nullable @@ -51,16 +53,16 @@ public abstract class JavaSdk extends SdkType implements JavaSdkType { public abstract boolean isOfVersionOrHigher(@NotNull Sdk sdk, @NotNull JavaSdkVersion version); - public static boolean checkForJdk(File file) { + public static boolean checkForJdk(@NotNull File file) { return JdkUtil.checkForJdk(file); } - public static boolean checkForJre(String file) { + public static boolean checkForJre(@NotNull String file) { return JdkUtil.checkForJre(file); } @Nullable - public static String getJdkVersion(final String sdkHome) { + public static String getJdkVersion(@NotNull String sdkHome) { return SdkVersionUtil.detectJdkVersion(sdkHome); } } diff --git a/java/testFramework/src/com/intellij/testFramework/LightCodeInsightTestCase.java b/java/testFramework/src/com/intellij/testFramework/LightCodeInsightTestCase.java index 79cb377415bc..54be2cbd3821 100644 --- a/java/testFramework/src/com/intellij/testFramework/LightCodeInsightTestCase.java +++ b/java/testFramework/src/com/intellij/testFramework/LightCodeInsightTestCase.java @@ -21,6 +21,7 @@ import com.intellij.openapi.projectRoots.Sdk; import com.intellij.openapi.roots.LanguageLevelProjectExtension; import com.intellij.pom.java.LanguageLevel; import com.intellij.psi.impl.JavaPsiFacadeEx; +import org.jetbrains.annotations.NotNull; /** * A TestCase for single PsiFile being opened in Editor conversion. See configureXXX and checkResultXXX method docs. @@ -49,6 +50,7 @@ public abstract class LightCodeInsightTestCase extends LightPlatformCodeInsightT return IdeaTestUtil.getMockJdk17(); } + @NotNull @Override protected ModuleType getModuleType() { return StdModuleTypes.JAVA; diff --git a/java/testFramework/src/com/intellij/testFramework/LightIdeaTestCase.java b/java/testFramework/src/com/intellij/testFramework/LightIdeaTestCase.java index 41fb94afccbf..aa9e1d01ee2d 100644 --- a/java/testFramework/src/com/intellij/testFramework/LightIdeaTestCase.java +++ b/java/testFramework/src/com/intellij/testFramework/LightIdeaTestCase.java @@ -19,6 +19,7 @@ import com.intellij.openapi.module.ModuleType; import com.intellij.openapi.module.StdModuleTypes; import com.intellij.openapi.projectRoots.Sdk; import com.intellij.psi.impl.JavaPsiFacadeEx; +import org.jetbrains.annotations.NotNull; /** * A test case that provides IDEA application and project. Note both are reused for each test run in the session so @@ -39,6 +40,7 @@ public abstract class LightIdeaTestCase extends LightPlatformTestCase { return IdeaTestUtil.getMockJdk17(); } + @NotNull @Override protected ModuleType getModuleType() { return StdModuleTypes.JAVA; diff --git a/java/testFramework/src/com/intellij/testFramework/fixtures/DefaultLightProjectDescriptor.java b/java/testFramework/src/com/intellij/testFramework/fixtures/DefaultLightProjectDescriptor.java index 2a2d15cea754..a83e63439760 100644 --- a/java/testFramework/src/com/intellij/testFramework/fixtures/DefaultLightProjectDescriptor.java +++ b/java/testFramework/src/com/intellij/testFramework/fixtures/DefaultLightProjectDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,11 +25,13 @@ import com.intellij.openapi.roots.ModifiableRootModel; import com.intellij.pom.java.LanguageLevel; import com.intellij.testFramework.IdeaTestUtil; import com.intellij.testFramework.LightProjectDescriptor; +import org.jetbrains.annotations.NotNull; /** * @author peter */ public class DefaultLightProjectDescriptor implements LightProjectDescriptor { + @NotNull @Override public ModuleType getModuleType() { return StdModuleTypes.JAVA; @@ -41,7 +43,7 @@ public class DefaultLightProjectDescriptor implements LightProjectDescriptor { } @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { LanguageLevelModuleExtension extension = model.getModuleExtension(LanguageLevelModuleExtension.class); if (extension != null) { extension.setLanguageLevel(LanguageLevel.HIGHEST); diff --git a/java/testFramework/src/com/intellij/testFramework/fixtures/LightCodeInsightFixtureTestCase.java b/java/testFramework/src/com/intellij/testFramework/fixtures/LightCodeInsightFixtureTestCase.java index 6232d953a7d7..80f9e39d9fd8 100644 --- a/java/testFramework/src/com/intellij/testFramework/fixtures/LightCodeInsightFixtureTestCase.java +++ b/java/testFramework/src/com/intellij/testFramework/fixtures/LightCodeInsightFixtureTestCase.java @@ -39,25 +39,25 @@ import java.io.File; public abstract class LightCodeInsightFixtureTestCase extends UsefulTestCase{ public static final LightProjectDescriptor JAVA_1_4 = new DefaultLightProjectDescriptor() { @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { model.getModuleExtension(LanguageLevelModuleExtension.class).setLanguageLevel(LanguageLevel.JDK_1_4); } }; public static final LightProjectDescriptor JAVA_1_5 = new DefaultLightProjectDescriptor() { @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { model.getModuleExtension(LanguageLevelModuleExtension.class).setLanguageLevel(LanguageLevel.JDK_1_5); } }; public static final LightProjectDescriptor JAVA_1_6 = new DefaultLightProjectDescriptor() { @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { model.getModuleExtension(LanguageLevelModuleExtension.class).setLanguageLevel(LanguageLevel.JDK_1_6); } }; public static final LightProjectDescriptor JAVA_1_7 = new DefaultLightProjectDescriptor() { @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { model.getModuleExtension(LanguageLevelModuleExtension.class).setLanguageLevel(LanguageLevel.JDK_1_7); } }; @@ -68,7 +68,7 @@ public abstract class LightCodeInsightFixtureTestCase extends UsefulTestCase{ } @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { model.getModuleExtension(LanguageLevelModuleExtension.class).setLanguageLevel(LanguageLevel.JDK_1_8); } }; diff --git a/jps/model-api/src/org/jetbrains/jps/model/java/JdkVersionDetector.java b/jps/model-api/src/org/jetbrains/jps/model/java/JdkVersionDetector.java index b4d2875313c1..9c53e970cad2 100644 --- a/jps/model-api/src/org/jetbrains/jps/model/java/JdkVersionDetector.java +++ b/jps/model-api/src/org/jetbrains/jps/model/java/JdkVersionDetector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,21 +38,21 @@ public abstract class JdkVersionDetector { * @return version string of {@code null} if version cannot be determined */ @Nullable - public abstract String detectJdkVersion(String homePath); + public abstract String detectJdkVersion(@NotNull String homePath); @Nullable - public abstract String detectJdkVersion(String homePath, ActionRunner actionRunner); + public abstract String detectJdkVersion(@NotNull String homePath, @NotNull ActionRunner actionRunner); @Nullable - public abstract JdkVersionInfo detectJdkVersionInfo(String homePath); + public abstract JdkVersionInfo detectJdkVersionInfo(@NotNull String homePath); @Nullable - public abstract JdkVersionInfo detectJdkVersionInfo(String homePath, ActionRunner actionRunner); + public abstract JdkVersionInfo detectJdkVersionInfo(@NotNull String homePath, @NotNull ActionRunner actionRunner); @Deprecated @Nullable - public abstract String readVersionFromProcessOutput(String homePath, String[] command, String versionLineMarker, - ActionRunner actionRunner); + public abstract String readVersionFromProcessOutput(@NotNull String homePath, @NotNull String[] command, String versionLineMarker, + @NotNull ActionRunner actionRunner); //todo[nik] replace with a service with difference implementation for IDEA and for JPS process (need to exclude jps-builders module from IDEA classpath) public interface ActionRunner { diff --git a/jps/model-impl/src/org/jetbrains/jps/model/java/impl/JdkVersionDetectorImpl.java b/jps/model-impl/src/org/jetbrains/jps/model/java/impl/JdkVersionDetectorImpl.java index ef4ae25e6c5d..205bae0a1a8f 100644 --- a/jps/model-impl/src/org/jetbrains/jps/model/java/impl/JdkVersionDetectorImpl.java +++ b/jps/model-impl/src/org/jetbrains/jps/model/java/impl/JdkVersionDetectorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ package org.jetbrains.jps.model.java.impl; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.util.Bitness; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jps.model.java.JdkVersionDetector; import org.jetbrains.jps.service.SharedThreadPool; @@ -39,12 +40,12 @@ public class JdkVersionDetectorImpl extends JdkVersionDetector { @Override @Nullable - public String detectJdkVersion(String homePath) { + public String detectJdkVersion(@NotNull String homePath) { return detectJdkVersion(homePath, ACTION_RUNNER); } @Nullable - public String detectJdkVersion(String homePath, final ActionRunner actionRunner) { + public String detectJdkVersion(@NotNull String homePath, @NotNull final ActionRunner actionRunner) { JdkVersionInfo info = detectJdkVersionInfo(homePath, actionRunner); if (info != null) { return info.getVersion(); @@ -53,18 +54,18 @@ public class JdkVersionDetectorImpl extends JdkVersionDetector { } @Override - public JdkVersionInfo detectJdkVersionInfo(String homePath) { + public JdkVersionInfo detectJdkVersionInfo(@NotNull String homePath) { return detectJdkVersionInfo(homePath, ACTION_RUNNER); } @Override - public JdkVersionInfo detectJdkVersionInfo(String homePath, ActionRunner actionRunner) { + public JdkVersionInfo detectJdkVersionInfo(@NotNull String homePath, @NotNull ActionRunner actionRunner) { String[] command = {homePath + File.separator + "bin" + File.separator + "java", "-version"}; return readVersionInfoFromProcessOutput(homePath, command, null, actionRunner); } - public String readVersionFromProcessOutput(String homePath, String[] command, String versionLineMarker, - ActionRunner actionRunner) { + public String readVersionFromProcessOutput(@NotNull String homePath, @NotNull String[] command, String versionLineMarker, + @NotNull ActionRunner actionRunner) { JdkVersionInfo info = readVersionInfoFromProcessOutput(homePath, command, versionLineMarker, actionRunner); if (info != null) { return info.getVersion(); @@ -72,8 +73,8 @@ public class JdkVersionDetectorImpl extends JdkVersionDetector { return null; } - private static JdkVersionInfo readVersionInfoFromProcessOutput(String homePath, String[] command, String versionLineMarker, ActionRunner actionRunner) { - if (homePath == null || !new File(homePath).exists()) { + private static JdkVersionInfo readVersionInfoFromProcessOutput(@NotNull String homePath, @NotNull String[] command, String versionLineMarker, @NotNull ActionRunner actionRunner) { + if (!new File(homePath).exists()) { return null; } try { diff --git a/platform/lang-api/src/com/intellij/openapi/projectRoots/impl/SdkVersionUtil.java b/platform/lang-api/src/com/intellij/openapi/projectRoots/impl/SdkVersionUtil.java index 570d36600ebd..a95d02cdf22c 100644 --- a/platform/lang-api/src/com/intellij/openapi/projectRoots/impl/SdkVersionUtil.java +++ b/platform/lang-api/src/com/intellij/openapi/projectRoots/impl/SdkVersionUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ package com.intellij.openapi.projectRoots.impl; import com.intellij.openapi.application.ApplicationManager; import org.jetbrains.annotations.NonNls; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jps.model.java.JdkVersionDetector; @@ -42,17 +43,17 @@ public class SdkVersionUtil { @Deprecated @Nullable - public static String readVersionFromProcessOutput(String homePath, @NonNls String[] command, @NonNls String versionLineMarker) { + public static String readVersionFromProcessOutput(@NotNull String homePath, @NonNls @NotNull String[] command, @NonNls String versionLineMarker) { return JdkVersionDetector.getInstance().readVersionFromProcessOutput(homePath, command, versionLineMarker, ACTION_RUNNER); } @Nullable - public static String detectJdkVersion(String homePath) { + public static String detectJdkVersion(@NotNull String homePath) { return JdkVersionDetector.getInstance().detectJdkVersion(homePath, ACTION_RUNNER); } @Nullable - public static JdkVersionDetector.JdkVersionInfo getJdkVersionInfo(String homePath) { + public static JdkVersionDetector.JdkVersionInfo getJdkVersionInfo(@NotNull String homePath) { return JdkVersionDetector.getInstance().detectJdkVersionInfo(homePath, ACTION_RUNNER); } } diff --git a/platform/lang-impl/src/com/intellij/openapi/projectRoots/impl/SdkConfigurationUtil.java b/platform/lang-impl/src/com/intellij/openapi/projectRoots/impl/SdkConfigurationUtil.java index c3913251bee9..a83adffa083a 100644 --- a/platform/lang-impl/src/com/intellij/openapi/projectRoots/impl/SdkConfigurationUtil.java +++ b/platform/lang-impl/src/com/intellij/openapi/projectRoots/impl/SdkConfigurationUtil.java @@ -255,11 +255,13 @@ public class SdkConfigurationUtil { return null; } - public static String createUniqueSdkName(SdkType type, String home, final Collection sdks) { + @NotNull + public static String createUniqueSdkName(@NotNull SdkType type, String home, final Collection sdks) { return createUniqueSdkName(type.suggestSdkName(null, home), sdks); } - public static String createUniqueSdkName(final String suggestedName, final Collection sdks) { + @NotNull + public static String createUniqueSdkName(@NotNull String suggestedName, @NotNull Collection sdks) { final Set names = new HashSet(); for (Sdk jdk : sdks) { names.add(jdk.getName()); @@ -272,7 +274,7 @@ public class SdkConfigurationUtil { return newSdkName; } - public static void selectSdkHome(final SdkType sdkType, @NotNull final Consumer consumer) { + public static void selectSdkHome(@NotNull final SdkType sdkType, @NotNull final Consumer consumer) { final FileChooserDescriptor descriptor = sdkType.getHomeChooserDescriptor(); if (ApplicationManager.getApplication().isUnitTestMode()) { Sdk sdk = ProjectJdkTable.getInstance().findMostRecentSdkOfType(sdkType); @@ -298,12 +300,13 @@ public class SdkConfigurationUtil { } @Nullable - public static VirtualFile getSuggestedSdkRoot(SdkType sdkType) { + public static VirtualFile getSuggestedSdkRoot(@NotNull SdkType sdkType) { final String homePath = sdkType.suggestHomePath(); return homePath == null ? null : LocalFileSystem.getInstance().findFileByPath(homePath); } - public static List filterExistingPaths(SdkType sdkType, Collection sdkHomes, final Sdk[] sdks) { + @NotNull + public static List filterExistingPaths(@NotNull SdkType sdkType, Collection sdkHomes, final Sdk[] sdks) { List result = new ArrayList(); for (String sdkHome : sdkHomes) { if (findByPath(sdkType, sdks, sdkHome) == null) { @@ -314,7 +317,7 @@ public class SdkConfigurationUtil { } @Nullable - private static Sdk findByPath(SdkType sdkType, Sdk[] sdks, String sdkHome) { + private static Sdk findByPath(@NotNull SdkType sdkType, @NotNull Sdk[] sdks, @NotNull String sdkHome) { for (Sdk sdk : sdks) { final String path = sdk.getHomePath(); if (sdk.getSdkType() == sdkType && path != null && diff --git a/platform/testFramework/src/com/intellij/testFramework/LightProjectDescriptor.java b/platform/testFramework/src/com/intellij/testFramework/LightProjectDescriptor.java index c66b9f4e16c7..915fef8195a2 100644 --- a/platform/testFramework/src/com/intellij/testFramework/LightProjectDescriptor.java +++ b/platform/testFramework/src/com/intellij/testFramework/LightProjectDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,16 +21,19 @@ import com.intellij.openapi.module.ModuleType; import com.intellij.openapi.projectRoots.Sdk; import com.intellij.openapi.roots.ContentEntry; import com.intellij.openapi.roots.ModifiableRootModel; +import org.jetbrains.annotations.NotNull; /** * @author yole */ public interface LightProjectDescriptor { + @NotNull ModuleType getModuleType(); Sdk getSdk(); - void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry); + void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry); class Empty implements LightProjectDescriptor { + @NotNull @Override public ModuleType getModuleType() { return EmptyModuleType.getInstance(); @@ -42,7 +45,7 @@ public interface LightProjectDescriptor { } @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { } } diff --git a/plugins/devkit/testSources/inspections/PluginModuleTestCase.java b/plugins/devkit/testSources/inspections/PluginModuleTestCase.java index c8dd51c356e6..8afc4ba7cdf2 100644 --- a/plugins/devkit/testSources/inspections/PluginModuleTestCase.java +++ b/plugins/devkit/testSources/inspections/PluginModuleTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,7 @@ public abstract class PluginModuleTestCase extends LightCodeInsightFixtureTestCa @Override protected LightProjectDescriptor getProjectDescriptor() { return new DefaultLightProjectDescriptor() { + @NotNull @Override public ModuleType getModuleType() { return PluginModuleType.getInstance(); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyLightProjectDescriptor.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyLightProjectDescriptor.groovy index b4420fdce32e..4a80fe9dfc24 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyLightProjectDescriptor.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/GroovyLightProjectDescriptor.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ import com.intellij.openapi.roots.libraries.Library import com.intellij.openapi.vfs.JarFileSystem import com.intellij.openapi.vfs.VirtualFile import com.intellij.testFramework.fixtures.DefaultLightProjectDescriptor +import org.jetbrains.annotations.NotNull import static org.jetbrains.plugins.groovy.config.GroovyFacetUtil.getBundledGroovyJar import static org.jetbrains.plugins.groovy.util.TestUtils.* @@ -43,7 +44,7 @@ class GroovyLightProjectDescriptor extends DefaultLightProjectDescriptor { } @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { final Library.ModifiableModel modifiableModel = model.moduleLibraryTable.createLibrary("GROOVY").modifiableModel; final VirtualFile groovyJar = JarFileSystem.instance.refreshAndFindFileByPath("${myLibPath}!/"); assert groovyJar != null; diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/completion/GrCompletionWithLibraryTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/completion/GrCompletionWithLibraryTest.groovy index 0b3b722fb863..fd2ec690acec 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/completion/GrCompletionWithLibraryTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/completion/GrCompletionWithLibraryTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ import org.jetbrains.plugins.groovy.util.TestUtils class GrCompletionWithLibraryTest extends GroovyCompletionTestBase { final LightProjectDescriptor projectDescriptor = new DefaultLightProjectDescriptor() { @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { final Library.ModifiableModel modifiableModel = model.moduleLibraryTable.createLibrary("GROOVY").modifiableModel; final VirtualFile groovyJar = JarFileSystem.instance.refreshAndFindFileByPath(TestUtils.mockGroovy1_7LibraryName + "!/"); modifiableModel.addRoot(groovyJar, OrderRootType.CLASSES); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/dsl/GroovyDslTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/dsl/GroovyDslTest.groovy index ff76f36feda1..1f87d47f6bf9 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/dsl/GroovyDslTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/dsl/GroovyDslTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ import org.jetbrains.plugins.groovy.util.TestUtils public class GroovyDslTest extends LightCodeInsightFixtureTestCase { private static descriptor = new DefaultLightProjectDescriptor() { @Override - void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { PsiTestUtil.addLibrary(module, model, "GROOVY", TestUtils.getMockGroovyLibraryHome(), TestUtils.GROOVY_JAR); } } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/dsl/GroovyTransformationsTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/dsl/GroovyTransformationsTest.groovy index e92bdeae6fe0..0d3dea8986d2 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/dsl/GroovyTransformationsTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/dsl/GroovyTransformationsTest.groovy @@ -1,3 +1,18 @@ +/* + * Copyright 2000-2015 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.jetbrains.plugins.groovy.dsl import com.intellij.openapi.module.Module import com.intellij.openapi.roots.ContentEntry @@ -13,7 +28,7 @@ import org.jetbrains.plugins.groovy.util.TestUtils */ class GroovyTransformationsTest extends LightCodeInsightFixtureTestCase { static def descriptor = new DefaultLightProjectDescriptor() { - @Override def void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + @Override def void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { PsiTestUtil.addLibrary(module, model, "GROOVY", TestUtils.getMockGroovy1_7LibraryHome(), TestUtils.GROOVY_JAR_17); } } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/gant/GantReferenceCompletionTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/gant/GantReferenceCompletionTest.groovy index 15167f8d2b2b..81b98b9d7650 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/gant/GantReferenceCompletionTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/gant/GantReferenceCompletionTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2000-2010 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ import com.intellij.openapi.vfs.JarFileSystem import com.intellij.testFramework.LightProjectDescriptor import com.intellij.testFramework.fixtures.DefaultLightProjectDescriptor import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase +import org.jetbrains.annotations.NotNull import org.jetbrains.plugins.groovy.codeInspection.assignment.GroovyAssignabilityCheckInspection import org.jetbrains.plugins.groovy.codeInspection.untypedUnresolvedAccess.GroovyUntypedAccessInspection import org.jetbrains.plugins.groovy.util.TestUtils @@ -161,7 +162,7 @@ target (default : '') { } class GantProjectDescriptor extends DefaultLightProjectDescriptor { - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { final Library.ModifiableModel modifiableModel = model.getModuleLibraryTable().createLibrary("GROOVY").getModifiableModel(); def fs = JarFileSystem.instance diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/gant/StandaloneGantTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/gant/StandaloneGantTest.groovy index 344e2c70b382..3945a4c8f4a9 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/gant/StandaloneGantTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/gant/StandaloneGantTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,7 @@ import org.jetbrains.plugins.groovy.util.TestUtils public class StandaloneGantTest extends LightCodeInsightFixtureTestCase { public static final DefaultLightProjectDescriptor GROOVY_17_PROJECT_DESCRIPTOR = new DefaultLightProjectDescriptor() { @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { final Library.ModifiableModel modifiableModel = model.getModuleLibraryTable().createLibrary("GROOVY").getModifiableModel(); final VirtualFile groovyJar = JarFileSystem.getInstance().refreshAndFindFileByPath(TestUtils.getMockGroovy1_7LibraryName() + "!/"); modifiableModel.addRoot(groovyJar, OrderRootType.CLASSES); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/geb/AbstractGebLightTestCase.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/geb/AbstractGebLightTestCase.groovy index 6fb85ec7d106..c49e930a9d1a 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/geb/AbstractGebLightTestCase.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/geb/AbstractGebLightTestCase.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ abstract class AbstractGebLightTestCase extends LightCodeInsightFixtureTestCase } class GebProjectDescriptor extends DefaultLightProjectDescriptor { - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { final Library.ModifiableModel modifiableModel = model.getModuleLibraryTable().createLibrary("GROOVY").getModifiableModel(); def fs = JarFileSystem.instance diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/intentions/strings/ConvertConcatenationToGstringTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/intentions/strings/ConvertConcatenationToGstringTest.groovy index 22159fe029d0..6a7cd919a96f 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/intentions/strings/ConvertConcatenationToGstringTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/intentions/strings/ConvertConcatenationToGstringTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,7 +41,7 @@ public class ConvertConcatenationToGstringTest extends GrIntentionTestCase { @NotNull final LightProjectDescriptor projectDescriptor = new DefaultLightProjectDescriptor() { @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { final Library.ModifiableModel modifiableModel = model.moduleLibraryTable.createLibrary("GROOVY").modifiableModel; final VirtualFile groovyJar = JarFileSystem.instance.refreshAndFindFileByPath(TestUtils.mockGroovy1_7LibraryName + "!/"); modifiableModel.addRoot(groovyJar, OrderRootType.CLASSES); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/intentions/style/parameterToEntry/ParameterToMapEntryTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/intentions/style/parameterToEntry/ParameterToMapEntryTest.java index 71c3f5837843..582ad9ae2033 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/intentions/style/parameterToEntry/ParameterToMapEntryTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/intentions/style/parameterToEntry/ParameterToMapEntryTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2000-2015 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.jetbrains.plugins.groovy.intentions.style.parameterToEntry; import com.intellij.openapi.module.Module; @@ -34,7 +49,7 @@ public class ParameterToMapEntryTest extends GroovyFormatterTestCase { public static final DefaultLightProjectDescriptor GROOVY_17_PROJECT_DESCRIPTOR = new DefaultLightProjectDescriptor() { @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { final Library.ModifiableModel modifiableModel = model.getModuleLibraryTable().createLibrary("GROOVY").getModifiableModel(); final VirtualFile groovyJar = JarFileSystem.getInstance().refreshAndFindFileByPath(TestUtils.getMockGroovy1_7LibraryName()+"!/"); assert groovyJar != null; diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyMapAttributeTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyMapAttributeTest.groovy index 4c0485e99b23..64b523819838 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyMapAttributeTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyMapAttributeTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import com.intellij.openapi.vfs.VirtualFile import com.intellij.testFramework.LightProjectDescriptor import com.intellij.testFramework.fixtures.DefaultLightProjectDescriptor import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase +import org.jetbrains.annotations.NotNull import org.jetbrains.plugins.groovy.codeInspection.assignment.GroovyAssignabilityCheckInspection import org.jetbrains.plugins.groovy.codeInspection.assignment.GroovyUncheckedAssignmentOfMemberOfRawTypeInspection import org.jetbrains.plugins.groovy.util.TestUtils @@ -34,7 +35,7 @@ import org.jetbrains.plugins.groovy.util.TestUtils class GroovyMapAttributeTest extends LightCodeInsightFixtureTestCase { final LightProjectDescriptor projectDescriptor = new DefaultLightProjectDescriptor() { @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { final Library.ModifiableModel modifiableModel = model.moduleLibraryTable.createLibrary("GROOVY").modifiableModel; final VirtualFile groovyJar = JarFileSystem.instance.refreshAndFindFileByPath(TestUtils.mockGroovy1_7LibraryName + "!/"); modifiableModel.addRoot(groovyJar, OrderRootType.CLASSES); diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/GrLibrarySourceHighlightingTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/GrLibrarySourceHighlightingTest.groovy index 0582841df788..e0a7ef720ddf 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/GrLibrarySourceHighlightingTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/GrLibrarySourceHighlightingTest.groovy @@ -26,13 +26,14 @@ import com.intellij.psi.impl.compiled.ClsClassImpl import com.intellij.psi.search.GlobalSearchScope import com.intellij.testFramework.LightProjectDescriptor import com.intellij.testFramework.fixtures.DefaultLightProjectDescriptor +import org.jetbrains.annotations.NotNull import org.jetbrains.plugins.groovy.util.TestUtils class GrLibrarySourceHighlightingTest extends GrHighlightingTestBase { final LightProjectDescriptor projectDescriptor = new DefaultLightProjectDescriptor() { @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { final absoluteBasePath = "${TestUtils.absoluteTestDataPath}${basePath}" final lib = JarFileSystem.instance.refreshAndFindFileByPath("$absoluteBasePath/some-library.jar!/") final src = LocalFileSystem.instance.refreshAndFindFileByPath("$absoluteBasePath/src/") diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/Groovy16HighlightingTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/Groovy16HighlightingTest.groovy index ea17fba50482..3d7d8581fb6d 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/Groovy16HighlightingTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/Groovy16HighlightingTest.groovy @@ -1,17 +1,17 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.jetbrains.plugins.groovy.lang.highlighting import com.intellij.codeInspection.LocalInspectionTool @@ -36,7 +36,7 @@ public class Groovy16HighlightingTest extends LightCodeInsightFixtureTestCase { @NotNull final LightProjectDescriptor projectDescriptor = new DefaultLightProjectDescriptor() { @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { final Library.ModifiableModel modifiableModel = model.moduleLibraryTable.createLibrary("GROOVY").modifiableModel final VirtualFile groovyJar = JarFileSystem.instance.refreshAndFindFileByPath("$TestUtils.mockGroovy1_6LibraryName!/") modifiableModel.addRoot(groovyJar, OrderRootType.CLASSES) diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/resolve/NavigateDelegatedClsMethodsTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/resolve/NavigateDelegatedClsMethodsTest.groovy index d37f08fcfa3a..06cd20289d88 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/resolve/NavigateDelegatedClsMethodsTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/resolve/NavigateDelegatedClsMethodsTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ import com.intellij.openapi.vfs.JarFileSystem import com.intellij.openapi.vfs.VirtualFile import com.intellij.psi.PsiMethod import com.intellij.testFramework.LightProjectDescriptor +import org.jetbrains.annotations.NotNull import org.jetbrains.plugins.groovy.GroovyLightProjectDescriptor import org.jetbrains.plugins.groovy.LightGroovyTestCase import org.jetbrains.plugins.groovy.util.TestUtils @@ -37,7 +38,7 @@ public class NavigateDelegatedClsMethodsTest extends LightGroovyTestCase { final LightProjectDescriptor projectDescriptor = new GroovyLightProjectDescriptor(TestUtils.mockGroovy2_1LibraryName) { @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { super.configureModule(module, model, contentEntry) final Library.ModifiableModel gebModel = model.moduleLibraryTable.createLibrary("Geb").modifiableModel; diff --git a/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/AbstractJavaFXTestCase.java b/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/AbstractJavaFXTestCase.java index 4ef5709f8620..d74a73d12441 100644 --- a/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/AbstractJavaFXTestCase.java +++ b/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/AbstractJavaFXTestCase.java @@ -19,13 +19,11 @@ import com.intellij.openapi.application.PluginPathManager; import com.intellij.openapi.module.Module; import com.intellij.openapi.roots.ContentEntry; import com.intellij.openapi.roots.ModifiableRootModel; -import com.intellij.openapi.util.SystemInfo; import com.intellij.testFramework.LightProjectDescriptor; import com.intellij.testFramework.PsiTestUtil; import com.intellij.testFramework.fixtures.DefaultLightProjectDescriptor; import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase; import org.jetbrains.annotations.NotNull; -import org.junit.Assume; /** * User: anna @@ -34,7 +32,7 @@ import org.junit.Assume; public abstract class AbstractJavaFXTestCase extends LightCodeInsightFixtureTestCase { public static final DefaultLightProjectDescriptor JAVA_FX_DESCRIPTOR = new DefaultLightProjectDescriptor() { @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { PsiTestUtil.addLibrary(module, model, "javafx", PluginPathManager.getPluginHomePath("javaFX") + "/testData", "jfxrt.jar"); super.configureModule(module, model, contentEntry); } diff --git a/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXQuickfixTest.java b/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXQuickfixTest.java index 63ec6fe1d87e..8860a8b99f9a 100644 --- a/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXQuickfixTest.java +++ b/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXQuickfixTest.java @@ -20,7 +20,6 @@ import com.intellij.openapi.application.PluginPathManager; import com.intellij.openapi.module.Module; import com.intellij.openapi.roots.ContentEntry; import com.intellij.openapi.roots.ModifiableRootModel; -import com.intellij.openapi.util.SystemInfo; import com.intellij.psi.xml.XmlFile; import com.intellij.testFramework.LightProjectDescriptor; import com.intellij.testFramework.PsiTestUtil; @@ -29,14 +28,13 @@ import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase; import org.jetbrains.annotations.NotNull; import org.jetbrains.plugins.javaFX.fxml.codeInsight.inspections.JavaFxUnresolvedFxIdReferenceInspection; import org.jetbrains.plugins.javaFX.fxml.codeInsight.intentions.JavaFxInjectPageLanguageIntention; -import org.junit.Assume; import java.util.Set; public class JavaFXQuickfixTest extends LightCodeInsightFixtureTestCase { public static final DefaultLightProjectDescriptor JAVA_FX_WITH_GROOVY_DESCRIPTOR = new DefaultLightProjectDescriptor() { @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { PsiTestUtil.addLibrary(module, model, "javafx", PluginPathManager.getPluginHomePath("javaFX") + "/testData", "jfxrt.jar"); PsiTestUtil.addLibrary(module, model, "javafx", PluginPathManager.getPluginHomePath("javaFX") + "/testData", "groovy-1.8.0.jar"); super.configureModule(module, model, contentEntry); diff --git a/python/testSrc/com/jetbrains/python/fixtures/PyLightProjectDescriptor.java b/python/testSrc/com/jetbrains/python/fixtures/PyLightProjectDescriptor.java index 8569b2faf51e..ed60251e0932 100644 --- a/python/testSrc/com/jetbrains/python/fixtures/PyLightProjectDescriptor.java +++ b/python/testSrc/com/jetbrains/python/fixtures/PyLightProjectDescriptor.java @@ -28,6 +28,7 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.testFramework.LightProjectDescriptor; import com.jetbrains.python.PythonMockSdk; import com.jetbrains.python.PythonModuleTypeBase; +import org.jetbrains.annotations.NotNull; /** * Project descriptor (extracted from {@link com.jetbrains.python.fixtures.PyTestCase}) and should be used with it. @@ -40,6 +41,7 @@ public class PyLightProjectDescriptor implements LightProjectDescriptor { myPythonVersion = pythonVersion; } + @NotNull @Override public ModuleType getModuleType() { return PythonModuleTypeBase.getInstance(); @@ -51,7 +53,7 @@ public class PyLightProjectDescriptor implements LightProjectDescriptor { } @Override - public void configureModule(Module module, ModifiableRootModel model, ContentEntry contentEntry) { + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { } protected void createLibrary(ModifiableRootModel model, final String name, final String path) {