Package at.bestsolution.efxclipse.tooling.pde.ui.templates

Examples of at.bestsolution.efxclipse.tooling.pde.ui.templates.JUnitLaunchDef


import org.eclipse.xtext.xbase.lib.IterableExtensions;

@SuppressWarnings("all")
public class JemmyFeatureLaunchGenerator implements Generator<DynamicFile> {
  public InputStream generate(final DynamicFile file, final Map<String,Object> data) {
    JUnitLaunchDef _jUnitLaunchDef = new JUnitLaunchDef();
    final JUnitLaunchDef launchDef = _jUnitLaunchDef;
    EList<Variable> _variables = file.getVariables();
    final Function1<Variable,Boolean> _function = new Function1<Variable,Boolean>() {
        public Boolean apply(final Variable e) {
          String _key = e.getKey();
          boolean _equals = _key.equals("projectName");
          return Boolean.valueOf(_equals);
        }
      };
    Variable _findFirst = IterableExtensions.<Variable>findFirst(_variables, _function);
    String _defaultValue = _findFirst.getDefaultValue();
    launchDef.setProjectName(_defaultValue);
    EList<Variable> _variables_1 = file.getVariables();
    final Function1<Variable,Boolean> _function_1 = new Function1<Variable,Boolean>() {
        public Boolean apply(final Variable e) {
          String _key = e.getKey();
          boolean _equals = _key.equals("testSuite");
          return Boolean.valueOf(_equals);
        }
      };
    Variable _findFirst_1 = IterableExtensions.<Variable>findFirst(_variables_1, _function_1);
    String _defaultValue_1 = _findFirst_1.getDefaultValue();
    launchDef.setJunitClassName(_defaultValue_1);
    EList<Variable> _variables_2 = file.getVariables();
    final Function1<Variable,Boolean> _function_2 = new Function1<Variable,Boolean>() {
        public Boolean apply(final Variable e) {
          String _key = e.getKey();
          boolean _equals = _key.equals("testProductId");
          return Boolean.valueOf(_equals);
        }
      };
    Variable _findFirst_2 = IterableExtensions.<Variable>findFirst(_variables_2, _function_2);
    String _defaultValue_2 = _findFirst_2.getDefaultValue();
    launchDef.setTestProductId(_defaultValue_2);
    EList<Variable> _variables_3 = file.getVariables();
    final Function1<Variable,Boolean> _function_3 = new Function1<Variable,Boolean>() {
        public Boolean apply(final Variable e) {
          String _key = e.getKey();
          boolean _equals = _key.equals("featureList");
          return Boolean.valueOf(_equals);
        }
      };
    Variable _findFirst_3 = IterableExtensions.<Variable>findFirst(_variables_3, _function_3);
    String _defaultValue_3 = _findFirst_3.getDefaultValue();
    final String[] vals = _defaultValue_3.split(",");
    for (final String v : vals) {
      Set<LaunchFeature> _features = launchDef.getFeatures();
      LaunchFeature _launchFeature = new LaunchFeature(v);
      _features.add(_launchFeature);
    }
    CharSequence _generate = this.generate(launchDef);
    String _string = _generate.toString();
View Full Code Here

TOP

Related Classes of at.bestsolution.efxclipse.tooling.pde.ui.templates.JUnitLaunchDef

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.