void (InsertionContext context, PsiField field) { context.commitDocument(); PsiFile file = context.getFile(); final PsiReference reference = file.findReferenceAt(context.getStartOffset()); if (reference instanceof PsiJavaCodeReferenceElement && ((PsiJavaCodeReferenceElement)reference).isQualified()) { return; } PsiClass containingClass = myQualifierClass != null && myQualifierClass.isValid() ? myQualifierClass : field.getContainingClass(); if (containingClass != null && containingClass.getName() != null) { context.getDocument().insertString(context.getStartOffset(), field.hasModifierProperty(PsiModifier.STATIC) ? "." : ".this."); JavaCompletionUtil.insertClassReference(containingClass, file, context.getStartOffset()); PsiDocumentManager.getInstance(context.getProject()).commitDocument(context.getDocument()); } }