private boolean canWrap(int chunkIndex, @NotNull List<? extends ChainedCallChunk> methodCall) {
    if (chunkIndex <= 0) return false;
    ChainedCallChunk prev = methodCall.get(chunkIndex - 1);
    boolean isFirst = !isMethodCall(prev) || chunkIndex == 1;
    if (isFirst) {
      if (mySettings.WRAP_FIRST_METHOD_IN_CALL_CHAIN) {
        ChainedCallChunk next = chunkIndex + 1 < methodCall.size() ? methodCall.get(chunkIndex + 1) : null;
        return next != null && isMethodCall(next);
      }
      return false;
    }
    return true;
  }
private boolean canWrap(int chunkIndex, @NotNull List<? extends ChainedCallChunk> methodCall)