Search in sources :

Example 1 with CommandOutputConsolePresenter

use of org.eclipse.che.ide.extension.machine.client.outputspanel.console.CommandOutputConsolePresenter in project che by eclipse.

the class ReRunProcessAction method updateInPerspective.

@Override
public void updateInPerspective(ActionEvent event) {
    ProcessTreeNode processTreeNode = processesPanelPresenter.getContextTreeNode();
    if (processTreeNode == null) {
        event.getPresentation().setEnabled(false);
        event.getPresentation().setVisible(false);
        return;
    }
    if (processesPanelPresenter.getContextOutputConsole() instanceof CommandOutputConsolePresenter) {
        event.getPresentation().setEnabled(true);
        event.getPresentation().setVisible(true);
        return;
    }
    event.getPresentation().setEnabled(false);
    event.getPresentation().setVisible(false);
}
Also used : CommandOutputConsolePresenter(org.eclipse.che.ide.extension.machine.client.outputspanel.console.CommandOutputConsolePresenter) ProcessTreeNode(org.eclipse.che.ide.extension.machine.client.processes.ProcessTreeNode)

Example 2 with CommandOutputConsolePresenter

use of org.eclipse.che.ide.extension.machine.client.outputspanel.console.CommandOutputConsolePresenter in project che by eclipse.

the class StopProcessAction method updateInPerspective.

@Override
public void updateInPerspective(ActionEvent event) {
    ProcessTreeNode processTreeNode = processesPanelPresenter.getContextTreeNode();
    if (processTreeNode == null) {
        event.getPresentation().setEnabled(false);
        event.getPresentation().setVisible(false);
        return;
    }
    if (processesPanelPresenter.getContextOutputConsole() instanceof CommandOutputConsolePresenter && !processesPanelPresenter.getContextOutputConsole().isFinished()) {
        event.getPresentation().setEnabled(true);
        event.getPresentation().setVisible(true);
        return;
    }
    event.getPresentation().setEnabled(false);
    event.getPresentation().setVisible(false);
}
Also used : CommandOutputConsolePresenter(org.eclipse.che.ide.extension.machine.client.outputspanel.console.CommandOutputConsolePresenter) ProcessTreeNode(org.eclipse.che.ide.extension.machine.client.processes.ProcessTreeNode)

Example 3 with CommandOutputConsolePresenter

use of org.eclipse.che.ide.extension.machine.client.outputspanel.console.CommandOutputConsolePresenter in project che by eclipse.

the class StopProcessAction method actionPerformed.

@Override
public void actionPerformed(ActionEvent e) {
    OutputConsole outputConsole = processesPanelPresenter.getContextOutputConsole();
    if (outputConsole != null && outputConsole instanceof CommandOutputConsolePresenter) {
        CommandOutputConsolePresenter commandOutputConsolePresenter = (CommandOutputConsolePresenter) outputConsole;
        commandOutputConsolePresenter.stopProcessButtonClicked();
    }
}
Also used : OutputConsole(org.eclipse.che.ide.api.outputconsole.OutputConsole) CommandOutputConsolePresenter(org.eclipse.che.ide.extension.machine.client.outputspanel.console.CommandOutputConsolePresenter)

Example 4 with CommandOutputConsolePresenter

use of org.eclipse.che.ide.extension.machine.client.outputspanel.console.CommandOutputConsolePresenter in project che by eclipse.

the class ReRunProcessAction method actionPerformed.

@Override
public void actionPerformed(ActionEvent e) {
    OutputConsole outputConsole = processesPanelPresenter.getContextOutputConsole();
    if (outputConsole != null && outputConsole instanceof CommandOutputConsolePresenter) {
        CommandOutputConsolePresenter commandOutputConsolePresenter = (CommandOutputConsolePresenter) outputConsole;
        commandOutputConsolePresenter.reRunProcessButtonClicked();
    }
}
Also used : OutputConsole(org.eclipse.che.ide.api.outputconsole.OutputConsole) CommandOutputConsolePresenter(org.eclipse.che.ide.extension.machine.client.outputspanel.console.CommandOutputConsolePresenter)

Aggregations

CommandOutputConsolePresenter (org.eclipse.che.ide.extension.machine.client.outputspanel.console.CommandOutputConsolePresenter)4 OutputConsole (org.eclipse.che.ide.api.outputconsole.OutputConsole)2 ProcessTreeNode (org.eclipse.che.ide.extension.machine.client.processes.ProcessTreeNode)2