From 6fb72d02b211ca8b0f6c899c8b48560fa98d1bed Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Mon, 14 May 2018 15:24:48 +0300 Subject: [PATCH] failed test line highlighting: warning by default --- .../execution/testframework/TestFailedLineInspection.java | 4 ++-- java/java-impl/src/META-INF/JavaPlugin.xml | 2 +- .../intellij/openapi/editor/colors/CodeInsightColors.java | 2 +- .../application/options/colors/ColorSettingsUtil.java | 2 +- .../openapi/options/colors/pages/GeneralColorsPage.java | 2 ++ .../platform-resources/src/DefaultColorSchemesManager.xml | 8 ++++---- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/java/execution/impl/src/com/intellij/execution/testframework/TestFailedLineInspection.java b/java/execution/impl/src/com/intellij/execution/testframework/TestFailedLineInspection.java index 5def1bfd23f26..124d4450cd18a 100644 --- a/java/execution/impl/src/com/intellij/execution/testframework/TestFailedLineInspection.java +++ b/java/execution/impl/src/com/intellij/execution/testframework/TestFailedLineInspection.java @@ -37,8 +37,8 @@ public void visitMethodCallExpression(PsiMethodCallExpression call) { new RunActionFix(call, DefaultRunExecutor.EXECUTOR_ID)}; ProblemDescriptor descriptor = InspectionManager.getInstance(call.getProject()) .createProblemDescriptor(call, state.errorMessage, isOnTheFly, fixes, - ProblemHighlightType.GENERIC_ERROR); - descriptor.setTextAttributes(CodeInsightColors.RUNTIME_PROBLEM); + ProblemHighlightType.GENERIC_ERROR_OR_WARNING); + descriptor.setTextAttributes(CodeInsightColors.RUNTIME_ERROR); holder.registerProblem(descriptor); } }; diff --git a/java/java-impl/src/META-INF/JavaPlugin.xml b/java/java-impl/src/META-INF/JavaPlugin.xml index e293f90b1c2f7..c5abb1a657b93 100644 --- a/java/java-impl/src/META-INF/JavaPlugin.xml +++ b/java/java-impl/src/META-INF/JavaPlugin.xml @@ -201,7 +201,7 @@ implementationClass="com.intellij.testIntegration.TestRunLineMarkerProvider"/> diff --git a/platform/core-api/src/com/intellij/openapi/editor/colors/CodeInsightColors.java b/platform/core-api/src/com/intellij/openapi/editor/colors/CodeInsightColors.java index 2d13fc214fbbc..f83c9932141bd 100644 --- a/platform/core-api/src/com/intellij/openapi/editor/colors/CodeInsightColors.java +++ b/platform/core-api/src/com/intellij/openapi/editor/colors/CodeInsightColors.java @@ -22,7 +22,7 @@ public interface CodeInsightColors { TextAttributesKey WARNINGS_ATTRIBUTES = TextAttributesKey.createTextAttributesKey("WARNING_ATTRIBUTES"); TextAttributesKey GENERIC_SERVER_ERROR_OR_WARNING = TextAttributesKey.createTextAttributesKey("GENERIC_SERVER_ERROR_OR_WARNING"); TextAttributesKey DUPLICATE_FROM_SERVER = TextAttributesKey.createTextAttributesKey("DUPLICATE_FROM_SERVER"); - TextAttributesKey RUNTIME_PROBLEM = TextAttributesKey.createTextAttributesKey("RUNTIME_PROBLEM"); + TextAttributesKey RUNTIME_ERROR = TextAttributesKey.createTextAttributesKey("RUNTIME_ERROR"); /** * use #WEAK_WARNING_ATTRIBUTES instead */ diff --git a/platform/lang-impl/src/com/intellij/application/options/colors/ColorSettingsUtil.java b/platform/lang-impl/src/com/intellij/application/options/colors/ColorSettingsUtil.java index de449e18fe15c..4394dbfb859f9 100644 --- a/platform/lang-impl/src/com/intellij/application/options/colors/ColorSettingsUtil.java +++ b/platform/lang-impl/src/com/intellij/application/options/colors/ColorSettingsUtil.java @@ -77,7 +77,7 @@ private static void addInspectionSeverityAttributes(List d descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.weak.warning"), CodeInsightColors.WEAK_WARNING_ATTRIBUTES)); descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.server.problems"), CodeInsightColors.GENERIC_SERVER_ERROR_OR_WARNING)); descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.server.duplicate"), CodeInsightColors.DUPLICATE_FROM_SERVER)); - descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.runtime"), CodeInsightColors.RUNTIME_PROBLEM)); + descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.runtime"), CodeInsightColors.RUNTIME_ERROR)); for (SeveritiesProvider provider : Extensions.getExtensions(SeveritiesProvider.EP_NAME)) { for (HighlightInfoType highlightInfoType : provider.getSeveritiesHighlightInfoTypes()) { diff --git a/platform/lang-impl/src/com/intellij/openapi/options/colors/pages/GeneralColorsPage.java b/platform/lang-impl/src/com/intellij/openapi/options/colors/pages/GeneralColorsPage.java index 424c5e27b36f0..92eece8b2a831 100644 --- a/platform/lang-impl/src/com/intellij/openapi/options/colors/pages/GeneralColorsPage.java +++ b/platform/lang-impl/src/com/intellij/openapi/options/colors/pages/GeneralColorsPage.java @@ -65,6 +65,7 @@ public class GeneralColorsPage implements ColorSettingsPage, InspectionColorSett " Deprecated symbol marked for removal\n" + " Unused symbol\n"+ " Unknown symbol\n" + + " Runtime problem\n" + " Problem from server\n" + " Duplicate from server\n" + getCustomSeveritiesDemoText(); @@ -168,6 +169,7 @@ public class GeneralColorsPage implements ColorSettingsPage, InspectionColorSett ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("weak_warning", CodeInsightColors.WEAK_WARNING_ATTRIBUTES); ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("server_error", CodeInsightColors.GENERIC_SERVER_ERROR_OR_WARNING); ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("server_duplicate", CodeInsightColors.DUPLICATE_FROM_SERVER); + ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put("runtime_error", CodeInsightColors.RUNTIME_ERROR); for (SeveritiesProvider provider : Extensions.getExtensions(SeveritiesProvider.EP_NAME)) { for (HighlightInfoType highlightInfoType : provider.getSeveritiesHighlightInfoTypes()) { ADDITIONAL_HIGHLIGHT_DESCRIPTORS.put(getHighlightDescTagName(highlightInfoType), diff --git a/platform/platform-resources/src/DefaultColorSchemesManager.xml b/platform/platform-resources/src/DefaultColorSchemesManager.xml index 8e108242b9e75..751dd0a6bd00c 100644 --- a/platform/platform-resources/src/DefaultColorSchemesManager.xml +++ b/platform/platform-resources/src/DefaultColorSchemesManager.xml @@ -296,9 +296,9 @@ - -