boolean (@NotNull InsertionContext context) { Document document = context.getDocument(); CharSequence chars = document.getCharsSequence(); int offset = CharArrayUtil.shiftForward(chars, context.getTailOffset(), " \n\t"); return !CharArrayUtil.regionMatches(chars, offset, "->"); }