Example usage for com.intellij.openapi.wm ToolWindowContentUiType getInstance

List of usage examples for com.intellij.openapi.wm ToolWindowContentUiType getInstance

Introduction

In this page you can find the example usage for com.intellij.openapi.wm ToolWindowContentUiType getInstance.

Prototype

@NotNull
    public static ToolWindowContentUiType getInstance(@Nullable String name) 

Source Link

Usage

From source file:com.intellij.ide.projectView.impl.ProjectViewImpl.java

License:Apache License

public synchronized void setupImpl(final ToolWindow toolWindow, final boolean loadPaneExtensions) {
    myActionGroup = new DefaultActionGroup();

    myAutoScrollFromSourceHandler.install();

    if (toolWindow != null) {
        myContentManager = toolWindow.getContentManager();
        if (!ApplicationManager.getApplication().isUnitTestMode()) {
            toolWindow.setContentUiType(ToolWindowContentUiType.getInstance("combo"), null);
            ((ToolWindowEx) toolWindow).setAdditionalGearActions(myActionGroup);
            toolWindow.getComponent().putClientProperty(ToolWindowContentUi.HIDE_ID_LABEL, "true");
        }//from   www  .j  av  a  2  s. c o m
    } else {
        final ContentFactory contentFactory = ServiceManager.getService(ContentFactory.class);
        myContentManager = contentFactory.createContentManager(false, myProject);
    }

    GuiUtils.replaceJSplitPaneWithIDEASplitter(myPanel);
    SwingUtilities.invokeLater(new Runnable() {
        @Override
        public void run() {
            splitterProportions.restoreSplitterProportions(myPanel);
        }
    });

    if (loadPaneExtensions) {
        ensurePanesLoaded();
    }
    isInitialized = true;
    doAddUninitializedPanes();

    myContentManager.addContentManagerListener(new ContentManagerAdapter() {
        @Override
        public void selectionChanged(ContentManagerEvent event) {
            if (event.getOperation() == ContentManagerEvent.ContentOperation.add) {
                viewSelectionChanged();
            }
        }
    });
}