diff options
author | Tor Norbye <tnorbye@google.com> | 2013-08-15 14:06:37 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2013-08-15 14:06:37 -0700 |
commit | a3c36999a717e0d9923378ca5e0ae1160118c1e6 (patch) | |
tree | eda7fde5565d08649c0f5952e957a5ff4b2070d5 /java/java-analysis-impl/src/com/intellij | |
parent | d1129abbe4dc0ce9bbad9118a35a85dbebc8758f (diff) | |
download | idea-a3c36999a717e0d9923378ca5e0ae1160118c1e6.tar.gz |
Snapshot 13baaa319cd568c4e19b9232b24f2002f2631688 from master branch of git://git.jetbrains.org/idea/community.git
Change-Id: I2ede7fef748e781ed425346a4e03e721bf4d2610
Diffstat (limited to 'java/java-analysis-impl/src/com/intellij')
2 files changed, 65 insertions, 0 deletions
diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/nullable/NullableStuffInspectionBase.java b/java/java-analysis-impl/src/com/intellij/codeInspection/nullable/NullableStuffInspectionBase.java index 1f8ebc6fcd23..4465367d3c99 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/nullable/NullableStuffInspectionBase.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/nullable/NullableStuffInspectionBase.java @@ -417,6 +417,7 @@ public class NullableStuffInspectionBase extends BaseJavaBatchLocalInspectionToo } } + @NotNull private static LocalQuickFix[] wrapFix(LocalQuickFix fix) { if (fix == null) return LocalQuickFix.EMPTY_ARRAY; return new LocalQuickFix[]{fix}; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/unusedImport/UnusedImportLocalInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/unusedImport/UnusedImportLocalInspection.java new file mode 100644 index 000000000000..362eb75c0160 --- /dev/null +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/unusedImport/UnusedImportLocalInspection.java @@ -0,0 +1,64 @@ +/* + * Copyright 2000-2009 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 com.intellij.codeInspection.unusedImport; + +import com.intellij.codeInsight.daemon.GroupNames; +import com.intellij.codeInspection.BaseJavaBatchLocalInspectionTool; +import com.intellij.codeInspection.InspectionsBundle; +import com.intellij.codeInspection.ex.PairedUnfairLocalInspectionTool; +import com.siyeh.ig.imports.UnusedImportInspection; +import org.jetbrains.annotations.NonNls; +import org.jetbrains.annotations.NotNull; + +/** + * User: anna + * Date: 17-Feb-2006 + */ +public class UnusedImportLocalInspection extends BaseJavaBatchLocalInspectionTool implements PairedUnfairLocalInspectionTool { + @NonNls public static final String SHORT_NAME = "UNUSED_IMPORT"; + public static final String DISPLAY_NAME = InspectionsBundle.message("unused.import"); + + @Override + @NotNull + public String getGroupDisplayName() { + return GroupNames.IMPORTS_GROUP_NAME; + } + + @Override + @NotNull + public String getDisplayName() { + return DISPLAY_NAME; + } + + @Override + @NotNull + @NonNls + public String getShortName() { + return SHORT_NAME; + } + + @Override + public boolean isEnabledByDefault() { + return true; + } + + @NotNull + @Override + public String getInspectionForBatchShortName() { + return new UnusedImportInspection().getShortName(); + } +} |