Search in sources :

Example 61 with ContentManager

use of com.intellij.ui.content.ContentManager in project google-cloud-intellij by GoogleCloudPlatform.

the class GcsToolWindowFactory method createToolWindowContent.

@Override
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
    GcsToolWindowPanel gcsToolWindowPanel = new GcsToolWindowPanel(project);
    ContentManager contentManager = toolWindow.getContentManager();
    Content content = contentManager.getFactory().createContent(gcsToolWindowPanel, null, /*displayName*/
    false);
    contentManager.addContent(content);
}
Also used : Content(com.intellij.ui.content.Content) ContentManager(com.intellij.ui.content.ContentManager)

Example 62 with ContentManager

use of com.intellij.ui.content.ContentManager in project intellij-plugins by StepicOrg.

the class StudyToolWindowFactory method createToolWindowContent.

@Override
public void createToolWindowContent(@NotNull final Project project, @NotNull final ToolWindow toolWindow) {
    toolWindow.setIcon(AllStepikIcons.stepikLogoSmall);
    if (!StepikProjectManager.isStepikProject(project)) {
        logger.warn("Study Tool Window did not create");
        return;
    }
    final StudyToolWindow studyToolWindow = new StudyToolWindow();
    studyToolWindow.init(project);
    final ContentManager contentManager = toolWindow.getContentManager();
    final Content content = contentManager.getFactory().createContent(studyToolWindow, null, false);
    contentManager.addContent(content);
    Disposer.register(project, studyToolWindow);
    logger.info("Study Tool Window is created");
}
Also used : Content(com.intellij.ui.content.Content) ContentManager(com.intellij.ui.content.ContentManager)

Aggregations

ContentManager (com.intellij.ui.content.ContentManager)62 Content (com.intellij.ui.content.Content)45 ToolWindow (com.intellij.openapi.wm.ToolWindow)16 Project (com.intellij.openapi.project.Project)6 ToolWindowManager (com.intellij.openapi.wm.ToolWindowManager)5 RunnerLayoutUi (com.intellij.execution.ui.RunnerLayoutUi)4 ToolWindowEx (com.intellij.openapi.wm.ex.ToolWindowEx)4 ToolWindowManagerEx (com.intellij.openapi.wm.ex.ToolWindowManagerEx)4 ContentFactory (com.intellij.ui.content.ContentFactory)4 SimpleToolWindowPanel (com.intellij.openapi.ui.SimpleToolWindowPanel)3 ChangesViewContentManager (com.intellij.openapi.vcs.changes.ui.ChangesViewContentManager)3 ContentManagerEvent (com.intellij.ui.content.ContentManagerEvent)3 ConsoleView (com.intellij.execution.ui.ConsoleView)2 ExecutionConsole (com.intellij.execution.ui.ExecutionConsole)2 HierarchyBrowserBase (com.intellij.ide.hierarchy.HierarchyBrowserBase)2 Disposable (com.intellij.openapi.Disposable)2 ToolWindowManagerAdapter (com.intellij.openapi.wm.ex.ToolWindowManagerAdapter)2 ContentManagerAdapter (com.intellij.ui.content.ContentManagerAdapter)2 TabInfo (com.intellij.ui.tabs.TabInfo)2 FlutterApp (io.flutter.run.daemon.FlutterApp)2