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

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


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");
View Full Code Here


    }
   
    super.execute(project, model, monitor);
   
    IFile f = project.getFile(new Path(project.getName() + ".product.launch"));
    OSGiLaunchDef def = new OSGiLaunchDef();
    def.setProjectName(project.getName());
    def.getTargetPlugins().addAll(OSGiLaunchDef.getTargetDefinitions());
    def.getWorkbenchPlugins().add(new PluginLaunchDef(project.getName()));
    try {
      ByteArrayInputStream in = new ByteArrayInputStream(new OSGiAppLaunchGenerator().generate(def).toString().getBytes());
      f.create(in, true, monitor);
      in.close();
    } catch (CoreException e1) {
View Full Code Here

TOP

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

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.