void (@NotNull JavaCodeFragment codeFragment) { if (codeFragment instanceof PsiExpressionCodeFragment) { final PsiType type = ((PsiExpressionCodeFragment)codeFragment).getExpectedType(); if (type != null) { myResult.add(createInfoImpl(type, type)); } } }