boolean (final int offset, @NotNull final Editor editor, @NotNull final HighlighterIterator iterator, @NotNull final IElementType idType) { if (iterator.getTokenType() == idType && iterator.getEnd() == offset) { final CharSequence chars = editor.getDocument().getCharsSequence(); final char startChar = chars.charAt(iterator.getStart()); if (!Character.isUpperCase(startChar)) return false; final CharSequence word = chars.subSequence(iterator.getStart(), iterator.getEnd()); if (word.length() == 1) return true; for (int i = 1; i < word.length(); i++) { if (Character.isLowerCase(word.charAt(i))) return true; } } return false; }