private boolean removesPattern(final TextRange textRange, final String whiteSpace, final String pattern) {
    return CharArrayUtil.indexOf(myDocument.getCharsSequence(), pattern, textRange.getStartOffset(), textRange.getEndOffset() + 1) >= 0 &&
        CharArrayUtil.indexOf(whiteSpace, pattern, 0) < 0;
  }
private boolean removesPattern(final TextRange textRange, final String whiteSpace, final String pattern)