Write inspection to detect pack.ages.Class.fun
visitReferenceExpression
looks for aPsiReferenceExpression
where thelastChild
name isfun
.- Then it checks whether
expression.resolve().stub.parentStub
corresponds topack.ages.Class
A AbstractUastNonRecursiveVisitor
looking for the following UExpression
node is setup :
sourcePsi
is aREFERENCE_EXPRESSION
corresponding toinvokeLater
- the "parent"
sourcePsi?.parent?.parent?.firstChild?.lastChild
is aREFERENCE_EXPRESSION
corresponding toSwingUtilities