boolean (ASTNode node) { ASTNode next = node.getTreeNext(); if (next == null || !(next.getElementType() == JavaTokenType.RBRACE)) return false; ASTNode prev = node.getTreePrev(); if (prev == null || !(prev.getElementType() == JavaTokenType.LBRACE)) return false; return true; }