junit: do not suggest to choose what to run when parametrization was selected

This commit is contained in:
Anna Kozlova
2014-01-07 20:00:44 +01:00
parent b6e117b60d
commit 2a4598d42b
2 changed files with 15 additions and 1 deletions
@@ -17,6 +17,7 @@ package com.intellij.execution.junit;
import com.intellij.execution.Location;
import com.intellij.execution.actions.ConfigurationContext;
import com.intellij.execution.junit2.PsiMemberParameterizedLocation;
import com.intellij.execution.junit2.info.MethodLocation;
import com.intellij.ide.util.PsiClassListCellRenderer;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
@@ -63,7 +64,10 @@ public class InheritorChooser {
if (aClass != null && !aClass.hasModifierProperty(PsiModifier.ABSTRACT)) {
return false;
}
} else if (location instanceof PsiMemberParameterizedLocation) {
return false;
}
final List<PsiClass> classes = new ArrayList<PsiClass>();
if (!ProgressManager.getInstance().runProcessWithProgressSynchronously(new Runnable() {
@Override
@@ -0,0 +1,46 @@
/*
* Copyright 2000-2014 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.junit2;
import com.intellij.execution.PsiLocation;
import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiMember;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class PsiMemberParameterizedLocation extends PsiLocation<PsiElement> {
private final PsiClass myContainingClass;
private final String myParamSetName;
public PsiMemberParameterizedLocation(@NotNull Project project,
@NotNull PsiElement psiElement,
@Nullable PsiClass containingClass,
String paramSetName) {
super(project, psiElement);
myContainingClass = containingClass;
myParamSetName = paramSetName;
}
public String getParamSetName() {
return myParamSetName;
}
public PsiClass getContainingClass() {
return myContainingClass;
}
}