Search in sources :

Example 1 with CliProjectsCreator

use of org.eclipse.xtext.xtext.wizard.cli.CliProjectsCreator in project xtext-core by eclipse.

the class CliWizardIntegrationTest method newProjectCreator.

private static CliProjectsCreator newProjectCreator() {
    CliProjectsCreator _cliProjectsCreator = new CliProjectsCreator();
    final Procedure1<CliProjectsCreator> _function = (CliProjectsCreator it) -> {
        it.setLineDelimiter("\n");
    };
    return ObjectExtensions.<CliProjectsCreator>operator_doubleArrow(_cliProjectsCreator, _function);
}
Also used : CliProjectsCreator(org.eclipse.xtext.xtext.wizard.cli.CliProjectsCreator)

Example 2 with CliProjectsCreator

use of org.eclipse.xtext.xtext.wizard.cli.CliProjectsCreator in project xtext-core by eclipse.

the class CliWizardIntegrationTest method main.

/**
 * Use this main method to update the expectations to whatever the wizard currently generates
 */
public static void main(final String[] args) {
    final CliProjectsCreator creator = CliWizardIntegrationTest.newProjectCreator();
    final Consumer<WizardConfiguration> _function = (WizardConfiguration config) -> {
        try {
            String _baseName = config.getBaseName();
            final File targetLocation = new File("testdata/wizard-expectations", _baseName);
            targetLocation.mkdirs();
            Files.sweepFolder(targetLocation);
            config.setRootLocation(targetLocation.getPath());
            creator.createProjects(config);
            String _baseName_1 = config.getBaseName();
            String _plus = ("Updating expectations for " + _baseName_1);
            InputOutput.<String>println(_plus);
        } catch (Throwable _e) {
            throw Exceptions.sneakyThrow(_e);
        }
    };
    CliWizardIntegrationTest.projectConfigs.forEach(_function);
}
Also used : CliProjectsCreator(org.eclipse.xtext.xtext.wizard.cli.CliProjectsCreator) WizardConfiguration(org.eclipse.xtext.xtext.wizard.WizardConfiguration) File(java.io.File)

Aggregations

CliProjectsCreator (org.eclipse.xtext.xtext.wizard.cli.CliProjectsCreator)2 File (java.io.File)1 WizardConfiguration (org.eclipse.xtext.xtext.wizard.WizardConfiguration)1