use of org.eclipse.che.ide.ui.multisplitpanel.WidgetToShow in project che by eclipse.
the class SubPanelViewImpl method onTabDoubleClicked.
@Override
public void onTabDoubleClicked(Tab tab) {
final WidgetToShow widget = tabs2Widgets.get(tab);
if (widget != null) {
activateWidget(widget);
delegate.onWidgetDoubleClicked(widget.getWidget());
}
}
use of org.eclipse.che.ide.ui.multisplitpanel.WidgetToShow in project che by eclipse.
the class ProcessesPanelViewImpl method addWidget.
@Override
public void addWidget(final String processId, final String title, final SVGResource icon, final IsWidget widget, final boolean machineConsole) {
final WidgetToShow widgetToShow = new WidgetToShow() {
@Override
public IsWidget getWidget() {
return widget;
}
@Override
public String getTitle() {
return title;
}
@Override
public SVGResource getIcon() {
return icon;
}
};
widget2Panels.put(widgetToShow, focusedSubPanel);
focusedSubPanel.addWidget(widgetToShow, !machineConsole, new SubPanel.WidgetRemovingListener() {
@Override
public void onWidgetRemoving(SubPanel.RemoveCallback removeCallback) {
final ProcessTreeNode treeNode = widget2TreeNodes.get(widgetToShow.getWidget());
if (treeNode == null) {
return;
}
switch(treeNode.getType()) {
case COMMAND_NODE:
delegate.onCommandTabClosing(treeNode, removeCallback);
break;
case TERMINAL_NODE:
delegate.onTerminalTabClosing(treeNode);
removeCallback.remove();
break;
case MACHINE_NODE:
removeCallback.remove();
break;
}
}
});
processWidgets.put(processId, widgetToShow);
widget2TreeNodes.put(widgetToShow.getWidget(), processTreeNodes.get(processId));
showProcessOutput(processId);
}
use of org.eclipse.che.ide.ui.multisplitpanel.WidgetToShow in project che by eclipse.
the class ProcessesPanelViewImpl method hideProcessOutput.
@Override
public void hideProcessOutput(String processId) {
final WidgetToShow widgetToShow = processWidgets.get(processId);
final SubPanel subPanel = widget2Panels.get(widgetToShow);
if (subPanel != null) {
subPanel.removeWidget(widgetToShow);
}
processWidgets.remove(processId);
}
Aggregations