Search in sources :

Example 1 with WidgetToShow

use of org.eclipse.che.ide.ui.multisplitpanel.WidgetToShow in project che by eclipse.

the class ProcessesPanelViewImpl method showProcessOutput.

@Override
public void showProcessOutput(String processId) {
    if (!processWidgets.containsKey(processId)) {
        processId = "";
    }
    onResize();
    final WidgetToShow widgetToShow = processWidgets.get(processId);
    final SubPanel subPanel = widget2Panels.get(widgetToShow);
    if (subPanel != null) {
        subPanel.activateWidget(widgetToShow);
    }
    activeProcessId = processId;
    final ProcessTreeNode treeNode = processTreeNodes.get(processId);
    if (treeNode != null && !MACHINE_NODE.equals(treeNode.getType())) {
        treeNode.setHasUnreadContent(false);
        treeNode.getTreeNodeElement().getClassList().remove(machineResources.getCss().badgeVisible());
    }
}
Also used : WidgetToShow(org.eclipse.che.ide.ui.multisplitpanel.WidgetToShow) ProcessTreeNode(org.eclipse.che.ide.extension.machine.client.processes.ProcessTreeNode) SubPanel(org.eclipse.che.ide.ui.multisplitpanel.SubPanel)

Example 2 with WidgetToShow

use of org.eclipse.che.ide.ui.multisplitpanel.WidgetToShow in project che by eclipse.

the class ProcessesPanelViewImpl method clear.

@Override
public void clear() {
    for (WidgetToShow widgetToShow : processWidgets.values()) {
        SubPanel subPanel = widget2Panels.get(widgetToShow);
        subPanel.removeWidget(widgetToShow);
    }
    processWidgets.clear();
}
Also used : WidgetToShow(org.eclipse.che.ide.ui.multisplitpanel.WidgetToShow) SubPanel(org.eclipse.che.ide.ui.multisplitpanel.SubPanel)

Example 3 with WidgetToShow

use of org.eclipse.che.ide.ui.multisplitpanel.WidgetToShow in project che by eclipse.

the class SubPanelViewImpl method onMenuItemSelected.

@Override
public void onMenuItemSelected(MenuItem menuItem) {
    final Object data = menuItem.getData();
    if (data instanceof Tab) {
        final WidgetToShow widget = tabs2Widgets.get(data);
        if (widget != null) {
            activateWidget(widget);
            delegate.onWidgetFocused(widget.getWidget());
        }
    } else if (data instanceof Action) {
        ((Action) data).actionPerformed(null);
    }
}
Also used : RemoveAllWidgetsInPaneAction(org.eclipse.che.ide.ui.multisplitpanel.actions.RemoveAllWidgetsInPaneAction) SplitHorizontallyAction(org.eclipse.che.ide.ui.multisplitpanel.actions.SplitHorizontallyAction) Action(org.eclipse.che.ide.api.action.Action) ClosePaneAction(org.eclipse.che.ide.ui.multisplitpanel.actions.ClosePaneAction) SplitVerticallyAction(org.eclipse.che.ide.ui.multisplitpanel.actions.SplitVerticallyAction) Tab(org.eclipse.che.ide.ui.multisplitpanel.tab.Tab) WidgetToShow(org.eclipse.che.ide.ui.multisplitpanel.WidgetToShow)

Example 4 with WidgetToShow

use of org.eclipse.che.ide.ui.multisplitpanel.WidgetToShow in project che by eclipse.

the class SubPanelViewImpl method onTabClicked.

@Override
public void onTabClicked(Tab tab) {
    final WidgetToShow widget = tabs2Widgets.get(tab);
    if (widget != null) {
        activateWidget(widget);
        delegate.onWidgetFocused(widget.getWidget());
    }
}
Also used : WidgetToShow(org.eclipse.che.ide.ui.multisplitpanel.WidgetToShow)

Example 5 with WidgetToShow

use of org.eclipse.che.ide.ui.multisplitpanel.WidgetToShow in project che by eclipse.

the class SubPanelViewImpl method activateWidget.

@Override
public void activateWidget(WidgetToShow widget) {
    final Tab tab = widgets2Tabs.get(widget);
    if (tab != null) {
        selectTab(tab);
    }
    widgetsPanel.showWidget(widget.getWidget().asWidget());
    // add 'active' attribute for active widget for testing purpose
    for (WidgetToShow widgetToShow : widgets2Tabs.keySet()) {
        widgetToShow.getWidget().asWidget().getElement().removeAttribute("active");
    }
    widget.getWidget().asWidget().getElement().setAttribute("active", "");
}
Also used : Tab(org.eclipse.che.ide.ui.multisplitpanel.tab.Tab) WidgetToShow(org.eclipse.che.ide.ui.multisplitpanel.WidgetToShow)

Aggregations

WidgetToShow (org.eclipse.che.ide.ui.multisplitpanel.WidgetToShow)8 SubPanel (org.eclipse.che.ide.ui.multisplitpanel.SubPanel)4 ProcessTreeNode (org.eclipse.che.ide.extension.machine.client.processes.ProcessTreeNode)2 Tab (org.eclipse.che.ide.ui.multisplitpanel.tab.Tab)2 Action (org.eclipse.che.ide.api.action.Action)1 ClosePaneAction (org.eclipse.che.ide.ui.multisplitpanel.actions.ClosePaneAction)1 RemoveAllWidgetsInPaneAction (org.eclipse.che.ide.ui.multisplitpanel.actions.RemoveAllWidgetsInPaneAction)1 SplitHorizontallyAction (org.eclipse.che.ide.ui.multisplitpanel.actions.SplitHorizontallyAction)1 SplitVerticallyAction (org.eclipse.che.ide.ui.multisplitpanel.actions.SplitVerticallyAction)1