Example usage for org.springframework.ide.eclipse.boot.wizard.content CodeSet createAt

List of usage examples for org.springframework.ide.eclipse.boot.wizard.content CodeSet createAt

Introduction

In this page you can find the example usage for org.springframework.ide.eclipse.boot.wizard.content CodeSet createAt.

Prototype

public void createAt(final File location) throws Exception 

Source Link

Document

Copies the contents of codeset to a given filesystem location

Usage

From source file:org.springframework.ide.eclipse.gradle.GradleImportStrategy.java

private static SampleProject asSample(final String projectName, final CodeSet codeset) {
    return new SampleProject() {
        @Override// w ww  .  ja  v a2  s.  c om
        public String getName() {
            //Probably nobody cares about the name but anyway...
            return projectName;
        }

        @Override
        public void createAt(final File location) throws CoreException {
            if (location.exists()) {
                //Delete anything that is in the way
                FileUtils.deleteQuietly(location);
            }
            try {
                codeset.createAt(location);
            } catch (Throwable e) {
                throw ExceptionUtil.coreException(e);
            }
        }
    };
}