Package com.intellij.ui.content

Examples of com.intellij.ui.content.Content


    registerKarmaServerTab(ui);
  }

  private void registerTestRunTab(@NotNull RunnerLayoutUi ui) {
    ui.getOptions().setMinimizeActionEnabled(false);
    Content consoleContent = ui.createContent(ExecutionConsole.CONSOLE_CONTENT_ID,
                                              getComponent(),
                                              myStatus != null ? "Coverage Configuration Error" : "Test Run",
                                              AllIcons.Debugger.Console,
                                              getPreferredFocusableComponent());
    ui.addContent(consoleContent, 1, PlaceInGrid.bottom, false);
    consoleContent.setCloseable(false);
    ui.selectAndFocus(consoleContent, false, false);
  }
View Full Code Here


  }

  @NotNull
  private Content registerConsoleContent(@NotNull final RunnerLayoutUi ui) {
    ui.getOptions().setMinimizeActionEnabled(false);
    final Content consoleContent = ui.createContent(ExecutionConsole.CONSOLE_CONTENT_ID,
                                                    getComponent(),
                                                    "Test Run",
                                                    AllIcons.Debugger.Console,
                                                    getPreferredFocusableComponent());
    ui.addContent(consoleContent, 1, PlaceInGrid.bottom, false);

    consoleContent.setCloseable(false);
    final KarmaRootTestProxyFormatter rootFormatter = new KarmaRootTestProxyFormatter(this,
                                                                                      myServer,
                                                                                      myExecutionSession.isDebug());
    if (myServer.areBrowsersReady()) {
      KarmaUtil.selectAndFocusIfNotDisposed(ui, consoleContent, false, false);
View Full Code Here

  public void setAvailable(boolean available) {
    if (available) {
      if (myContentManager.getContentCount() == 0) {
        JstdToolWindowSession session = new JstdToolWindowSession(myProject);
        myCurrentSession = session;
        Content content = myContentManager.getFactory().createContent(session.getComponent(), null, true);
        content.setCloseable(true);
        myContentManager.addContent(content);
      }
    }
    else {
      myContentManager.removeAllContents(true);
View Full Code Here

    myMessagesTab.append("a");
    assertTrue(myMessagesTab.getSendButton().isEnabled());
  }

  public void testContent() throws Exception {
    Content content = new ContentImpl(new JLabel(), "text", true);
    myMessagesTab.attachTo(content);
    assertSame(myMessagesTab, MessagesTab.getTab(content));
    assertSame(content, myMessagesTab.getContent());
  }
View Full Code Here

            if (hint != null) {
              component = (DocumentationComponent)((AbstractPopup)hint).getComponent();
            }
            else if (documentationManager.hasActiveDockedDocWindow()) {
              ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(ToolWindowId.DOCUMENTATION);
              Content selectedContent = toolWindow == null? null : toolWindow.getContentManager().getSelectedContent();
              component = selectedContent == null ? null : (DocumentationComponent)selectedContent.getComponent();
            }
            else {
              component = null;
            }
            PsiElement docElement = component == null? null : ObjectUtils.chooseNotNull(component.getElement(), element);
View Full Code Here

    public XDebugTabLayouter createTabLayouter() {
        return new XDebugTabLayouter() {
            @Override
            public void registerAdditionalContent(@NotNull RunnerLayoutUi ui) {

                Content gdbConsoleContent = ui.createContent("GdbRawConsoleContent",
                        m_gdbRawConsole.getComponent(), "GDB RAW Output", AllIcons.Debugger.ToolConsole,
                        m_gdbRawConsole.getPreferredFocusableComponent());
                gdbConsoleContent.setCloseable(false);

                ui.addContent(gdbConsoleContent, 3, PlaceInGrid.bottom, false);

                gdbConsoleContent = ui.createContent("GdbConsoleContent",
                        m_gdbConsole.getComponent(), "GDB Console", AllIcons.Debugger.Console,
                        m_gdbConsole.getPreferredFocusableComponent());
                gdbConsoleContent.setCloseable(false);

                // Create the actions
                final DefaultActionGroup consoleActions = new DefaultActionGroup();
                AnAction[] actions = m_gdbConsole.getConsole().createConsoleActions();
                for (AnAction action : actions) {
                    consoleActions.add(action);
                }
                gdbConsoleContent.setActions(consoleActions, ActionPlaces.DEBUGGER_TOOLBAR,
                        m_gdbConsole.getConsole().getPreferredFocusableComponent());

                ui.addContent(gdbConsoleContent, 2, PlaceInGrid.bottom, false);
            }
        };
View Full Code Here

        ToolWindow window = manager.getToolWindow(ID);

        if (window == null) {
            window = manager.registerToolWindow(ID, false, ToolWindowAnchor.BOTTOM);
            ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
            Content content = contentFactory.createContent(consoleView.getComponent(), "", false);
            window.getContentManager().addContent(content);
            window.setIcon(GoIcons.GAE_ICON_13x13);
            window.setToHideOnEmptyContent(true);
            window.setTitle(TITLE);
        }
View Full Code Here

                if (window == null) {
                    window = manager.registerToolWindow(GoCommonConsoleView.ID, false, ToolWindowAnchor.BOTTOM);

                    ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
                    Content content = contentFactory.createContent(consoleView.getComponent(), "", false);
                    window.getContentManager().addContent(content);
                    window.setIcon(GoSdkUtil.getProjectIcon(sdk));
                    window.setToHideOnEmptyContent(true);
                }
                window.setTitle(TITLE);
View Full Code Here

    public void initGoToolWindow(final ToolWindow window) {
        window.setToHideOnEmptyContent(true);
        this.window = window;

        ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
        Content content = contentFactory.createContent(consoleViewImpl.getComponent(), "", false);
        window.getContentManager().addContent(content);
    }
View Full Code Here

        if (window == null) {
            window = manager.registerToolWindow(GoCommonConsoleView.ID, false, ToolWindowAnchor.BOTTOM);

            ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
            Content content = contentFactory.createContent(consoleView.getComponent(), "", false);
            window.getContentManager().addContent(content);
            window.setIcon(GoSdkUtil.getProjectIcon(sdk));
            window.setToHideOnEmptyContent(true);
        }
        window.setTitle(TITLE);
View Full Code Here

TOP

Related Classes of com.intellij.ui.content.Content

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.