@@ -0,0 +1,2021 @@
+/*%0A * Copyright 2000-2016 JetBrains s.r.o.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.intellij.testFramework;%0A%0Aimport com.intellij.util.SmartList;%0Aimport com.intellij.util.ThrowableRunnable;%0Aimport com.intellij.util.containers.ContainerUtil;%0Aimport com.intellij.util.lang.CompoundRuntimeException;%0Aimport org.jetbrains.annotations.Contract;%0Aimport org.jetbrains.annotations.NotNull;%0A%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0A/**%0A * Runs all given runnables and throws all the caught exceptions at the end.%0A *%0A * @author peter%0A */%0Apublic class RunAll implements Runnable %7B%0A  private final List%3CThrowableRunnable%3C?%3E%3E myActions;%0A%0A  public RunAll(ThrowableRunnable%3CThrowable%3E... actions) %7B%0A    this(Arrays.asList(actions));%0A  %7D%0A%0A  private RunAll(List%3CThrowableRunnable%3C?%3E%3E actions) %7B%0A    myActions = actions;%0A  %7D%0A%0A  @Contract(pure=true)%0A  public RunAll append(ThrowableRunnable%3CThrowable%3E... actions) %7B%0A    return new RunAll(ContainerUtil.concat(myActions, ContainerUtil.newArrayList(actions)));%0A  %7D%0A%0A  @Override%0A  public void run() %7B%0A    CompoundRuntimeException.throwIfNotEmpty(collectExceptions());%0A  %7D%0A%0A  @NotNull%0A  public List%3CThrowable%3E collectExceptions() %7B%0A    List%3CThrowable%3E errors = new SmartList%3C%3E();%0A    for (ThrowableRunnable%3C?%3E action : myActions) %7B%0A      try %7B%0A        action.run();%0A      %7D%0A      catch (CompoundRuntimeException e) %7B%0A        errors.addAll(e.getExceptions());%0A      %7D%0A      catch (Throwable e) %7B%0A        errors.add(e);%0A      %7D%0A    %7D%0A    return errors;%0A  %7D%0A%7D%0A

fix compilation