/*
 * Copyright 2000-2013 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.intellij.execution.configurations;

import org.jetbrains.annotations.NotNull;

/**
 * Allow to get before/after steps from wrapped configuration: e.g. to rerun tests with initial tests before options
 */
public interface WrappingRunConfiguration<T extends RunConfiguration> extends WithoutOwnBeforeRunSteps {
  @NotNull T getPeer();
}

@@ -675,23 +675,109 @@
 tations.
-NotNull
+Contract;%0Aimport org.jetbrains.annotations.NotNull;%0Aimport org.jetbrains.annotations.Nullable
 ;%0A%0A/**%0A 
@@ -1001,16 +1001,16 @@
 Steps %7B%0A
-
   @NotNu
@@ -1024,11 +1024,295 @@
 tPeer();
+%0A%0A  @Contract(%22null -%3E null; !null -%3E !null%22)%0A  static @Nullable RunProfile unwrapRunProfile(@Nullable RunProfile runProfile) %7B%0A    if (runProfile instanceof WrappingRunConfiguration) %7B%0A      return ((WrappingRunConfiguration%3C?%3E)runProfile).getPeer();%0A    %7D%0A    return runProfile;%0A  %7D
 %0A%7D%0A

fix "Click to update snapshot" to work from "Rerun Failed Tests" (WEB-46993)