Example usage for org.springframework.ide.eclipse.boot.dash.cloudfoundry.debug DebugSupport getNotSupportedMessage

List of usage examples for org.springframework.ide.eclipse.boot.dash.cloudfoundry.debug DebugSupport getNotSupportedMessage

Introduction

In this page you can find the example usage for org.springframework.ide.eclipse.boot.dash.cloudfoundry.debug DebugSupport getNotSupportedMessage.

Prototype

public abstract String getNotSupportedMessage(CloudAppDashElement app);

Source Link

Document

If isSupported returns false than the support strategy may also return an explanation why the strategy is not supported (e.g.

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   w ww . ja  va 2 s . 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);
    }
}