Example usage for org.springframework.ide.eclipse.boot.wizard RadioInfo getValue

List of usage examples for org.springframework.ide.eclipse.boot.wizard RadioInfo getValue

Introduction

In this page you can find the example usage for org.springframework.ide.eclipse.boot.wizard RadioInfo getValue.

Prototype

public String getValue() 

Source Link

Usage

From source file:org.springframework.ide.eclipse.boot.wizard.NewSpringBootWizardModel.java

private LiveExpression<Boolean> createEnablementExp(final RadioGroup bootVersion, final Dependency dep) {
    try {/*  w  w w  .  j a  v  a  2 s .  co  m*/
        String versionRange = dep.getVersionRange();
        if (StringUtils.isNotBlank(versionRange)) {
            return new LiveExpression<Boolean>() {
                {
                    dependsOn(bootVersion.getSelection().selection);
                }

                @Override
                protected Boolean compute() {
                    RadioInfo radio = bootVersion.getValue();
                    if (radio != null) {
                        String versionString = radio.getValue();
                        return dep.isSupportedFor(versionString);
                    }
                    return true;
                }
            };
        }
    } catch (Exception e) {
        BootWizardActivator.log(e);
    }
    return LiveExpression.TRUE;
}