PsiElementPredicate () { return new PsiElementPredicate() { @Override public boolean satisfiedBy(@NotNull PsiElement element) { return element instanceof GrTypeCastExpression && ((GrTypeCastExpression)element).getCastTypeElement() != null && ((GrTypeCastExpression)element).getOperand() != null; } }; }