if (AUTO_BIND.equals(signature)) {
setAutobind(true);
return null;
}
if (BIND.equals(signature)) {
AnonymousClassDeclaration anonymousClassDeclaration =
AstNodeUtils.getEnclosingNode(invocation, AnonymousClassDeclaration.class);
if (anonymousClassDeclaration != null
&& anonymousClassDeclaration.getParent() instanceof ClassInstanceCreation
&& anonymousClassDeclaration.getParent().getParent() instanceof MethodInvocation) {
MethodInvocation addListenerInvocation =
(MethodInvocation) anonymousClassDeclaration.getParent().getParent();
if ("addListener".equals(addListenerInvocation.getName().getIdentifier())
&& addListenerInvocation.getExpression() instanceof MethodInvocation) {
MethodInvocation getSelectionModelInvocation =
(MethodInvocation) addListenerInvocation.getExpression();
if ("getSelectionModel".equals(getSelectionModelInvocation.getName().getIdentifier())) {