public abstract class GlobalInspectionTool extends InspectionProfileEntry
getSharedLocalInspectionTool()
The shared local inspection tools shares settings and documentation with the global inspection tool.LocalInspectionTool
myNameProvider
Constructor and Description |
---|
GlobalInspectionTool() |
Modifier and Type | Method and Description |
---|---|
CommonProblemDescriptor [] |
checkElement(RefEntity refEntity,
AnalysisScope scope,
InspectionManager manager,
GlobalInspectionContext globalContext)
Processes and reports problems for a single element of the completed reference graph.
|
CommonProblemDescriptor [] |
checkElement(RefEntity refEntity,
AnalysisScope scope,
InspectionManager manager,
GlobalInspectionContext globalContext,
ProblemDescriptionsProcessor processor)
Processes and reports problems for a single element of the completed reference graph.
|
void |
compose(java.lang.StringBuilder buf,
RefEntity refEntity,
HTMLComposer composer)
Allows additional description to refEntity problems
|
JobDescriptor [] |
getAdditionalJobs() |
JobDescriptor [] |
getAdditionalJobs(GlobalInspectionContext context) |
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
|
LocalInspectionTool |
getSharedLocalInspectionTool()
Returns the local inspection tool used for highlighting in the editor.
|
protected java.lang.String |
getSuppressId()
Tool ID passed to
InspectionSuppressor . |
boolean |
isEnabledByDefault()
DO NOT OVERRIDE this method.
|
boolean |
isGraphNeeded()
Checks if this inspection requires building of the reference graph.
|
boolean |
isReadActionNeeded()
True by default to ensure third party plugins are not broken
|
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.
|
boolean |
worksInBatchModeOnly()
In some cases we can do highlighting in annotator or high.
|
cleanup, createOptionsPanel, getAlternativeID, getBatchSuppressActions, getBlackList, getDefaultLevel, getDescriptionContextClass, getDescriptionFileName, getDisplayName, getGeneralGroupName, getGroupDisplayName, getGroupKey, getGroupPath, getMainToolId, getSerializationFilter, getShortName, getShortName, getStaticDescription, getSuppressors, initialize, isInitialized, isSuppressedFor, loadDescription, readSettings, showDefaultConfigurationOptions, writeSettings
protected final java.lang.String getSuppressId()
InspectionProfileEntry
InspectionSuppressor
.getSuppressId
in class InspectionProfileEntry
public RefGraphAnnotator getAnnotator(RefManager refManager)
UserDataHolder.putUserData(com.intellij.openapi.util.Key, Object)
.refManager
- the reference graph manager instanceisGraphNeeded()
public void runInspection(AnalysisScope scope, InspectionManager manager, GlobalInspectionContext globalContext, ProblemDescriptionsProcessor problemDescriptionsProcessor)
checkElement(RefEntity, AnalysisScope, InspectionManager, GlobalInspectionContext)
.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 CommonProblemDescriptor [] checkElement(RefEntity refEntity, AnalysisScope scope, InspectionManager manager, GlobalInspectionContext globalContext)
refEntity
- the reference graph element to check for problems.scope
- the scope on which analysis was invoked.manager
- the inspection manager instance for the project on which the inspection was run.globalContext
- the context for the current global inspection run.public CommonProblemDescriptor [] checkElement(RefEntity refEntity, AnalysisScope scope, InspectionManager manager, GlobalInspectionContext globalContext, ProblemDescriptionsProcessor processor)
refEntity
- the reference graph element to check for problems.scope
- the scope on which analysis was invoked.manager
- the inspection manager instance for the project on which the inspection was run.globalContext
- the context for the current global inspection run.processor
- the collector for problems reported by the inspectionpublic boolean isGraphNeeded()
public boolean isReadActionNeeded()
runInspection(AnalysisScope, InspectionManager, GlobalInspectionContext, ProblemDescriptionsProcessor)
) in ReadAction,
false if ReadAction is taken by inspection itselfpublic boolean isEnabledByDefault()
InspectionProfileEntry
isEnabledByDefault
in class InspectionProfileEntry
InspectionEP.enabledByDefault
public boolean queryExternalUsagesRequests(InspectionManager manager, GlobalInspectionContext globalContext, ProblemDescriptionsProcessor problemDescriptionsProcessor)
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 runInspection(AnalysisScope, InspectionManager, GlobalInspectionContext, ProblemDescriptionsProcessor)
by calling ProblemDescriptionsProcessor.ignoreElement(RefEntity)
.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 QuickFix getQuickFix(java.lang.String hint)
hint
- a hint to distinguish different quick fixes for one problempublic java.lang.String getHint(QuickFix fix)
fix
- fix to be serializedpublic void compose(java.lang.StringBuilder buf, RefEntity refEntity, HTMLComposer composer)
buf
- page content with problem descriptionrefEntity
- entity to describecomposer
- provides sample api to compose htmlpublic JobDescriptor [] getAdditionalJobs()
runInspection(AnalysisScope, InspectionManager, GlobalInspectionContext, ProblemDescriptionsProcessor)
)
ProgressIndicator should progress with GlobalInspectionContext.incrementJobDoneAmount(JobDescriptor, String)
public JobDescriptor [] getAdditionalJobs(GlobalInspectionContext context)
runInspection(AnalysisScope, InspectionManager, GlobalInspectionContext, ProblemDescriptionsProcessor)
)
ProgressIndicator should progress with GlobalInspectionContext.incrementJobDoneAmount(JobDescriptor, String)
public boolean worksInBatchModeOnly()
public LocalInspectionTool getSharedLocalInspectionTool()