boolean () { SliceRootNode rootNode = myTreeBuilder.getRootSliceNode(); PsiElement element = rootNode.getRootUsage().getUsageInfo().getElement(); PsiType type; if (element instanceof PsiVariable variable) { type = variable.getType(); } else if (element instanceof PsiExpression expression) { type = expression.getType(); } else { type = null; } return type instanceof PsiClassType || type instanceof PsiArrayType; }