public class UncheckedWarningLocalInspection extends AbstractBaseJavaLocalInspectionTool
Modifier and Type | Field and Description |
---|---|
boolean |
IGNORE_UNCHECKED_ASSIGNMENT |
boolean |
IGNORE_UNCHECKED_CALL |
boolean |
IGNORE_UNCHECKED_CAST |
boolean |
IGNORE_UNCHECKED_GENERICS_ARRAY_CREATION |
boolean |
IGNORE_UNCHECKED_OVERRIDING |
static java.lang.String |
SHORT_NAME |
EMPTY_ARRAY, VALID_ID_PATTERN
myNameProvider
Constructor and Description |
---|
UncheckedWarningLocalInspection() |
Modifier and Type | Method and Description |
---|---|
PsiElementVisitor |
buildVisitor(ProblemsHolder holder,
boolean isOnTheFly,
LocalInspectionToolSession session)
Override the method to provide your own inspection visitor, if you need to store additional state in the
LocalInspectionToolSession user data or get information about the inspection scope.
|
protected LocalQuickFix [] |
createFixes() |
javax.swing.JComponent |
createOptionsPanel()
This method is called each time UI is shown.
|
java.lang.String |
getGroupDisplayName() |
java.lang.String |
getID()
If you want to change suppression id you have to define it in XML as well.
|
java.lang.String |
getShortName()
DO NOT OVERRIDE this method.
|
boolean |
isEnabledByDefault()
DO NOT OVERRIDE this method.
|
void |
writeSettings(Element node)
Store current settings in XML config.
|
buildVisitor, checkClass, checkField, checkMethod
checkFile, getAlternativeID, getProblemElement, getSuppressId, inspectionFinished, inspectionFinished, inspectionStarted, isValidID, processFile, runForWholeFile
cleanup, getBatchSuppressActions, getBlackList, getDefaultLevel, getDescriptionContextClass, getDescriptionFileName, getDisplayName, getGeneralGroupName, getGroupKey, getGroupPath, getMainToolId, getSerializationFilter, getShortName, getStaticDescription, getSuppressors, initialize, isInitialized, isSuppressedFor, loadDescription, readSettings, showDefaultConfigurationOptions
public static final java.lang.String SHORT_NAME
public boolean IGNORE_UNCHECKED_ASSIGNMENT
public boolean IGNORE_UNCHECKED_GENERICS_ARRAY_CREATION
public boolean IGNORE_UNCHECKED_CALL
public boolean IGNORE_UNCHECKED_CAST
public boolean IGNORE_UNCHECKED_OVERRIDING
protected LocalQuickFix [] createFixes()
public javax.swing.JComponent createOptionsPanel()
InspectionProfileEntry
createOptionsPanel
in class InspectionProfileEntry
null
if no UI options required.public java.lang.String getGroupDisplayName()
getGroupDisplayName
in class InspectionProfileEntry
InspectionEP.groupDisplayName
,
InspectionEP.groupKey
,
InspectionEP.groupBundle
public java.lang.String getShortName()
InspectionProfileEntry
getShortName
in class InspectionProfileEntry
InspectionEP.shortName
public java.lang.String getID()
LocalInspectionTool
Inspection tool ID is a descriptive name to be used in "suppress" comments and annotations.
It must satisfy LocalInspectionTool.VALID_ID_PATTERN
regexp pattern.
If not defined InspectionProfileEntry.getShortName()
is used as tool ID.
getID
in class LocalInspectionTool
public boolean isEnabledByDefault()
InspectionProfileEntry
isEnabledByDefault
in class InspectionProfileEntry
InspectionEP.enabledByDefault
public void writeSettings(Element node) throws WriteExternalException
InspectionProfileEntry
int TOOL_OPTION
)
and bean-style getters/setters (like int getToolOption(), void setToolOption(int)
) to store your options.writeSettings
in class InspectionProfileEntry
node
- to store settings to.WriteExternalException
public PsiElementVisitor buildVisitor(ProblemsHolder holder, boolean isOnTheFly, LocalInspectionToolSession session)
LocalInspectionTool
PsiRecursiveElementVisitor
)
since it will be fed with every element in the file anyway.
Visitor created must be thread-safe since it might be called on several elements concurrently.buildVisitor
in class LocalInspectionTool
holder
- where visitor will register problems found.isOnTheFly
- true if inspection was run in non-batch modesession
- the session in the context of which the tool runs.PsiRecursiveVisitor