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());
}
}
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();
}
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);
}
}
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());
}
}
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", "");
}
Aggregations