Search in sources :

Example 1 with ToolWindowImpl

use of com.intellij.openapi.wm.impl.ToolWindowImpl in project intellij-community by JetBrains.

the class ExternalSystemUtil method ensureToolWindowContentInitialized.

@Nullable
public static ToolWindow ensureToolWindowContentInitialized(@NotNull Project project, @NotNull ProjectSystemId externalSystemId) {
    final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);
    if (toolWindowManager == null)
        return null;
    final ToolWindow toolWindow = toolWindowManager.getToolWindow(externalSystemId.getReadableName());
    if (toolWindow == null)
        return null;
    if (toolWindow instanceof ToolWindowImpl) {
        ((ToolWindowImpl) toolWindow).ensureContentInitialized();
    }
    return toolWindow;
}
Also used : ToolWindow(com.intellij.openapi.wm.ToolWindow) ToolWindowImpl(com.intellij.openapi.wm.impl.ToolWindowImpl) ToolWindowManager(com.intellij.openapi.wm.ToolWindowManager) Nullable(org.jetbrains.annotations.Nullable)

Example 2 with ToolWindowImpl

use of com.intellij.openapi.wm.impl.ToolWindowImpl in project intellij-community by JetBrains.

the class ExternalToolWindowManager method getToolWindow.

@Nullable
private static ToolWindow getToolWindow(@NotNull Project project, @NotNull ProjectSystemId externalSystemId) {
    final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);
    if (toolWindowManager == null) {
        return null;
    }
    ToolWindow result = toolWindowManager.getToolWindow(externalSystemId.getReadableName());
    if (result instanceof ToolWindowImpl) {
        ((ToolWindowImpl) result).ensureContentInitialized();
    }
    return result;
}
Also used : ToolWindow(com.intellij.openapi.wm.ToolWindow) ToolWindowImpl(com.intellij.openapi.wm.impl.ToolWindowImpl) ToolWindowManager(com.intellij.openapi.wm.ToolWindowManager) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

ToolWindow (com.intellij.openapi.wm.ToolWindow)2 ToolWindowManager (com.intellij.openapi.wm.ToolWindowManager)2 ToolWindowImpl (com.intellij.openapi.wm.impl.ToolWindowImpl)2 Nullable (org.jetbrains.annotations.Nullable)2