|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.intellij.codeInspection.LocalInspectionTool
public abstract class LocalInspectionTool
Implement this abstract class in order to provide new inspection tool functionality. The major API limitation here is
subclasses should be stateless. Thus check<XXX> methods will be called in no particular order and
instances of this class provided by InspectionToolProvider.getInspectionClasses() will be created on demand.
The other important thing is problem anchors (PsiElements) reported by check<XXX> methods should
lie under corresponding first parameter of one method.
| Constructor Summary | |
|---|---|
LocalInspectionTool()
|
|
| Method Summary | |
|---|---|
ProblemDescriptor[] |
checkClass(PsiClass aClass,
InspectionManager manager,
boolean isOnTheFly)
Override this to report problems at class level. |
ProblemDescriptor[] |
checkField(PsiField field,
InspectionManager manager,
boolean isOnTheFly)
Override this to report problems at field level. |
ProblemDescriptor[] |
checkFile(PsiFile file,
InspectionManager manager,
boolean isOnTheFly)
Override this to report problems at file level. |
ProblemDescriptor[] |
checkMethod(PsiMethod method,
InspectionManager manager,
boolean isOnTheFly)
Override this to report problems at method level. |
javax.swing.JComponent |
createOptionsPanel()
|
HighlightDisplayLevel |
getDefaultLevel()
|
abstract java.lang.String |
getDisplayName()
|
abstract java.lang.String |
getGroupDisplayName()
|
java.lang.String |
getID()
|
abstract java.lang.String |
getShortName()
|
boolean |
isEnabledByDefault()
|
void |
readSettings(org.jdom.Element node)
Read in settings from xml config. |
void |
writeSettings(org.jdom.Element node)
Store current settings in xml config. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocalInspectionTool()
| Method Detail |
|---|
@Nullable
public ProblemDescriptor[] checkMethod(PsiMethod method,
InspectionManager manager,
boolean isOnTheFly)
method - to check.manager - InspectionManager to ask for ProblemDescriptor's from.isOnTheFly - true if called during on the fly editor highlighting. Called from Inspect Code action otherwise.
null if no problems found or not applicable at method level.
@Nullable
public ProblemDescriptor[] checkClass(PsiClass aClass,
InspectionManager manager,
boolean isOnTheFly)
aClass - to check.manager - InspectionManager to ask for ProblemDescriptor's from.isOnTheFly - true if called during on the fly editor highlighting. Called from Inspect Code action otherwise.
null if no problems found or not applicable at class level.
@Nullable
public ProblemDescriptor[] checkField(PsiField field,
InspectionManager manager,
boolean isOnTheFly)
field - to check.manager - InspectionManager to ask for ProblemDescriptor's from.isOnTheFly - true if called during on the fly editor highlighting. Called from Inspect Code action otherwise.
null if no problems found or not applicable at field level.
@Nullable
public ProblemDescriptor[] checkFile(PsiFile file,
InspectionManager manager,
boolean isOnTheFly)
file - to check.manager - InspectionManager to ask for ProblemDescriptor's from.isOnTheFly - true if called during on the fly editor highlighting. Called from Inspect Code action otherwise.
null if no problems found or not applicable at field level.public abstract java.lang.String getGroupDisplayName()
public abstract java.lang.String getDisplayName()
public abstract java.lang.String getShortName()
public HighlightDisplayLevel getDefaultLevel()
public boolean isEnabledByDefault()
@Nullable public javax.swing.JComponent createOptionsPanel()
public java.lang.String getID()
public void readSettings(org.jdom.Element node)
throws InvalidDataException
int TOOL_OPTION to store your options.
node - to read settings from.
InvalidDataException
public void writeSettings(org.jdom.Element node)
throws WriteExternalException
int TOOL_OPTION to store your options.
node - to store settings to.
WriteExternalException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||