public class UnusedDeclarationInspection extends UnusedDeclarationInspectionBase
ADD_APPLET_TO_ENTRIES, ADD_MAINS_TO_ENTRIES, ADD_NONJAVA_TO_ENTRIES, ADD_SERVLET_TO_ENTRIES, ALTERNATIVE_ID, SHORT_NAME
myNameProvider
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, writeUnusedDeclarationSettings
checkElement, checkElement, compose, getAdditionalJobs, getSuppressId, isEnabledByDefault, isGraphNeeded, worksInBatchModeOnly
cleanup, getBatchSuppressActions, getBlackList, getDefaultLevel, getDescriptionContextClass, getDescriptionFileName, getDisplayName, getGeneralGroupName, getGroupKey, getGroupPath, getMainToolId, getSerializationFilter, getShortName, getStaticDescription, getSuppressors, initialize, isInitialized, isSuppressedFor, loadDescription, showDefaultConfigurationOptions
public UnusedDeclarationInspection()
public UnusedDeclarationInspection(boolean enabledInEditor)
public java.lang.String getAlternativeID()
InspectionProfileEntry
getAlternativeID
in class InspectionProfileEntry
public void runInspection(AnalysisScope scope, InspectionManager manager, GlobalInspectionContext globalContext, ProblemDescriptionsProcessor problemDescriptionsProcessor)
GlobalInspectionTool
GlobalInspectionTool.checkElement(RefEntity, AnalysisScope, InspectionManager, GlobalInspectionContext)
.runInspection
in class UnusedDeclarationInspectionBase
scope
- 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)
GlobalInspectionTool
UserDataHolder.putUserData(com.intellij.openapi.util.Key, Object)
.getAnnotator
in class GlobalInspectionTool
refManager
- the reference graph manager instanceGlobalInspectionTool.isGraphNeeded()
public boolean queryExternalUsagesRequests(InspectionManager manager, GlobalInspectionContext globalContext, ProblemDescriptionsProcessor problemDescriptionsProcessor)
GlobalInspectionTool
GlobalInspectionTool.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 UnusedDeclarationInspectionBase
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 inspection.public java.lang.String getHint(QuickFix fix)
GlobalInspectionTool
getHint
in class GlobalInspectionTool
fix
- fix to be serializedpublic QuickFix getQuickFix(java.lang.String hint)
GlobalInspectionTool
getQuickFix
in class GlobalInspectionTool
hint
- a hint to distinguish different quick fixes for one problemprotected UnusedSymbolLocalInspectionBase createUnusedSymbolLocalInspection()
createUnusedSymbolLocalInspection
in class UnusedDeclarationInspectionBase
public javax.swing.JComponent createOptionsPanel()
InspectionProfileEntry
createOptionsPanel
in class InspectionProfileEntry
null
if no UI options required.