mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
DSGN-2319 Run and test result icons for left gutter: double triangle for classes
This commit is contained in:
@@ -55,7 +55,7 @@ public class TestRunLineMarkerProvider extends RunLineMarkerContributor {
|
||||
TestFramework framework = TestFrameworks.detectFramework((PsiClass)element);
|
||||
if (framework != null && framework.isTestClass(element)) {
|
||||
String url = "java:suite://" + ((PsiClass)element).getQualifiedName();
|
||||
return getInfo(url, e.getProject());
|
||||
return getInfo(url, e.getProject(), true);
|
||||
}
|
||||
}
|
||||
if (element instanceof PsiMethod) {
|
||||
@@ -64,7 +64,7 @@ public class TestRunLineMarkerProvider extends RunLineMarkerContributor {
|
||||
TestFramework framework = TestFrameworks.detectFramework(psiClass);
|
||||
if (framework != null && framework.isTestMethod(element)) {
|
||||
String url = "java:test://" + psiClass.getQualifiedName() + "." + ((PsiMethod)element).getName();
|
||||
return getInfo(url, e.getProject());
|
||||
return getInfo(url, e.getProject(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,8 +73,8 @@ public class TestRunLineMarkerProvider extends RunLineMarkerContributor {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static Info getInfo(String url, Project project) {
|
||||
Icon icon = getTestStateIcon(url, project);
|
||||
private static Info getInfo(String url, Project project, boolean isClass) {
|
||||
Icon icon = getTestStateIcon(url, project, isClass);
|
||||
return new Info(icon, TOOLTIP_PROVIDER, ExecutorAction.getActions(1));
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ public class TestRunLineMarkerProvider extends RunLineMarkerContributor {
|
||||
return e instanceof PsiIdentifier;
|
||||
}
|
||||
|
||||
private static Icon getTestStateIcon(String url, Project project) {
|
||||
private static Icon getTestStateIcon(String url, Project project, boolean isClass) {
|
||||
TestStateStorage.Record state = TestStateStorage.getInstance(project).getState(url);
|
||||
if (state != null) {
|
||||
TestStateInfo.Magnitude magnitude = TestIconMapper.getMagnitude(state.magnitude);
|
||||
@@ -97,6 +97,6 @@ public class TestRunLineMarkerProvider extends RunLineMarkerContributor {
|
||||
|
||||
}
|
||||
}
|
||||
return AllIcons.RunConfigurations.TestState.Run;
|
||||
return isClass ? AllIcons.RunConfigurations.TestState.Run_run : AllIcons.RunConfigurations.TestState.Run;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 163 B |
Binary file not shown.
|
After Width: | Height: | Size: 270 B |
@@ -1089,6 +1089,7 @@ public class AllIcons {
|
||||
public static final Icon Green2 = IconLoader.getIcon("/runConfigurations/testState/green2.png"); // 12x12
|
||||
public static final Icon Red2 = IconLoader.getIcon("/runConfigurations/testState/red2.png"); // 12x12
|
||||
public static final Icon Run = IconLoader.getIcon("/runConfigurations/testState/run.png"); // 12x12
|
||||
public static final Icon Run_run = IconLoader.getIcon("/runConfigurations/testState/run_run.png"); // 12x12
|
||||
public static final Icon Yellow2 = IconLoader.getIcon("/runConfigurations/testState/yellow2.png"); // 12x12
|
||||
|
||||
}
|
||||
@@ -1220,6 +1221,7 @@ public class AllIcons {
|
||||
}
|
||||
|
||||
public static class Windows {
|
||||
public static final Icon AppIconOk512 = IconLoader.getIcon("/windows/appIconOk512.png"); // 55x55
|
||||
public static final Icon Close = IconLoader.getIcon("/windows/close.png"); // 16x16
|
||||
public static final Icon Iconify = IconLoader.getIcon("/windows/iconify.png"); // 16x16
|
||||
public static final Icon Maximize = IconLoader.getIcon("/windows/maximize.png"); // 16x16
|
||||
|
||||
Reference in New Issue
Block a user