package com.intellij.debugger.streams.trace.smart.resolve.impl;

import com.intellij.debugger.streams.trace.smart.resolve.TraceInfo;
import com.intellij.debugger.streams.trace.smart.resolve.TraceResolver;
import com.sun.jdi.Value;
import org.jetbrains.annotations.NotNull;

/**
 * @author Vitaliy.Bibaev
 */
public class SimplePeekResolver implements TraceResolver {
  @NotNull
  @Override
  public TraceInfo resolve(@NotNull Value value) {
    return null;
  }
}

@@ -111,350 +111,2588 @@
 art.
-resolve.TraceInfo;%0Aimport com.intellij.debugger.streams.trace.smart.resolve.TraceResolver;%0Aimport com.sun.jdi.Value;%0Aimport org.jetbrains.annotations.NotNull;%0A%0A/**%0A * @author Vitaliy.Bibaev%0A */%0Apublic class SimplePeekResolver implements TraceResolver %7B%0A  @NotNull%0A  @Override%0A  public TraceInfo resolve(@NotNull Value value) %7B%0A    return null
+TraceElement;%0Aimport com.intellij.debugger.streams.trace.smart.TraceElementImpl;%0Aimport com.intellij.debugger.streams.trace.smart.resolve.TraceInfo;%0Aimport com.intellij.debugger.streams.trace.smart.resolve.TraceResolver;%0Aimport com.intellij.debugger.streams.trace.smart.resolve.ex.UnexpectedValueException;%0Aimport com.sun.jdi.ArrayReference;%0Aimport com.sun.jdi.IntegerValue;%0Aimport com.sun.jdi.Value;%0Aimport org.jetbrains.annotations.NotNull;%0A%0Aimport java.util.LinkedHashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0A/**%0A * @author Vitaliy.Bibaev%0A */%0Apublic class SimplePeekResolver implements TraceResolver %7B%0A  @NotNull%0A  @Override%0A  public TraceInfo resolve(@NotNull Value value) %7B%0A    if (value instanceof ArrayReference) %7B%0A      final ArrayReference trace = (ArrayReference)value;%0A      final Value before = trace.getValue(0);%0A      // todo: do something with 'after' trace array%0A      if (before instanceof ArrayReference) %7B%0A        return new ValuesOrderInfo(resolveTrace((ArrayReference)before));%0A      %7D%0A    %7D%0A%0A    throw new UnexpectedValueException(%22peek operation trace is wrong format%22);%0A  %7D%0A%0A  @NotNull%0A  private Map%3CInteger, TraceElement%3E resolveTrace(@NotNull ArrayReference mapArray) %7B%0A    final Value keys = mapArray.getValue(0);%0A    final Value values = mapArray.getValue(1);%0A    if (keys instanceof ArrayReference && values instanceof ArrayReference) %7B%0A      return resolveTrace((ArrayReference)keys, (ArrayReference)values);%0A    %7D%0A%0A    throw new UnexpectedValueException(%22key and values must be store in arrays in peek resolver%22);%0A  %7D%0A%0A  @NotNull%0A  private Map%3CInteger, TraceElement%3E resolveTrace(@NotNull ArrayReference keysArray, @NotNull ArrayReference valuesArray) %7B%0A    final LinkedHashMap%3CInteger, TraceElement%3E result = new LinkedHashMap%3C%3E();%0A    final List%3CValue%3E keyMirrors = keysArray.getValues();%0A    final List%3CValue%3E valueMirrors = valuesArray.getValues();%0A    if (keyMirrors.size() == valueMirrors.size()) %7B%0A      for (int i = 0, size = keyMirrors.size(); i %3C size; i++) %7B%0A        final TraceElement element = resolveTraceElement(keyMirrors.get(i), valueMirrors.get(i));%0A        result.put(element.getTime(), element);%0A      %7D%0A%0A      return result;%0A    %7D%0A%0A    throw new UnexpectedValueException(%22keys and values arrays should be with the same sizes%22);%0A  %7D%0A%0A  @NotNull%0A  private TraceElement resolveTraceElement(@NotNull Value key, @NotNull Value value) %7B%0A    if (key instanceof IntegerValue) %7B%0A      return new TraceElementImpl(((IntegerValue)key).value(), value);%0A    %7D%0A%0A    throw new UnexpectedValueException(%22key must be an integer value%22)
 ;%0A  

Add simple peek resolver