package com.intellij.debugger.streams.trace.smart.handler;

import com.intellij.debugger.streams.wrapper.StreamCall;
import com.intellij.debugger.streams.wrapper.StreamCallType;
import org.jetbrains.annotations.NotNull;

/**
 * @author Vitaliy.Bibaev
 */
public class PeekCall implements StreamCall {
  private final String myLambda;

  public PeekCall(@NotNull String lambda) {
    myLambda = lambda;
  }

  @NotNull
  @Override
  public String getName() {
    return "peek";
  }

  @NotNull
  @Override
  public String getArguments() {
    return String.format("(%s)", myLambda);
  }

  @NotNull
  @Override
  public StreamCallType getType() {
    return StreamCallType.INTERMEDIATE;
  }
}

@@ -86,32 +86,119 @@
 ger.streams.
-wrapper.
+trace.smart.handler.type.GenericType;%0Aimport com.intellij.debugger.streams.wrapper.Intermediate
 StreamCall;%0A
@@ -368,16 +368,28 @@
 lements 
+Intermediate
 StreamCa
@@ -430,74 +430,184 @@
 da;%0A
-%0A  public PeekCall(@NotNull String lambda) %7B%0A    myLambda = lambda
+  private final GenericType myElementType;%0A%0A  public PeekCall(@NotNull String lambda, @NotNull GenericType elementType) %7B%0A    myLambda = lambda;%0A    myElementType = elementType
 ;%0A  
@@ -891,11 +891,196 @@
 ATE;%0A  %7D
+%0A%0A  @NotNull%0A  @Override%0A  public GenericType getTypeAfter() %7B%0A    return myElementType;%0A  %7D%0A%0A  @NotNull%0A  @Override%0A  public GenericType getTypeBefore() %7B%0A    return myElementType;%0A  %7D
 %0A%7D%0A

Store type of objects in stream in PeekCall