@@ -0,0 +1,2557 @@
+package com.intellij.debugger.streams.ui;%0A%0Aimport com.intellij.debugger.streams.resolve.ResolvedTrace;%0Aimport com.intellij.debugger.streams.trace.smart.TraceElement;%0Aimport org.jetbrains.annotations.NotNull;%0A%0Aimport java.util.List;%0Aimport java.util.concurrent.CopyOnWriteArrayList;%0Aimport java.util.stream.Collectors;%0A%0A/**%0A * @author Vitaliy.Bibaev%0A */%0Apublic class TraceControllerImpl implements TraceController, ValuesHighlightingListener %7B%0A  private static final ValuesHighlightingListener EMPTY_LISTENER = (values, direction) -%3E %7B%0A  %7D;%0A  private final List%3CTraceContainer%3E myListeners = new CopyOnWriteArrayList%3C%3E();%0A  private final ValuesSelectionListener mySelectionListener;%0A  private final ResolvedTrace myResolvedTrace;%0A%0A  private ValuesHighlightingListener myPrevListener = EMPTY_LISTENER;%0A  private ValuesHighlightingListener myNextListener = EMPTY_LISTENER;%0A%0A  TraceControllerImpl(@NotNull ResolvedTrace trace) %7B%0A    myResolvedTrace = trace;%0A    mySelectionListener = elements -%3E %7B%0A      highlightAll(elements);%0A      final List%3CTraceElement%3E nextValues =%0A        elements.stream().flatMap(x -%3E myResolvedTrace.getNextValues(x).stream()).collect(Collectors.toList());%0A      final List%3CTraceElement%3E prevValues =%0A        elements.stream().flatMap(x -%3E myResolvedTrace.getPreviousValues(x).stream()).collect(Collectors.toList());%0A      myNextListener.highlightingChanged(nextValues, PropagationDirection.FORWARD);%0A      myPrevListener.highlightingChanged(prevValues, PropagationDirection.BACKWARD);%0A    %7D;%0A  %7D%0A%0A  void setPreviousListener(@NotNull ValuesHighlightingListener listener) %7B%0A    myPrevListener = listener;%0A  %7D%0A%0A  void setNextListener(@NotNull ValuesHighlightingListener listener) %7B%0A    myNextListener = listener;%0A  %7D%0A%0A  public List%3CTraceElement%3E getValues() %7B%0A    return myResolvedTrace.getValues();%0A  %7D%0A%0A  @Override%0A  public void register(@NotNull TraceContainer listener) %7B%0A    myListeners.add(listener);%0A    listener.addSelectionListener(mySelectionListener);%0A  %7D%0A%0A  @Override%0A  public void highlightingChanged(@NotNull List%3CTraceElement%3E values, @NotNull PropagationDirection direction) %7B%0A    highlightAll(values);%0A%0A    if (direction.equals(PropagationDirection.BACKWARD)) %7B%0A      myPrevListener.highlightingChanged(values, PropagationDirection.BACKWARD);%0A    %7D%0A    else %7B%0A      myPrevListener.highlightingChanged(values, PropagationDirection.FORWARD);%0A    %7D%0A  %7D%0A%0A  private void highlightAll(@NotNull List%3CTraceElement%3E values) %7B%0A    for (final TraceContainer listener : myListeners) %7B%0A      listener.highlight(values);%0A    %7D%0A  %7D%0A%7D%0A

Add simple implementation fot trace controller