Java Code Examples for com.intellij.openapi.ui.SimpleToolWindowPanel#getComponent()

The following examples show how to use com.intellij.openapi.ui.SimpleToolWindowPanel#getComponent() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DuneCompiler.java    From reasonml-idea-plugin with MIT License 6 votes vote down vote up
@Nullable
@Override
public ConsoleView getConsoleView() {
    ORToolWindowProvider windowProvider = ORToolWindowProvider.getInstance(project);
    ToolWindow duneToolWindow = windowProvider.getDuneToolWindow();
    Content windowContent = duneToolWindow.getContentManager().getContent(0);
    if (windowContent == null) {
        return null;
    }
    SimpleToolWindowPanel component = (SimpleToolWindowPanel) windowContent.getComponent();
    JComponent panelComponent = component.getComponent();
    if (panelComponent == null) {
        return null;
    }
    return (ConsoleView) panelComponent.getComponent(0);
}
 
Example 2
Source File: BsCompilerImpl.java    From reasonml-idea-plugin with MIT License 5 votes vote down vote up
@Nullable
@Override
public ConsoleView getConsoleView() {
    ORToolWindowProvider windowProvider = ORToolWindowProvider.getInstance(m_project);
    ToolWindow bsToolWindow = windowProvider.getBsToolWindow();
    Content windowContent = bsToolWindow == null ? null : bsToolWindow.getContentManager().getContent(0);
    if (windowContent == null) {
        return null;
    }

    SimpleToolWindowPanel component = (SimpleToolWindowPanel) windowContent.getComponent();
    JComponent panelComponent = component.getComponent();
    return panelComponent == null ? null : (ConsoleView) panelComponent.getComponent(0);
}
 
Example 3
Source File: EsyCompiler.java    From reasonml-idea-plugin with MIT License 5 votes vote down vote up
@Override
public ConsoleView getConsoleView() {
    ORToolWindowProvider windowProvider = ORToolWindowProvider.getInstance(m_project);
    ToolWindow esyToolWindow = windowProvider.getEsyToolWindow();
    Content windowContent = esyToolWindow.getContentManager().getContent(0);
    if (windowContent == null) {
        return null;
    }
    SimpleToolWindowPanel component = (SimpleToolWindowPanel) windowContent.getComponent();
    JComponent panelComponent = component.getComponent();
    if (panelComponent == null) {
        return null;
    }
    return (ConsoleView) panelComponent.getComponent(0);
}