boolean (CompletionParameters parameters) { PsiElement position = parameters.getPosition(); PsiElement parent = getParenthesisOwner(position); return parent instanceof PsiTypeCastExpression || parent instanceof PsiParenthesizedExpression; }