List<TextAttributes> (@NotNull Document document, int offset, char c) { CharSequence text = document.getImmutableCharSequence(); CharSequence newText = StringUtil.replaceSubSequence(text, offset, offset, new SingleCharSequence(c)); List<IElementType> tokenTypes = getTokenType(newText, offset); return Arrays.asList(getAttributes(tokenTypes.get(0)).clone(), getAttributes(tokenTypes.get(1)).clone()); }