Java Code Examples for org.eclipse.xtext.xtext.generator.model.project.IBundleProjectConfig#getManifest()

The following examples show how to use org.eclipse.xtext.xtext.generator.model.project.IBundleProjectConfig#getManifest() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SimpleProjectWizardFragment2.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public void generate() {
  if ((!this.generate)) {
    return;
  }
  IBundleProjectConfig _eclipsePlugin = this.getProjectConfig().getEclipsePlugin();
  ManifestAccess _manifest = null;
  if (_eclipsePlugin!=null) {
    _manifest=_eclipsePlugin.getManifest();
  }
  boolean _tripleNotEquals = (_manifest != null);
  if (_tripleNotEquals) {
    Set<String> _requiredBundles = this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles();
    Iterables.<String>addAll(_requiredBundles, Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("org.eclipse.ui", "org.eclipse.core.runtime", "org.eclipse.core.resources", "org.eclipse.ui.ide")));
  }
  GuiceModuleAccess.BindingFactory _bindingFactory = new GuiceModuleAccess.BindingFactory();
  TypeReference _typeReference = new TypeReference("org.eclipse.xtext.ui.wizard.IProjectCreator");
  String _projectCreatorClassName = this.getProjectCreatorClassName();
  TypeReference _typeReference_1 = new TypeReference(_projectCreatorClassName);
  _bindingFactory.addTypeToType(_typeReference, _typeReference_1).contributeTo(this.getLanguage().getEclipsePluginGenModule());
  IBundleProjectConfig _eclipsePlugin_1 = this.getProjectConfig().getEclipsePlugin();
  PluginXmlAccess _pluginXml = null;
  if (_eclipsePlugin_1!=null) {
    _pluginXml=_eclipsePlugin_1.getPluginXml();
  }
  boolean _tripleNotEquals_1 = (_pluginXml != null);
  if (_tripleNotEquals_1) {
    List<CharSequence> _entries = this.getProjectConfig().getEclipsePlugin().getPluginXml().getEntries();
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("<extension");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("point=\"org.eclipse.ui.newWizards\">");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("<wizard");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("category=\"org.eclipse.xtext.projectwiz\"");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("class=\"");
    TypeReference _eclipsePluginExecutableExtensionFactory = this._xtextGeneratorNaming.getEclipsePluginExecutableExtensionFactory(this.getGrammar());
    _builder.append(_eclipsePluginExecutableExtensionFactory, "\t\t");
    _builder.append(":");
    String _projectWizardClassName = this.getProjectWizardClassName();
    _builder.append(_projectWizardClassName, "\t\t");
    _builder.append("\"");
    _builder.newLineIfNotEmpty();
    _builder.append("\t\t");
    _builder.append("id=\"");
    String _projectWizardClassName_1 = this.getProjectWizardClassName();
    _builder.append(_projectWizardClassName_1, "\t\t");
    _builder.append("\"");
    _builder.newLineIfNotEmpty();
    _builder.append("\t\t");
    _builder.append("name=\"");
    String _simpleName = GrammarUtil.getSimpleName(this.getGrammar());
    _builder.append(_simpleName, "\t\t");
    _builder.append(" Project\"");
    _builder.newLineIfNotEmpty();
    _builder.append("\t\t\t");
    _builder.append("project=\"true\">");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("</wizard>");
    _builder.newLine();
    _builder.append("</extension>");
    _builder.newLine();
    _entries.add(_builder.toString());
  }
  this.generateProjectInfo();
  this.generateWizardNewProjectCreationPage();
  this.generateNewProjectWizardInitialContents();
  this.generateProjectCreator();
  this.generateNewProjectWizard();
}