public static String findIdentifierPrefix(@NotNull Document document, int offset, ElementPattern<Character> idPart,
                                            ElementPattern<Character> idStart) {
    final CharSequence text = document.getImmutableCharSequence();
    return findInText(offset, 0, idPart, idStart, text);
  }
public static String findIdentifierPrefix(@NotNull Document document, int offset, ElementPattern<Character> idPart,
                                            ElementPattern<Character> idStart)