mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 18:27:49 +08:00
Update code_inspections.md
This commit is contained in:
parent
9549adde22
commit
f9322f071e
@ -84,7 +84,7 @@ The overridden `ComparingReferencesInspection` methods are discussed in the sect
|
||||
### Visitor Implementation Class
|
||||
The visitor class evaluates whether elements of the file's `PsiTree` are of interest to an inspection.
|
||||
|
||||
The `ComparingReferencesInspection.createOptionsPanel()` method creates an anonymous visitor class based on [`JavaElementVisitor`](upsource:///java/java-psi-api/src/com/intellij/psi/JavaElementVisitor.java) to traverse the `PsiTree` of the Java file being edited, inspecting for suspect syntax.
|
||||
The `ComparingReferencesInspection.buildVisitor()` method creates an anonymous visitor class based on [`JavaElementVisitor`](upsource:///java/java-psi-api/src/com/intellij/psi/JavaElementVisitor.java) to traverse the `PsiTree` of the Java file being edited, inspecting for suspect syntax.
|
||||
The anonymous class overrides three methods in particular.
|
||||
* `visitReferenceExpression()` to prevent any duplicate visitation of reference-type expressions.
|
||||
* `visitBinaryExpression()`, which does all the heavy lifting.
|
||||
|
Loading…
x
Reference in New Issue
Block a user