Example usage for org.springframework.ide.eclipse.boot.dash.model UserInteractions errorPopup

List of usage examples for org.springframework.ide.eclipse.boot.dash.model UserInteractions errorPopup

Introduction

In this page you can find the example usage for org.springframework.ide.eclipse.boot.dash.model UserInteractions errorPopup.

Prototype

void errorPopup(String title, String message);

Source Link

Usage

From source file:org.springframework.ide.eclipse.boot.dash.cloudfoundry.CloudAppDashElement.java

public void pushAndDebug(CloudApplicationDeploymentProperties deploymentProperties, RunState runningOrDebugging,
        UserInteractions ui, CancelationToken cancelationToken, IProgressMonitor monitor) throws Exception {
    String opName = "Starting application '" + getName() + "' in "
            + (runningOrDebugging == RunState.DEBUGGING ? "DEBUG" : "RUN") + " mode";
    DebugSupport debugSupport = getDebugSupport();

    if (runningOrDebugging == RunState.DEBUGGING) {

        if (debugSupport != null && debugSupport.isSupported(this)) {
            Operation<?> debugOp = debugSupport.createOperation(this, opName, ui, cancelationToken);

            push(deploymentProperties, runningOrDebugging, debugSupport, cancelationToken, ui, monitor);
            debugOp.run(monitor);//from   www .j av  a 2s. c o m
        } else {
            String title = "Debugging is not supported for '" + getName() + "'";
            String msg = debugSupport.getNotSupportedMessage(this);
            if (msg == null) {
                msg = title;
            }
            ui.errorPopup(title, msg);
            throw ExceptionUtil.coreException(msg);
        }
    } else {
        push(deploymentProperties, runningOrDebugging, debugSupport, cancelationToken, ui, monitor);
    }
}

From source file:org.springframework.ide.eclipse.boot.dash.model.LaunchConfDashElement.java

@Override
public void delete(UserInteractions ui) {
    try {/*www.  java  2  s  .  co  m*/
        delegate.delete();
    } catch (Exception e) {
        BootDashActivator.log(e);
        ui.errorPopup("Could not delete: '" + getName() + "'", ExceptionUtil.getMessage(e));
    }
}