This commit is contained in:
Alexey Kudravtsev
2013-06-04 13:02:51 +04:00
parent da25576f6d
commit 422dbf408b
38 changed files with 143 additions and 143 deletions
@@ -83,10 +83,10 @@ public class RedundantSuppressInspection extends GlobalInspectionTool{
}
@Override
public void runInspection(final AnalysisScope scope,
final InspectionManager manager,
final GlobalInspectionContext globalContext,
final ProblemDescriptionsProcessor problemDescriptionsProcessor) {
public void runInspection(@NotNull final AnalysisScope scope,
@NotNull final InspectionManager manager,
@NotNull final GlobalInspectionContext globalContext,
@NotNull final ProblemDescriptionsProcessor problemDescriptionsProcessor) {
globalContext.getRefManager().iterate(new RefJavaVisitor() {
@Override public void visitClass(@NotNull RefClass refClass) {
if (!globalContext.shouldCheck(refClass, RedundantSuppressInspection.this)) return;
@@ -110,13 +110,13 @@ public class RedundantSuppressInspection extends GlobalInspectionTool{
}
@Nullable
private CommonProblemDescriptor[] checkElement(RefClass refEntity, InspectionManager manager, final Project project) {
private CommonProblemDescriptor[] checkElement(@NotNull RefClass refEntity, @NotNull InspectionManager manager, @NotNull Project project) {
final PsiClass psiClass = refEntity.getElement();
if (psiClass == null) return null;
return checkElement(psiClass, manager, project);
}
public CommonProblemDescriptor[] checkElement(@NotNull final PsiElement psiElement, InspectionManager manager, Project project) {
public CommonProblemDescriptor[] checkElement(@NotNull final PsiElement psiElement, @NotNull InspectionManager manager, @NotNull Project project) {
final Map<PsiElement, Collection<String>> suppressedScopes = new THashMap<PsiElement, Collection<String>>();
psiElement.accept(new JavaRecursiveElementWalkingVisitor() {
@Override public void visitModifierList(PsiModifierList list) {
@@ -132,11 +132,11 @@ public class CanBeFinalInspection extends GlobalJavaInspectionTool {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(final RefEntity refEntity,
final AnalysisScope scope,
final InspectionManager manager,
final GlobalInspectionContext globalContext,
final ProblemDescriptionsProcessor processor) {
public CommonProblemDescriptor[] checkElement(@NotNull final RefEntity refEntity,
@NotNull final AnalysisScope scope,
@NotNull final InspectionManager manager,
@NotNull final GlobalInspectionContext globalContext,
@NotNull final ProblemDescriptionsProcessor processor) {
if (refEntity instanceof RefJavaElement) {
final RefJavaElement refElement = (RefJavaElement)refEntity;
if (refElement instanceof RefParameter) return null;
@@ -63,11 +63,11 @@ public class EmptyMethodInspection extends GlobalJavaInspectionTool {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(RefEntity refEntity,
AnalysisScope scope,
InspectionManager manager,
GlobalInspectionContext globalContext,
ProblemDescriptionsProcessor processor) {
public CommonProblemDescriptor[] checkElement(@NotNull RefEntity refEntity,
@NotNull AnalysisScope scope,
@NotNull InspectionManager manager,
@NotNull GlobalInspectionContext globalContext,
@NotNull ProblemDescriptionsProcessor processor) {
if (!(refEntity instanceof RefMethod)) {
return null;
}
@@ -46,8 +46,8 @@ public class SameParameterValueInspection extends GlobalJavaInspectionTool {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(RefEntity refEntity, AnalysisScope scope, InspectionManager manager, GlobalInspectionContext globalContext,
ProblemDescriptionsProcessor processor) {
public CommonProblemDescriptor[] checkElement(@NotNull RefEntity refEntity, @NotNull AnalysisScope scope, @NotNull InspectionManager manager, @NotNull GlobalInspectionContext globalContext,
@NotNull ProblemDescriptionsProcessor processor) {
ArrayList<ProblemDescriptor> problems = null;
if (refEntity instanceof RefMethod) {
final RefMethod refMethod = (RefMethod)refEntity;
@@ -29,8 +29,8 @@ import org.jetbrains.annotations.Nullable;
public class SameReturnValueInspection extends GlobalJavaInspectionTool {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(RefEntity refEntity, AnalysisScope scope, InspectionManager manager, GlobalInspectionContext globalContext,
ProblemDescriptionsProcessor processor) {
public CommonProblemDescriptor[] checkElement(@NotNull RefEntity refEntity, @NotNull AnalysisScope scope, @NotNull InspectionManager manager, @NotNull GlobalInspectionContext globalContext,
@NotNull ProblemDescriptionsProcessor processor) {
if (refEntity instanceof RefMethod) {
final RefMethod refMethod = (RefMethod)refEntity;
@@ -33,7 +33,7 @@ public class UnnecessaryModuleDependencyInspection extends GlobalInspectionTool
}
@Override
public CommonProblemDescriptor[] checkElement(RefEntity refEntity, AnalysisScope scope, InspectionManager manager, final GlobalInspectionContext globalContext) {
public CommonProblemDescriptor[] checkElement(@NotNull RefEntity refEntity, @NotNull AnalysisScope scope, @NotNull InspectionManager manager, @NotNull final GlobalInspectionContext globalContext) {
if (refEntity instanceof RefModule){
final RefModule refModule = (RefModule)refEntity;
final Module module = refModule.getModule();
@@ -51,11 +51,11 @@ public class RedundantThrows extends GlobalJavaInspectionTool {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(RefEntity refEntity,
AnalysisScope scope,
InspectionManager manager,
GlobalInspectionContext globalContext,
ProblemDescriptionsProcessor processor) {
public CommonProblemDescriptor[] checkElement(@NotNull RefEntity refEntity,
@NotNull AnalysisScope scope,
@NotNull InspectionManager manager,
@NotNull GlobalInspectionContext globalContext,
@NotNull ProblemDescriptionsProcessor processor) {
if (refEntity instanceof RefMethod) {
final RefMethod refMethod = (RefMethod)refEntity;
if (refMethod.isSyntheticJSP()) return null;
@@ -58,11 +58,11 @@ public class UnusedParametersInspection extends GlobalJavaInspectionTool {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(final RefEntity refEntity,
final AnalysisScope scope,
final InspectionManager manager,
final GlobalInspectionContext globalContext,
final ProblemDescriptionsProcessor processor) {
public CommonProblemDescriptor[] checkElement(@NotNull final RefEntity refEntity,
@NotNull final AnalysisScope scope,
@NotNull final InspectionManager manager,
@NotNull final GlobalInspectionContext globalContext,
@NotNull final ProblemDescriptionsProcessor processor) {
if (refEntity instanceof RefMethod) {
final RefMethod refMethod = (RefMethod)refEntity;
@@ -103,15 +103,15 @@ public class UnusedParametersInspection extends GlobalJavaInspectionTool {
}
@Override
protected boolean queryExternalUsagesRequests(final RefManager manager, final GlobalJavaInspectionContext globalContext,
final ProblemDescriptionsProcessor processor) {
protected boolean queryExternalUsagesRequests(@NotNull final RefManager manager, @NotNull final GlobalJavaInspectionContext globalContext,
@NotNull final ProblemDescriptionsProcessor processor) {
final Project project = manager.getProject();
for (RefElement entryPoint : globalContext.getEntryPointsManager(manager).getEntryPoints()) {
processor.ignoreElement(entryPoint);
}
final PsiSearchHelper helper = PsiSearchHelper.SERVICE.getInstance(project);
final AnalysisScope scope = manager.getScope();
final AnalysisScope scope = ((RefManagerImpl)manager).getScope();
manager.iterate(new RefJavaVisitor() {
@Override
public void visitElement(@NotNull RefEntity refEntity) {
@@ -162,7 +162,7 @@ public class UnusedParametersInspection extends GlobalJavaInspectionTool {
@Override
@Nullable
public String getHint(final QuickFix fix) {
public String getHint(@NotNull final QuickFix fix) {
return ((AcceptSuggested)fix).getHint();
}
@@ -173,7 +173,7 @@ public class UnusedParametersInspection extends GlobalJavaInspectionTool {
}
@Override
public void compose(final StringBuffer buf, final RefEntity refEntity, final HTMLComposer composer) {
public void compose(@NotNull final StringBuffer buf, @NotNull final RefEntity refEntity, @NotNull final HTMLComposer composer) {
if (refEntity instanceof RefMethod) {
final RefMethod refMethod = (RefMethod)refEntity;
final HTMLJavaHTMLComposer javaComposer = composer.getExtension(HTMLJavaHTMLComposer.COMPOSER);
@@ -48,11 +48,11 @@ public class UnusedReturnValue extends GlobalJavaInspectionTool{
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(RefEntity refEntity,
AnalysisScope scope,
InspectionManager manager,
GlobalInspectionContext globalContext,
ProblemDescriptionsProcessor processor) {
public CommonProblemDescriptor[] checkElement(@NotNull RefEntity refEntity,
@NotNull AnalysisScope scope,
@NotNull InspectionManager manager,
@NotNull GlobalInspectionContext globalContext,
@NotNull ProblemDescriptionsProcessor processor) {
if (refEntity instanceof RefMethod) {
final RefMethod refMethod = (RefMethod)refEntity;
@@ -143,11 +143,11 @@ public class VisibilityInspection extends GlobalJavaInspectionTool {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(final RefEntity refEntity,
final AnalysisScope scope,
final InspectionManager manager,
final GlobalInspectionContext globalContext,
final ProblemDescriptionsProcessor processor) {
public CommonProblemDescriptor[] checkElement(@NotNull final RefEntity refEntity,
@NotNull final AnalysisScope scope,
@NotNull final InspectionManager manager,
@NotNull final GlobalInspectionContext globalContext,
@NotNull final ProblemDescriptionsProcessor processor) {
if (refEntity instanceof RefJavaElement) {
final RefJavaElement refElement = (RefJavaElement)refEntity;
@@ -38,10 +38,10 @@ public abstract class GlobalSimpleInspectionTool extends GlobalInspectionTool {
@NotNull ProblemDescriptionsProcessor problemDescriptionsProcessor);
@Override
public final void runInspection(AnalysisScope scope,
InspectionManager manager,
GlobalInspectionContext globalContext,
ProblemDescriptionsProcessor problemDescriptionsProcessor) {
public final void runInspection(@NotNull AnalysisScope scope,
@NotNull InspectionManager manager,
@NotNull GlobalInspectionContext globalContext,
@NotNull ProblemDescriptionsProcessor problemDescriptionsProcessor) {
throw new IncorrectOperationException("You must override checkFile() instead");
}
@@ -75,9 +75,9 @@ public class GlobalInspectionToolWrapper extends InspectionToolWrapper<GlobalIns
return getTool().isGraphNeeded();
}
public void processFile(final AnalysisScope analysisScope,
final InspectionManager manager,
final GlobalInspectionContext context,
public void processFile(@NotNull final AnalysisScope analysisScope,
@NotNull final InspectionManager manager,
@NotNull final GlobalInspectionContext context,
final boolean filterSuppressed) {
context.getRefManager().iterate(new RefVisitor() {
@Override public void visitElement(@NotNull RefEntity refEntity) {
@@ -152,7 +152,7 @@ public class ToolsImpl implements Tools {
myDefaultState.getTool().writeSettings(inspectionElement);
}
void readExternal(Element toolElement, InspectionProfileImpl profile) throws InvalidDataException {
void readExternal(@NotNull Element toolElement, @NotNull InspectionProfileImpl profile) throws InvalidDataException {
final String levelName = toolElement.getAttributeValue(LEVEL_ATTRIBUTE);
final ProfileManager profileManager = profile.getProfileManager();
final SeverityRegistrar registrar = ((SeverityProvider)profileManager).getOwnSeverityRegistrar();
@@ -199,7 +199,7 @@ public class IdeaPluginDescriptorImpl implements IdeaPluginDescriptor {
if (dependency.optional) {
optionalDependentPlugins.add(id);
if (dependency.configFile != null && !dependency.configFile.isEmpty()) {
myOptionalConfigs.put(id, dependency.configFile);
myOptionalConfigs.put(id, dependency.configFile);
}
}
}
@@ -208,14 +208,14 @@ public class IdeaPluginDescriptorImpl implements IdeaPluginDescriptor {
myDependencies = dependentPlugins.isEmpty() ? PluginId.EMPTY_ARRAY : dependentPlugins.toArray(new PluginId[dependentPlugins.size()]);
myOptionalDependencies = optionalDependentPlugins.isEmpty() ? PluginId.EMPTY_ARRAY : optionalDependentPlugins.toArray(new PluginId[optionalDependentPlugins.size()]);
List<HelpSetPath> hsPathes = new ArrayList<HelpSetPath>();
List<HelpSetPath> hsPaths = new ArrayList<HelpSetPath>();
if (pluginBean.helpSets != null) {
for (PluginHelpSet pluginHelpSet : pluginBean.helpSets) {
HelpSetPath hsPath = new HelpSetPath(pluginHelpSet.file, pluginHelpSet.path);
hsPathes.add(hsPath);
hsPaths.add(hsPath);
}
}
myHelpSets = !hsPathes.isEmpty() ? hsPathes.toArray(new HelpSetPath[hsPathes.size()]) : HelpSetPath.EMPTY;
myHelpSets = hsPaths.isEmpty() ? HelpSetPath.EMPTY : hsPaths.toArray(new HelpSetPath[hsPaths.size()]);
myAppComponents = pluginBean.applicationComponents;
myProjectComponents = pluginBean.projectComponents;
@@ -52,10 +52,10 @@ public class BooleanMethodIsAlwaysInvertedInspection extends GlobalJavaInspectio
}
@Override
public CommonProblemDescriptor[] checkElement(RefEntity refEntity,
AnalysisScope scope,
final InspectionManager manager,
final GlobalInspectionContext globalContext) {
public CommonProblemDescriptor[] checkElement(@NotNull RefEntity refEntity,
@NotNull AnalysisScope scope,
@NotNull final InspectionManager manager,
@NotNull final GlobalInspectionContext globalContext) {
if (refEntity instanceof RefMethod) {
RefMethod refMethod = (RefMethod)refEntity;
if (!refMethod.isReferenced()) return null;
@@ -42,9 +42,9 @@ public class FieldCanBeMovedToSubclassInspection extends BaseGlobalInspection {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity, AnalysisScope analysisScope,
InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext) {
@NotNull RefEntity refEntity, @NotNull AnalysisScope analysisScope,
@NotNull InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefField)) {
return null;
}
@@ -45,8 +45,8 @@ public class MethodReturnAlwaysConstantInspection extends BaseGlobalInspection {
@Override
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity, AnalysisScope scope, InspectionManager manager,
GlobalInspectionContext globalContext) {
@NotNull RefEntity refEntity, @NotNull AnalysisScope scope, @NotNull InspectionManager manager,
@NotNull GlobalInspectionContext globalContext) {
if (!(refEntity instanceof RefMethod)) {
return null;
}
@@ -43,9 +43,9 @@ public class StaticFieldCanBeMovedToUseInspection extends BaseGlobalInspection {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity, AnalysisScope analysisScope,
InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext) {
@NotNull RefEntity refEntity, @NotNull AnalysisScope analysisScope,
@NotNull InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefField)) {
return null;
}
@@ -47,10 +47,10 @@ public class ClassWithTooManyDependenciesInspection
@Override
public void runInspection(
AnalysisScope scope,
final InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext,
final ProblemDescriptionsProcessor problemDescriptionsProcessor) {
@NotNull AnalysisScope scope,
@NotNull final InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext,
@NotNull final ProblemDescriptionsProcessor problemDescriptionsProcessor) {
final RefManager refManager = globalInspectionContext.getRefManager();
refManager.iterate(new RefJavaVisitor() {
@@ -47,10 +47,10 @@ public class ClassWithTooManyDependentsInspection extends BaseGlobalInspection {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity,
AnalysisScope analysisScope,
InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext) {
@NotNull RefEntity refEntity,
@NotNull AnalysisScope analysisScope,
@NotNull InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefClass)) {
return null;
}
@@ -48,10 +48,10 @@ public class ClassWithTooManyTransitiveDependenciesInspection
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity,
AnalysisScope analysisScope,
InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext) {
@NotNull RefEntity refEntity,
@NotNull AnalysisScope analysisScope,
@NotNull InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefClass)) {
return null;
}
@@ -48,10 +48,10 @@ public class ClassWithTooManyTransitiveDependentsInspection
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity,
AnalysisScope analysisScope,
InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext) {
@NotNull RefEntity refEntity,
@NotNull AnalysisScope analysisScope,
@NotNull InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefClass)) {
return null;
}
@@ -42,10 +42,10 @@ public class CyclicClassDependencyInspection extends BaseGlobalInspection {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity,
AnalysisScope analysisScope,
InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext) {
@NotNull RefEntity refEntity,
@NotNull AnalysisScope analysisScope,
@NotNull InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefClass)) {
return null;
}
@@ -42,10 +42,10 @@ public class CyclicClassInitializationInspection extends BaseGlobalInspection {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity,
AnalysisScope analysisScope,
InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext) {
@NotNull RefEntity refEntity,
@NotNull AnalysisScope analysisScope,
@NotNull InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefClass)) {
return null;
}
@@ -41,10 +41,10 @@ public class CyclicPackageDependencyInspection extends BaseGlobalInspection {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity,
AnalysisScope analysisScope,
InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext) {
@NotNull RefEntity refEntity,
@NotNull AnalysisScope analysisScope,
@NotNull InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefPackage)) {
return null;
}
@@ -45,10 +45,10 @@ public class ClassIndependentOfModuleInspection extends BaseGlobalInspection {
@Nullable
@Override
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity,
AnalysisScope scope,
InspectionManager manager,
GlobalInspectionContext globalContext) {
@NotNull RefEntity refEntity,
@NotNull AnalysisScope scope,
@NotNull InspectionManager manager,
@NotNull GlobalInspectionContext globalContext) {
if (!(refEntity instanceof RefClass)) {
return null;
}
@@ -48,10 +48,10 @@ public class ClassOnlyUsedInOneModuleInspection extends BaseGlobalInspection {
@Nullable
@Override
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity,
AnalysisScope scope,
InspectionManager manager,
GlobalInspectionContext globalContext) {
@NotNull RefEntity refEntity,
@NotNull AnalysisScope scope,
@NotNull InspectionManager manager,
@NotNull GlobalInspectionContext globalContext) {
if (!(refEntity instanceof RefClass)) {
return null;
}
@@ -47,8 +47,8 @@ public class ModuleWithTooFewClassesInspection extends BaseGlobalInspection {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(RefEntity refEntity, AnalysisScope analysisScope, InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext) {
public CommonProblemDescriptor[] checkElement(@NotNull RefEntity refEntity, @NotNull AnalysisScope analysisScope, @NotNull InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefModule)) {
return null;
}
@@ -46,10 +46,10 @@ public class ModuleWithTooManyClassesInspection extends BaseGlobalInspection {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity,
AnalysisScope analysisScope,
InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext) {
@NotNull RefEntity refEntity,
@NotNull AnalysisScope analysisScope,
@NotNull InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefModule)) {
return null;
}
@@ -76,9 +76,9 @@ public class PackageNamingConventionInspection extends BaseGlobalInspection {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity, AnalysisScope analysisScope,
InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext) {
@NotNull RefEntity refEntity, @NotNull AnalysisScope analysisScope,
@NotNull InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefPackage)) {
return null;
}
@@ -43,10 +43,10 @@ public class ClassOnlyUsedInOnePackageInspection extends BaseGlobalInspection {
@Nullable
@Override
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity,
AnalysisScope scope,
InspectionManager manager,
GlobalInspectionContext globalContext) {
@NotNull RefEntity refEntity,
@NotNull AnalysisScope scope,
@NotNull InspectionManager manager,
@NotNull GlobalInspectionContext globalContext) {
if (!(refEntity instanceof RefClass)) {
return null;
}
@@ -45,10 +45,10 @@ public class ClassUnconnectedToPackageInspection extends BaseGlobalInspection {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity,
AnalysisScope analysisScope,
InspectionManager manager,
GlobalInspectionContext globalInspectionContext) {
@NotNull RefEntity refEntity,
@NotNull AnalysisScope analysisScope,
@NotNull InspectionManager manager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefClass)) {
return null;
}
@@ -47,9 +47,9 @@ public class DisjointPackageInspection extends BaseGlobalInspection {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity, AnalysisScope analysisScope,
InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext) {
@NotNull RefEntity refEntity, @NotNull AnalysisScope analysisScope,
@NotNull InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefPackage)) {
return null;
}
@@ -61,9 +61,9 @@ public class EmptyDirectoryInspection extends BaseGlobalInspection {
}
@Override
public void runInspection(final AnalysisScope scope, final InspectionManager manager,
final GlobalInspectionContext context,
final ProblemDescriptionsProcessor processor) {
public void runInspection(@NotNull final AnalysisScope scope, @NotNull final InspectionManager manager,
@NotNull final GlobalInspectionContext context,
@NotNull final ProblemDescriptionsProcessor processor) {
final Project project = context.getProject();
final ProjectFileIndex index = ProjectRootManager.getInstance(project).getFileIndex();
final SearchScope searchScope = scope.toSearchScope();
@@ -44,9 +44,9 @@ public class PackageInMultipleModulesInspection extends BaseGlobalInspection {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity, AnalysisScope analysisScope,
InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext) {
@NotNull RefEntity refEntity, @NotNull AnalysisScope analysisScope,
@NotNull InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefPackage)) {
return null;
}
@@ -46,10 +46,10 @@ public class PackageWithTooFewClassesInspection extends BaseGlobalInspection {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity,
AnalysisScope analysisScope,
InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext) {
@NotNull RefEntity refEntity,
@NotNull AnalysisScope analysisScope,
@NotNull InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefPackage)) {
return null;
}
@@ -46,10 +46,10 @@ public class PackageWithTooManyClassesInspection extends BaseGlobalInspection {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity,
AnalysisScope analysisScope,
InspectionManager inspectionManager,
GlobalInspectionContext globalInspectionContext) {
@NotNull RefEntity refEntity,
@NotNull AnalysisScope analysisScope,
@NotNull InspectionManager inspectionManager,
@NotNull GlobalInspectionContext globalInspectionContext) {
if (!(refEntity instanceof RefPackage)) {
return null;
}
@@ -50,9 +50,9 @@ public class ElementOnlyUsedFromTestCodeInspection
@Nullable
@Override
public CommonProblemDescriptor[] checkElement(
RefEntity refEntity, AnalysisScope scope, InspectionManager manager,
GlobalInspectionContext globalContext,
ProblemDescriptionsProcessor processor) {
@NotNull RefEntity refEntity, @NotNull AnalysisScope scope, @NotNull InspectionManager manager,
@NotNull GlobalInspectionContext globalContext,
@NotNull ProblemDescriptionsProcessor processor) {
if (!isOnlyUsedFromTestCode(refEntity)) {
return null;
}