import org.eclipse.xtext.xbase.lib.IterableExtensions;
@SuppressWarnings("all")
public class FeatureLaunchGenerator implements Generator<DynamicFile> {
public InputStream generate(final DynamicFile file, final Map<String,Object> data) {
OSGiLaunchDef _oSGiLaunchDef = new OSGiLaunchDef();
final OSGiLaunchDef launchDef = _oSGiLaunchDef;
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);
Set<LaunchFeature> _features = launchDef.getFeatures();
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("feature");