Search in sources :

Example 6 with ExternalDependency

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

the class RuntimeProjectDescriptor method getExternalDependencies.

@Override
public Set<ExternalDependency> getExternalDependencies() {
    LinkedHashSet<ExternalDependency> _xblockexpression = null;
    {
        final LinkedHashSet<ExternalDependency> deps = CollectionLiterals.<ExternalDependency>newLinkedHashSet();
        Set<ExternalDependency> _externalDependencies = super.getExternalDependencies();
        Iterables.<ExternalDependency>addAll(deps, _externalDependencies);
        ExternalDependency _createXtextDependency = ExternalDependency.createXtextDependency("org.eclipse.xtext");
        deps.add(_createXtextDependency);
        ExternalDependency _createXtextDependency_1 = ExternalDependency.createXtextDependency("org.eclipse.xtext.xbase");
        deps.add(_createXtextDependency_1);
        ExternalDependency _externalDependency = new ExternalDependency();
        final Procedure1<ExternalDependency> _function = (ExternalDependency it) -> {
            final Procedure1<ExternalDependency.P2Coordinates> _function_1 = (ExternalDependency.P2Coordinates it_1) -> {
                it_1.setBundleId("org.eclipse.equinox.common");
                it_1.setVersion("3.5.0");
            };
            it.p2(_function_1);
        };
        ExternalDependency _doubleArrow = ObjectExtensions.<ExternalDependency>operator_doubleArrow(_externalDependency, _function);
        deps.add(_doubleArrow);
        if (((!this.isEclipsePluginProject()) && this.getConfig().needsMavenBuild())) {
            ExternalDependency _createXtextDependency_2 = ExternalDependency.createXtextDependency("org.eclipse.xtext.xtext.generator");
            final Procedure1<ExternalDependency> _function_1 = (ExternalDependency it) -> {
                ExternalDependency.MavenCoordinates _maven = it.getMaven();
                _maven.setOptional(true);
            };
            ExternalDependency _doubleArrow_1 = ObjectExtensions.<ExternalDependency>operator_doubleArrow(_createXtextDependency_2, _function_1);
            deps.add(_doubleArrow_1);
            ExternalDependency _externalDependency_1 = new ExternalDependency();
            final Procedure1<ExternalDependency> _function_2 = (ExternalDependency it) -> {
                final Procedure1<ExternalDependency.MavenCoordinates> _function_3 = (ExternalDependency.MavenCoordinates it_1) -> {
                    it_1.setGroupId("org.eclipse.emf");
                    it_1.setArtifactId("org.eclipse.emf.mwe2.launch");
                    it_1.setVersion(this.getConfig().getXtextVersion().getMweVersion());
                    it_1.setOptional(true);
                };
                it.maven(_function_3);
            };
            ExternalDependency _doubleArrow_2 = ObjectExtensions.<ExternalDependency>operator_doubleArrow(_externalDependency_1, _function_2);
            deps.add(_doubleArrow_2);
        }
        _xblockexpression = deps;
    }
    return _xblockexpression;
}
Also used : LinkedHashSet(java.util.LinkedHashSet) ExternalDependency(org.eclipse.xtext.xtext.wizard.ExternalDependency) LinkedHashSet(java.util.LinkedHashSet) Set(java.util.Set) Procedure1(org.eclipse.xtext.xbase.lib.Procedures.Procedure1)

Example 7 with ExternalDependency

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

the class TestProjectDescriptor method getExternalDependencies.

@Override
public Set<ExternalDependency> getExternalDependencies() {
    final LinkedHashSet<ExternalDependency> deps = CollectionLiterals.<ExternalDependency>newLinkedHashSet();
    Set<ExternalDependency> _externalDependencies = super.getExternalDependencies();
    Iterables.<ExternalDependency>addAll(deps, _externalDependencies);
    ExternalDependency _externalDependency = new ExternalDependency();
    final Procedure1<ExternalDependency> _function = (ExternalDependency it) -> {
        ExternalDependency.P2Coordinates _p2 = it.getP2();
        _p2.setBundleId("org.junit");
        ExternalDependency.P2Coordinates _p2_1 = it.getP2();
        _p2_1.setVersion("4.12.0");
        ExternalDependency.MavenCoordinates _maven = it.getMaven();
        _maven.setGroupId("junit");
        ExternalDependency.MavenCoordinates _maven_1 = it.getMaven();
        _maven_1.setArtifactId("junit");
        ExternalDependency.MavenCoordinates _maven_2 = it.getMaven();
        _maven_2.setVersion("4.12");
        ExternalDependency.MavenCoordinates _maven_3 = it.getMaven();
        _maven_3.setScope(Scope.TESTCOMPILE);
    };
    ExternalDependency _doubleArrow = ObjectExtensions.<ExternalDependency>operator_doubleArrow(_externalDependency, _function);
    deps.add(_doubleArrow);
    return deps;
}
Also used : ExternalDependency(org.eclipse.xtext.xtext.wizard.ExternalDependency)

Aggregations

ExternalDependency (org.eclipse.xtext.xtext.wizard.ExternalDependency)7 LinkedHashSet (java.util.LinkedHashSet)2 Set (java.util.Set)2 Procedure1 (org.eclipse.xtext.xbase.lib.Procedures.Procedure1)2 StringConcatenation (org.eclipse.xtend2.lib.StringConcatenation)1 Function1 (org.eclipse.xtext.xbase.lib.Functions.Function1)1 EPackageInfo (org.eclipse.xtext.xtext.wizard.EPackageInfo)1 ParentProjectDescriptor (org.eclipse.xtext.xtext.wizard.ParentProjectDescriptor)1 ProjectDescriptor (org.eclipse.xtext.xtext.wizard.ProjectDescriptor)1 ProjectLayout (org.eclipse.xtext.xtext.wizard.ProjectLayout)1 Scope (org.eclipse.xtext.xtext.wizard.Scope)1 TestProjectDescriptor (org.eclipse.xtext.xtext.wizard.TestProjectDescriptor)1 Test (org.junit.Test)1