public class UnusedDeclarationInspection extends UnusedDeclarationInspectionBase
ADD_APPLET_TO_ENTRIES, ADD_MAINS_TO_ENTRIES, ADD_NONJAVA_TO_ENTRIES, ADD_SERVLET_TO_ENTRIES, ALTERNATIVE_ID, SHORT_NAMEmyNameProvider| Constructor and Description |
|---|
UnusedDeclarationInspection() |
UnusedDeclarationInspection(boolean enabledInEditor) |
| Modifier and Type | Method and Description |
|---|---|
javax.swing.JComponent |
createOptionsPanel()
This method is called each time UI is shown.
|
protected UnusedSymbolLocalInspectionBase |
createUnusedSymbolLocalInspection() |
java.lang.String |
getAlternativeID()
For global tools read-only, for local tools would be used instead getID for modules with alternative classpath storage
|
RefGraphAnnotator |
getAnnotator(RefManager refManager)
Returns the annotator which will receive callbacks while the reference graph
is being built.
|
java.lang.String |
getHint(QuickFix fix)
Allows TeamCity plugin to serialize quick fixes on server in order to reconstruct them in idea
|
QuickFix |
getQuickFix(java.lang.String hint)
Allows TeamCity plugin to reconstruct quickfixes from server side data
|
boolean |
queryExternalUsagesRequests(InspectionManager manager,
GlobalInspectionContext globalContext,
ProblemDescriptionsProcessor problemDescriptionsProcessor)
Allows the inspection to process usages of analyzed classes outside the analysis scope.
|
void |
runInspection(AnalysisScope scope,
InspectionManager manager,
GlobalInspectionContext globalContext,
ProblemDescriptionsProcessor problemDescriptionsProcessor)
Runs the global inspection.
|
findUnusedDeclarationInspection, getAdditionalJobs, getDisplayNameText, getExtensions, getGroupDisplayName, getSharedLocalInspectionTool, getShortName, isDeclaredAsEntryPoint, isEntryPoint, isEntryPoint, isGlobalEnabledInEditor, isReadActionNeeded, isTestEntryPoints, readSettings, setTestEntryPoints, writeSettings, writeUnusedDeclarationSettingscheckElement, checkElement, compose, getAdditionalJobs, getSuppressId, isEnabledByDefault, isGraphNeeded, worksInBatchModeOnlycleanup, getBatchSuppressActions, getBlackList, getDefaultLevel, getDescriptionContextClass, getDescriptionFileName, getDisplayName, getGeneralGroupName, getGroupKey, getGroupPath, getMainToolId, getSerializationFilter, getShortName, getStaticDescription, getSuppressors, initialize, isInitialized, isSuppressedFor, loadDescription, showDefaultConfigurationOptionspublic UnusedDeclarationInspection()
public UnusedDeclarationInspection(boolean enabledInEditor)
public java.lang.String getAlternativeID()
InspectionProfileEntrygetAlternativeID in class InspectionProfileEntrypublic void runInspection(AnalysisScope scope, InspectionManager manager, GlobalInspectionContext globalContext, ProblemDescriptionsProcessor problemDescriptionsProcessor)
GlobalInspectionToolGlobalInspectionTool.checkElement(RefEntity, AnalysisScope, InspectionManager, GlobalInspectionContext).runInspection in class UnusedDeclarationInspectionBasescope - 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 RefGraphAnnotator getAnnotator(RefManager refManager)
GlobalInspectionToolUserDataHolder.putUserData(com.intellij.openapi.util.Key, Object).getAnnotator in class GlobalInspectionToolrefManager - the reference graph manager instanceGlobalInspectionTool.isGraphNeeded()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 UnusedDeclarationInspectionBasemanager - 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 java.lang.String getHint(QuickFix fix)
GlobalInspectionToolgetHint in class GlobalInspectionToolfix - fix to be serializedpublic QuickFix getQuickFix(java.lang.String hint)
GlobalInspectionToolgetQuickFix in class GlobalInspectionToolhint - a hint to distinguish different quick fixes for one problemprotected UnusedSymbolLocalInspectionBase createUnusedSymbolLocalInspection()
createUnusedSymbolLocalInspection in class UnusedDeclarationInspectionBasepublic javax.swing.JComponent createOptionsPanel()
InspectionProfileEntrycreateOptionsPanel in class InspectionProfileEntrynull if no UI options required.