use of com.intellij.ui.content.Content in project android by JetBrains.
the class CaptureEditorLightToolWindowManager method initToolWindow.
@Override
protected void initToolWindow() {
myToolWindow = ToolWindowManager.getInstance(myProject).registerToolWindow(getManagerName(), false, getAnchor(), myProject, true);
myToolWindow.setIcon(getIcon());
if (!ApplicationManager.getApplication().isHeadlessEnvironment()) {
myToolWindow.getComponent().putClientProperty(ToolWindowContentUi.HIDE_ID_LABEL, "true");
}
((ToolWindowEx) myToolWindow).setTitleActions(createActions());
initGearActions();
ContentManager contentManager = myToolWindow.getContentManager();
Content content = contentManager.getFactory().createContent(getContent(), getToolWindowTitleBarText(), false);
content.setCloseable(false);
content.setPreferredFocusableComponent(getFocusedComponent());
contentManager.addContent(content);
contentManager.setSelectedContent(content, true);
myToolWindow.setAvailable(false, null);
}
use of com.intellij.ui.content.Content in project buck by facebook.
the class BuckToolWindowFactory method createToolWindowContent.
@Override
public void createToolWindowContent(final Project project, ToolWindow toolWindow) {
toolWindow.setAvailable(true, null);
toolWindow.setToHideOnEmptyContent(true);
toolWindow.setIcon(BuckIcons.BUCK_TOOL_WINDOW_ICON);
RunnerLayoutUi runnerLayoutUi = BuckUIManager.getInstance(project).getLayoutUi(project);
BuckSettingsProvider.State state = BuckSettingsProvider.getInstance().getState();
JBTabs myTabs = new JBTabsImpl(project);
// Debug Console
if (state.showDebug) {
Content consoleContent = createConsoleContent(runnerLayoutUi, project);
myTabs.addTab(new TabInfo(consoleContent.getComponent())).setText("Debug");
}
// Build Tree Events
Content treeViewContent = runnerLayoutUi.createContent(BUILD_OUTPUT_PANEL, createBuildInfoPanel(project), "Build Output", null, null);
myTabs.addTab(new TabInfo(treeViewContent.getComponent()).setText("Build"));
Content tabsContent = runnerLayoutUi.createContent(TABS_CONTENT_ID, myTabs.getComponent(), "Buck Tool Tabs", null, null);
runnerLayoutUi.addContent(tabsContent, 0, PlaceInGrid.center, false);
runnerLayoutUi.getOptions().setLeftToolbar(getLeftToolbarActions(project), ActionPlaces.UNKNOWN);
runnerLayoutUi.updateActionsNow();
final ContentManager contentManager = toolWindow.getContentManager();
Content content = contentManager.getFactory().createContent(runnerLayoutUi.getComponent(), "", true);
contentManager.addContent(content);
updateBuckToolWindowTitle(project);
}
use of com.intellij.ui.content.Content in project buck by facebook.
the class BuckToolWindowFactory method createConsoleContent.
private Content createConsoleContent(RunnerLayoutUi layoutUi, Project project) {
ConsoleView consoleView = BuckUIManager.getInstance(project).getConsoleWindow(project);
Content consoleWindowContent = layoutUi.createContent(OUTPUT_WINDOW_CONTENT_ID, consoleView.getComponent(), "Output Logs", null, null);
consoleWindowContent.setCloseable(false);
return consoleWindowContent;
}
use of com.intellij.ui.content.Content in project AndroidWiFiADB by pedrovgs.
the class AndroidWiFiADBWindow method createToolWindowContent.
private void createToolWindowContent(ToolWindow toolWindow) {
ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
Content content = contentFactory.createContent(toolWindowContent, "", false);
toolWindow.getContentManager().addContent(content);
}
use of com.intellij.ui.content.Content in project android by JetBrains.
the class AssistToolWindowFactory method createToolWindowContent.
@Override
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
if (myAssistSidePanel == null) {
myAssistSidePanel = new AssistSidePanel(myActionId, project);
}
ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
Content content = contentFactory.createContent(myAssistSidePanel, null, false);
ContentManager contentManager = toolWindow.getContentManager();
contentManager.removeAllContents(true);
contentManager.addContent(content);
contentManager.setSelectedContent(content);
toolWindow.show(null);
}
Aggregations