Example usage for org.springframework.ide.eclipse.boot.core BootPropertyTester isBootProject

List of usage examples for org.springframework.ide.eclipse.boot.core BootPropertyTester isBootProject

Introduction

In this page you can find the example usage for org.springframework.ide.eclipse.boot.core BootPropertyTester isBootProject.

Prototype

public static boolean isBootProject(IClasspathEntry e) 

Source Link

Usage

From source file:org.springframework.ide.eclipse.boot.ui.EnableDisableBootDevtools.java

private String explainFailure() throws Exception {
    if (project == null) {
        return "No project selected";
    } else if (!BootPropertyTester.isBootProject(project)) {
        return "Project '" + project.getProject().getName() + "' does not seem to be a Spring Boot project";
    } else if (!project.hasNature(SpringBootCore.M2E_NATURE)) {
        return "Project '" + project.getProject().getName()
                + "' is not an Maven/m2e enabled project. This action's implementation requires m2e to add/remove "
                + "the Devtools as a dependency to your project.";
    } else {//from   w ww .  j av a 2s.com
        String version = bootProject.getBootVersion();
        return "Boot Devtools are provided by Spring Boot version 1.3.0 or later. " + "Project '"
                + project.getProject().getName() + "' uses Boot Version " + version;
    }
}