use of com.intellij.codeInsight.daemon.impl.SeveritiesProvider in project intellij-community by JetBrains.
the class ColorSettingsUtil method addInspectionSeverityAttributes.
private static void addInspectionSeverityAttributes(List<AttributesDescriptor> descriptors) {
descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.unknown.symbol"), CodeInsightColors.WRONG_REFERENCES_ATTRIBUTES));
descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.deprecated.symbol"), CodeInsightColors.DEPRECATED_ATTRIBUTES));
descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.unused.symbol"), CodeInsightColors.NOT_USED_ELEMENT_ATTRIBUTES));
descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.error"), CodeInsightColors.ERRORS_ATTRIBUTES));
descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.warning"), CodeInsightColors.WARNINGS_ATTRIBUTES));
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));
for (SeveritiesProvider provider : Extensions.getExtensions(SeveritiesProvider.EP_NAME)) {
for (HighlightInfoType highlightInfoType : provider.getSeveritiesHighlightInfoTypes()) {
final TextAttributesKey attributesKey = highlightInfoType.getAttributesKey();
descriptors.add(new AttributesDescriptor(toDisplayName(attributesKey), attributesKey));
}
}
}
use of com.intellij.codeInsight.daemon.impl.SeveritiesProvider in project intellij-community by JetBrains.
the class ApplicationInspectionProfileManager method registerProvidedSeverities.
// It should be public to be available from Upsource
public static void registerProvidedSeverities() {
for (SeveritiesProvider provider : Extensions.getExtensions(SeveritiesProvider.EP_NAME)) {
for (HighlightInfoType t : provider.getSeveritiesHighlightInfoTypes()) {
HighlightSeverity highlightSeverity = t.getSeverity(null);
SeverityRegistrar.registerStandard(t, highlightSeverity);
TextAttributesKey attributesKey = t.getAttributesKey();
Icon icon = t instanceof HighlightInfoType.Iconable ? ((HighlightInfoType.Iconable) t).getIcon() : null;
HighlightDisplayLevel.registerSeverity(highlightSeverity, attributesKey, icon);
}
}
}
use of com.intellij.codeInsight.daemon.impl.SeveritiesProvider in project intellij-community by JetBrains.
the class GeneralColorsPage method getCustomSeveritiesDemoText.
private static String getCustomSeveritiesDemoText() {
final StringBuilder buff = new StringBuilder();
for (SeveritiesProvider provider : Extensions.getExtensions(SeveritiesProvider.EP_NAME)) {
for (HighlightInfoType highlightInfoType : provider.getSeveritiesHighlightInfoTypes()) {
final String tag = getHighlightDescTagName(highlightInfoType);
buff.append(" <").append(tag).append(">");
buff.append(tag.toLowerCase());
buff.append("</").append(tag).append(">").append("\n");
}
}
return buff.toString();
}
Aggregations