private SchemeTextAttributesDescription(
     String name,
     String group,
     @NotNull TextAttributesKey key,
     @NotNull MyColorScheme scheme,
     Icon icon,
     String toolTip) {
   super(name, group, getInitialAttributes(scheme, key).clone(), key, scheme, icon, toolTip);
   this.key = key;
   myAttributesToApply = getInitialAttributes(scheme, key);
   TextAttributesKey fallbackKey = key.getFallbackAttributeKey();
   if (fallbackKey != null) {
     myFallbackAttributes = scheme.getAttributes(fallbackKey);
     myBaseAttributeDescriptor =
         ColorSettingsPages.getInstance().getAttributeDescriptor(fallbackKey);
     if (myBaseAttributeDescriptor == null) {
       myBaseAttributeDescriptor =
           new Pair<ColorSettingsPage, AttributesDescriptor>(
               null, new AttributesDescriptor(fallbackKey.getExternalName(), fallbackKey));
     }
   }
   myIsInheritedInitial = isInherited(scheme);
   setInherited(myIsInheritedInitial);
   initCheckedStatus();
 }
 private static void initPluggedDescriptions(
     @NotNull List<EditorSchemeAttributeDescriptor> descriptions, @NotNull MyColorScheme scheme) {
   ColorSettingsPage[] pages = ColorSettingsPages.getInstance().getRegisteredPages();
   for (ColorSettingsPage page : pages) {
     initDescriptions(page, descriptions, scheme);
   }
   for (ColorAndFontDescriptorsProvider provider :
       Extensions.getExtensions(ColorAndFontDescriptorsProvider.EP_NAME)) {
     initDescriptions(provider, descriptions, scheme);
   }
 }
  protected List<ColorAndFontPanelFactory> createPanelFactories() {
    List<ColorAndFontPanelFactory> result = new ArrayList<ColorAndFontPanelFactory>();
    result.add(new FontConfigurableFactory());

    List<ColorAndFontPanelFactory> extensions = new ArrayList<ColorAndFontPanelFactory>();
    extensions.add(new ConsoleFontConfigurableFactory());
    ColorSettingsPage[] pages = ColorSettingsPages.getInstance().getRegisteredPages();
    for (final ColorSettingsPage page : pages) {
      extensions.add(
          new ColorAndFontPanelFactoryEx() {
            @Override
            @NotNull
            public NewColorAndFontPanel createPanel(@NotNull ColorAndFontOptions options) {
              final SimpleEditorPreview preview = new SimpleEditorPreview(options, page);
              return NewColorAndFontPanel.create(
                  preview, page.getDisplayName(), options, null, page);
            }

            @Override
            @NotNull
            public String getPanelDisplayName() {
              return page.getDisplayName();
            }

            @Override
            public DisplayPriority getPriority() {
              if (page instanceof DisplayPrioritySortable) {
                return ((DisplayPrioritySortable) page).getPriority();
              }
              return DisplayPriority.LANGUAGE_SETTINGS;
            }
          });
    }
    Collections.addAll(extensions, Extensions.getExtensions(ColorAndFontPanelFactory.EP_NAME));
    Collections.sort(
        extensions,
        new Comparator<ColorAndFontPanelFactory>() {
          @Override
          public int compare(ColorAndFontPanelFactory f1, ColorAndFontPanelFactory f2) {
            if (f1 instanceof DisplayPrioritySortable) {
              if (f2 instanceof DisplayPrioritySortable) {
                int result =
                    ((DisplayPrioritySortable) f1)
                        .getPriority()
                        .compareTo(((DisplayPrioritySortable) f2).getPriority());
                if (result != 0) return result;
              } else {
                return 1;
              }
            } else if (f2 instanceof DisplayPrioritySortable) {
              return -1;
            }
            return f1.getPanelDisplayName().compareToIgnoreCase(f2.getPanelDisplayName());
          }
        });
    result.addAll(extensions);

    result.add(new DiffColorsPageFactory());
    result.add(new FileStatusColorsPageFactory());
    result.add(new ScopeColorsPageFactory());

    return result;
  }