protected void doComplete( final int offset1, final int offset2, final CompletionContext context, final FileCopyPatcher dummyIdentifier, final Editor editor, final int invocationCount) { PsiFile file = context.file; int offset = context.getStartOffset(); PsiElement lastElement = file.findElementAt(offset - 1); if (lastElement == null || !StringUtil.endsWithChar(lastElement.getText(), '@')) return; super.doComplete(offset1, offset2, context, dummyIdentifier, editor, invocationCount); }