private static boolean checkSelectedRange(int startOffset, int endOffset, GrLiteral literal) {
    if (isWholeLiteralContentSelected(literal, startOffset, endOffset)) {
      return false;
    }

    if (literal instanceof GrString) {
      if (areInjectionsCut((GrString)literal, startOffset, endOffset)) {
        return false;
      }
    }

    if (isEscapesCut(literal, startOffset, endOffset)) {
      return false;
    }

    return true;
  }
private static boolean checkSelectedRange(int startOffset, int endOffset, GrLiteral literal)