boolean (final char c, @NotNull final PsiFile file, @NotNull final Editor editor) { if (c == '<' && myToDeleteGt) { int offset = editor.getCaretModel().getOffset(); final CharSequence chars = editor.getDocument().getCharsSequence(); if (editor.getDocument().getTextLength() <= offset) return false; //virtual space after end of file char c1 = chars.charAt(offset); if (c1 != '>') return true; TypedHandlerUtil.handleGenericLTDeletion(editor, offset, JavaTokenType.LT, JavaTokenType.GT, JavaTypingTokenSets.INVALID_INSIDE_REFERENCE); return true; } return false; }