Example usage for com.intellij.openapi.options SearchableConfigurable getDisplayName

List of usage examples for com.intellij.openapi.options SearchableConfigurable getDisplayName

Introduction

In this page you can find the example usage for com.intellij.openapi.options SearchableConfigurable getDisplayName.

Prototype

@Nls(capitalization = Nls.Capitalization.Title)
@Contract(pure = true)
String getDisplayName();

Source Link

Document

Returns the visible name of the configurable component.

Usage

From source file:com.intellij.ide.ui.search.TraverseUIStarter.java

License:Apache License

public void startup() throws IOException {
    final HashMap<SearchableConfigurable, TreeSet<OptionDescription>> options = new HashMap<SearchableConfigurable, TreeSet<OptionDescription>>();
    SearchUtil.processProjectConfigurables(ProjectManager.getInstance().getDefaultProject(), options);
    Element root = new Element(OPTIONS);
    for (SearchableConfigurable configurable : options.keySet()) {
        Element configurableElement = new Element(CONFIGURABLE);
        final String id = configurable.getId();
        if (id == null)
            continue;
        configurableElement.setAttribute(ID, id);
        configurableElement.setAttribute(CONFIGURABLE_NAME, configurable.getDisplayName());
        final TreeSet<OptionDescription> sortedOptions = options.get(configurable);
        writeOptions(configurableElement, sortedOptions);
        if (configurable instanceof KeymapPanel) {
            processKeymap(configurableElement);
        } else if (configurable instanceof OptionsContainingConfigurable) {
            processOptionsContainingConfigurable((OptionsContainingConfigurable) configurable,
                    configurableElement);
        } else if (configurable instanceof PluginManagerConfigurable) {
            final TreeSet<OptionDescription> descriptions = wordsToOptionDescriptors(
                    Collections.singleton(AvailablePluginsManagerMain.MANAGE_REPOSITORIES));
            for (OptionDescription description : descriptions) {
                append(null, AvailablePluginsManagerMain.MANAGE_REPOSITORIES, description.getOption(),
                        configurableElement);
            }//from   www . j  a  va  2  s .  c o  m
        } else if (configurable instanceof AllFileTemplatesConfigurable) {
            processFileTemplates(configurableElement);
        }
        root.addContent(configurableElement);
        configurable.disposeUIResources();
    }
    final File file = new File(OUTPUT_PATH);
    if (!file.isFile()) {
        file.getParentFile().mkdirs();
        file.createNewFile();
    }
    JDOMUtil.writeDocument(new Document(root), OUTPUT_PATH, "\n");

    System.out.println("Searchable options index builder completed");

    ((ApplicationEx) ApplicationManager.getApplication()).exit(true, true);
}