use of com.intellij.openapi.wm.ToolWindow 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;
}
use of com.intellij.openapi.wm.ToolWindow in project intellij-community by JetBrains.
the class RunDashboardManagerImpl method updateDashboard.
private void updateDashboard(final boolean withStructure) {
final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(myProject);
toolWindowManager.invokeLater(() -> {
if (myProject.isDisposed()) {
return;
}
if (withStructure) {
boolean available = hasContent();
ToolWindow toolWindow = toolWindowManager.getToolWindow(getToolWindowId());
if (toolWindow == null) {
if (available) {
createToolWindow();
}
return;
}
boolean doShow = !toolWindow.isAvailable() && available;
toolWindow.setAvailable(available, null);
if (doShow) {
toolWindow.show(null);
}
}
if (myDashboardContent != null) {
myDashboardContent.updateContent(withStructure);
}
});
}
use of com.intellij.openapi.wm.ToolWindow in project intellij-community by JetBrains.
the class ExecutionHelper method descriptorToFront.
private static void descriptorToFront(@NotNull final Project project, @NotNull final RunContentDescriptor descriptor) {
ApplicationManager.getApplication().invokeLater(() -> {
RunContentManager manager = ExecutionManager.getInstance(project).getContentManager();
ToolWindow toolWindow = manager.getToolWindowByDescriptor(descriptor);
if (toolWindow != null) {
toolWindow.show(null);
manager.selectRunContent(descriptor);
}
}, project.getDisposed());
}
use of com.intellij.openapi.wm.ToolWindow in project intellij-community by JetBrains.
the class RunDashboardManagerImpl method createToolWindow.
private void createToolWindow() {
ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(myProject);
ToolWindow toolWindow = toolWindowManager.registerToolWindow(getToolWindowId(), false, ToolWindowAnchor.BOTTOM, myProject, true);
toolWindow.setIcon(getToolWindowIcon());
createToolWindowContent(toolWindow);
}
use of com.intellij.openapi.wm.ToolWindow in project intellij-community by JetBrains.
the class StructureViewWrapperImpl method isStructureViewShowing.
protected boolean isStructureViewShowing() {
ToolWindowManager windowManager = ToolWindowManager.getInstance(myProject);
ToolWindow toolWindow = windowManager.getToolWindow(ToolWindowId.STRUCTURE_VIEW);
// it means that window is registered
return toolWindow != null && toolWindow.isVisible();
}
Aggregations