public class UnusedDeclarationInspectionBase extends GlobalInspectionTool
| Modifier and Type | Field and Description |
|---|---|
boolean |
ADD_APPLET_TO_ENTRIES |
boolean |
ADD_MAINS_TO_ENTRIES |
boolean |
ADD_NONJAVA_TO_ENTRIES |
boolean |
ADD_SERVLET_TO_ENTRIES |
static java.lang.String |
ALTERNATIVE_ID |
static java.lang.String |
SHORT_NAME |
myNameProvider| Constructor and Description |
|---|
UnusedDeclarationInspectionBase() |
UnusedDeclarationInspectionBase(boolean enabledInEditor) |
| Modifier and Type | Method and Description |
|---|---|
protected UnusedSymbolLocalInspectionBase |
createUnusedSymbolLocalInspection() |
static UnusedDeclarationInspectionBase |
findUnusedDeclarationInspection(PsiElement element) |
JobDescriptor [] |
getAdditionalJobs(GlobalInspectionContext context) |
static java.lang.String |
getDisplayNameText() |
java.util.List<EntryPoint> |
getExtensions() |
java.lang.String |
getGroupDisplayName() |
UnusedSymbolLocalInspectionBase |
getSharedLocalInspectionTool()
Returns the local inspection tool used for highlighting in the editor.
|
java.lang.String |
getShortName()
DO NOT OVERRIDE this method.
|
static boolean |
isDeclaredAsEntryPoint(PsiElement method) |
boolean |
isEntryPoint(PsiElement element) |
boolean |
isEntryPoint(RefElement owner) |
boolean |
isGlobalEnabledInEditor() |
boolean |
isReadActionNeeded()
True by default to ensure third party plugins are not broken
|
boolean |
isTestEntryPoints() |
boolean |
queryExternalUsagesRequests(InspectionManager manager,
GlobalInspectionContext globalContext,
ProblemDescriptionsProcessor problemDescriptionsProcessor)
Allows the inspection to process usages of analyzed classes outside the analysis scope.
|
void |
readSettings(Element node)
Read in settings from XML config.
|
void |
runInspection(AnalysisScope scope,
InspectionManager manager,
GlobalInspectionContext globalContext,
ProblemDescriptionsProcessor problemDescriptionsProcessor)
Runs the global inspection.
|
void |
setTestEntryPoints(boolean testEntryPoints) |
void |
writeSettings(Element node)
Store current settings in XML config.
|
protected void |
writeUnusedDeclarationSettings(Element node) |
checkElement, checkElement, compose, getAdditionalJobs, getAnnotator, getHint, getQuickFix, getSuppressId, isEnabledByDefault, isGraphNeeded, worksInBatchModeOnlycleanup, createOptionsPanel, getAlternativeID, getBatchSuppressActions, getBlackList, getDefaultLevel, getDescriptionContextClass, getDescriptionFileName, getDisplayName, getGeneralGroupName, getGroupKey, getGroupPath, getMainToolId, getSerializationFilter, getShortName, getStaticDescription, getSuppressors, initialize, isInitialized, isSuppressedFor, loadDescription, showDefaultConfigurationOptionspublic boolean ADD_MAINS_TO_ENTRIES
public boolean ADD_APPLET_TO_ENTRIES
public boolean ADD_SERVLET_TO_ENTRIES
public boolean ADD_NONJAVA_TO_ENTRIES
public static final java.lang.String SHORT_NAME
public static final java.lang.String ALTERNATIVE_ID
public UnusedDeclarationInspectionBase()
public UnusedDeclarationInspectionBase(boolean enabledInEditor)
protected UnusedSymbolLocalInspectionBase createUnusedSymbolLocalInspection()
public UnusedSymbolLocalInspectionBase getSharedLocalInspectionTool()
GlobalInspectionToolgetSharedLocalInspectionTool in class GlobalInspectionToolpublic boolean isTestEntryPoints()
public void setTestEntryPoints(boolean testEntryPoints)
public java.lang.String getGroupDisplayName()
getGroupDisplayName in class InspectionProfileEntryInspectionEP.groupDisplayName,
InspectionEP.groupKey,
InspectionEP.groupBundlepublic java.lang.String getShortName()
InspectionProfileEntrygetShortName in class InspectionProfileEntryInspectionEP.shortNamepublic void readSettings(Element node)
throws InvalidDataException
InspectionProfileEntryint TOOL_OPTION)
and bean-style getters/setters (like int getToolOption(), void setToolOption(int)) to store your options.readSettings in class InspectionProfileEntrynode - to read settings from.InvalidDataException - if the loaded data was not valid.public void writeSettings(Element node)
throws WriteExternalException
InspectionProfileEntryint TOOL_OPTION)
and bean-style getters/setters (like int getToolOption(), void setToolOption(int)) to store your options.writeSettings in class InspectionProfileEntrynode - to store settings to.WriteExternalExceptionprotected void writeUnusedDeclarationSettings(Element node)
throws WriteExternalException
WriteExternalExceptionpublic boolean isReadActionNeeded()
GlobalInspectionToolisReadActionNeeded in class GlobalInspectionToolGlobalInspectionTool.runInspection(AnalysisScope, InspectionManager, GlobalInspectionContext, ProblemDescriptionsProcessor)) in ReadAction,
false if ReadAction is taken by inspection itselfpublic void runInspection(AnalysisScope scope, InspectionManager manager, GlobalInspectionContext globalContext, ProblemDescriptionsProcessor problemDescriptionsProcessor)
GlobalInspectionToolGlobalInspectionTool.checkElement(RefEntity, AnalysisScope, InspectionManager, GlobalInspectionContext).runInspection in class GlobalInspectionToolscope - the scope on which the inspection was run.manager - the inspection manager instance for the project on which the inspection was run.globalContext - the context for the current global inspection run.problemDescriptionsProcessor - the collector for problems reported by the inspectionpublic boolean isEntryPoint(RefElement owner)
public boolean isEntryPoint(PsiElement element)
public boolean isGlobalEnabledInEditor()
public static UnusedDeclarationInspectionBase findUnusedDeclarationInspection(PsiElement element)
public static boolean isDeclaredAsEntryPoint(PsiElement method)
public boolean queryExternalUsagesRequests(InspectionManager manager, GlobalInspectionContext globalContext, ProblemDescriptionsProcessor problemDescriptionsProcessor)
GlobalInspectionToolGlobalInspectionTool.runInspection(AnalysisScope, InspectionManager, GlobalInspectionContext, ProblemDescriptionsProcessor)
method has collected the list of problems for the current scope.
In order to save time when multiple inspections need to process
usages of the same classes and methods, usage searches are not performed directly, but
instead are queued for batch processing through
GlobalJavaInspectionContext.enqueueClassUsagesProcessor(com.intellij.codeInspection.reference.RefClass, com.intellij.codeInspection.GlobalJavaInspectionContext.UsagesProcessor) and similar methods. The method
can add new problems to problemDescriptionsProcessor or remove some of the problems
collected by GlobalInspectionTool.runInspection(AnalysisScope, InspectionManager, GlobalInspectionContext, ProblemDescriptionsProcessor)
by calling ProblemDescriptionsProcessor.ignoreElement(RefEntity).queryExternalUsagesRequests in class GlobalInspectionToolmanager - the inspection manager instance for the project on which the inspection was run.globalContext - the context for the current global inspection run.problemDescriptionsProcessor - the collector for problems reported by the inspection.public JobDescriptor [] getAdditionalJobs(GlobalInspectionContext context)
getAdditionalJobs in class GlobalInspectionToolGlobalInspectionTool.runInspection(AnalysisScope, InspectionManager, GlobalInspectionContext, ProblemDescriptionsProcessor))
ProgressIndicator should progress with GlobalInspectionContext.incrementJobDoneAmount(JobDescriptor, String)public java.util.List<EntryPoint> getExtensions()
public static java.lang.String getDisplayNameText()