void (@NotNull final com.intellij.openapi.editor.event.DocumentEvent e) { parentClassRef.set(null); try { final PsiType psiType = codeFragment.getType(); final PsiClass psiClass = psiType instanceof PsiClassType ? ((PsiClassType)psiType).resolve() : null; parentClassRef.set(psiClass); } catch (PsiTypeCodeFragment.IncorrectTypeException e1) { // ok } }