Example usage for com.intellij.openapi.options.colors ColorAndFontDescriptorsProvider getColorDescriptors

List of usage examples for com.intellij.openapi.options.colors ColorAndFontDescriptorsProvider getColorDescriptors

Introduction

In this page you can find the example usage for com.intellij.openapi.options.colors ColorAndFontDescriptorsProvider getColorDescriptors.

Prototype

ColorDescriptor @NotNull [] getColorDescriptors();

Source Link

Document

Returns the list of descriptors specifying the com.intellij.openapi.editor.colors.ColorKey instances for which colors are specified in the page.

Usage

From source file:com.intellij.application.options.colors.ColorAndFontOptions.java

License:Apache License

private static void initDescriptions(@NotNull ColorAndFontDescriptorsProvider provider,
        @NotNull List<EditorSchemeAttributeDescriptor> descriptions, @NotNull MyColorScheme scheme) {
    String group = provider.getDisplayName();
    List<AttributesDescriptor> attributeDescriptors = ColorSettingsUtil.getAllAttributeDescriptors(provider);
    for (AttributesDescriptor descriptor : attributeDescriptors) {
        addSchemedDescription(descriptions, descriptor.getDisplayName(), group, descriptor.getKey(), scheme,
                null, null);//w w w.  ja v  a 2s  . co  m
    }

    ColorDescriptor[] colorDescriptors = provider.getColorDescriptors();
    for (ColorDescriptor descriptor : colorDescriptors) {
        ColorKey back = descriptor.getKind() == ColorDescriptor.Kind.BACKGROUND ? descriptor.getKey() : null;
        ColorKey fore = descriptor.getKind() == ColorDescriptor.Kind.FOREGROUND ? descriptor.getKey() : null;
        addEditorSettingDescription(descriptions, descriptor.getDisplayName(), group, back, fore, scheme);
    }
}