Search in sources :

Example 1 with UiProjectDescriptor

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

the class WizardConfigurationTest method eclipsePluginsAreBuiltWithTychoWhenMavenBuiltIsEnabled.

@Test
public void eclipsePluginsAreBuiltWithTychoWhenMavenBuiltIsEnabled() {
    UiProjectDescriptor _uiProject = this.config.getUiProject();
    _uiProject.setEnabled(true);
    IdeProjectDescriptor _ideProject = this.config.getIdeProject();
    _ideProject.setEnabled(true);
    this.config.setPreferredBuildSystem(BuildSystem.MAVEN);
    Assert.assertTrue(this.config.needsTychoBuild());
    RuntimeProjectDescriptor _runtimeProject = this.config.getRuntimeProject();
    IdeProjectDescriptor _ideProject_1 = this.config.getIdeProject();
    UiProjectDescriptor _uiProject_1 = this.config.getUiProject();
    final Consumer<ProjectDescriptor> _function = (ProjectDescriptor it) -> {
        Assert.assertTrue(it.pom().getContent().contains("eclipse-plugin"));
    };
    Collections.<ProjectDescriptor>unmodifiableList(CollectionLiterals.<ProjectDescriptor>newArrayList(_runtimeProject, _ideProject_1, _uiProject_1)).forEach(_function);
    Assert.assertTrue(this.config.getParentProject().pom().getContent().contains("tycho"));
}
Also used : UiProjectDescriptor(org.eclipse.xtext.xtext.wizard.UiProjectDescriptor) WebProjectDescriptor(org.eclipse.xtext.xtext.wizard.WebProjectDescriptor) TestProjectDescriptor(org.eclipse.xtext.xtext.wizard.TestProjectDescriptor) TestedProjectDescriptor(org.eclipse.xtext.xtext.wizard.TestedProjectDescriptor) ProjectDescriptor(org.eclipse.xtext.xtext.wizard.ProjectDescriptor) IdeProjectDescriptor(org.eclipse.xtext.xtext.wizard.IdeProjectDescriptor) RuntimeProjectDescriptor(org.eclipse.xtext.xtext.wizard.RuntimeProjectDescriptor) IntellijProjectDescriptor(org.eclipse.xtext.xtext.wizard.IntellijProjectDescriptor) UiProjectDescriptor(org.eclipse.xtext.xtext.wizard.UiProjectDescriptor) RuntimeProjectDescriptor(org.eclipse.xtext.xtext.wizard.RuntimeProjectDescriptor) IdeProjectDescriptor(org.eclipse.xtext.xtext.wizard.IdeProjectDescriptor) Test(org.junit.Test)

Example 2 with UiProjectDescriptor

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

the class WizardConfigurationTest method uiTestsNeedTychoUiHarness.

@Test
public void uiTestsNeedTychoUiHarness() {
    this.config.setPreferredBuildSystem(BuildSystem.MAVEN);
    UiProjectDescriptor _uiProject = this.config.getUiProject();
    _uiProject.setEnabled(true);
    final String pom = this.config.getUiProject().getTestProject().pom().getContent();
    Assert.assertTrue(pom.contains("useUIHarness"));
}
Also used : UiProjectDescriptor(org.eclipse.xtext.xtext.wizard.UiProjectDescriptor) Test(org.junit.Test)

Example 3 with UiProjectDescriptor

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

the class WizardConfigurationTest method eclipseUiIsBuiltWithTychoWhenNotUsingPDE.

@Test
public void eclipseUiIsBuiltWithTychoWhenNotUsingPDE() {
    UiProjectDescriptor _uiProject = this.config.getUiProject();
    _uiProject.setEnabled(true);
    this.config.setPreferredBuildSystem(BuildSystem.GRADLE);
    Assert.assertTrue(this.config.needsTychoBuild());
}
Also used : UiProjectDescriptor(org.eclipse.xtext.xtext.wizard.UiProjectDescriptor) Test(org.junit.Test)

Example 4 with UiProjectDescriptor

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

the class WizardConfigurationTest method allJavaProjects.

public List<? extends ProjectDescriptor> allJavaProjects() {
    RuntimeProjectDescriptor _runtimeProject = this.config.getRuntimeProject();
    TestProjectDescriptor _testProject = this.config.getRuntimeProject().getTestProject();
    UiProjectDescriptor _uiProject = this.config.getUiProject();
    TestProjectDescriptor _testProject_1 = this.config.getUiProject().getTestProject();
    IdeProjectDescriptor _ideProject = this.config.getIdeProject();
    IntellijProjectDescriptor _intellijProject = this.config.getIntellijProject();
    WebProjectDescriptor _webProject = this.config.getWebProject();
    return Collections.<ProjectDescriptor>unmodifiableList(CollectionLiterals.<ProjectDescriptor>newArrayList(_runtimeProject, _testProject, _uiProject, _testProject_1, _ideProject, _intellijProject, _webProject));
}
Also used : UiProjectDescriptor(org.eclipse.xtext.xtext.wizard.UiProjectDescriptor) IntellijProjectDescriptor(org.eclipse.xtext.xtext.wizard.IntellijProjectDescriptor) WebProjectDescriptor(org.eclipse.xtext.xtext.wizard.WebProjectDescriptor) TestProjectDescriptor(org.eclipse.xtext.xtext.wizard.TestProjectDescriptor) TestedProjectDescriptor(org.eclipse.xtext.xtext.wizard.TestedProjectDescriptor) ProjectDescriptor(org.eclipse.xtext.xtext.wizard.ProjectDescriptor) IdeProjectDescriptor(org.eclipse.xtext.xtext.wizard.IdeProjectDescriptor) RuntimeProjectDescriptor(org.eclipse.xtext.xtext.wizard.RuntimeProjectDescriptor) IntellijProjectDescriptor(org.eclipse.xtext.xtext.wizard.IntellijProjectDescriptor) UiProjectDescriptor(org.eclipse.xtext.xtext.wizard.UiProjectDescriptor) RuntimeProjectDescriptor(org.eclipse.xtext.xtext.wizard.RuntimeProjectDescriptor) TestProjectDescriptor(org.eclipse.xtext.xtext.wizard.TestProjectDescriptor) WebProjectDescriptor(org.eclipse.xtext.xtext.wizard.WebProjectDescriptor) IdeProjectDescriptor(org.eclipse.xtext.xtext.wizard.IdeProjectDescriptor)

Example 5 with UiProjectDescriptor

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

the class WizardConfigurationTest method projectsCanBeBuiltAgainstXtextReleases.

@Test
public void projectsCanBeBuiltAgainstXtextReleases() {
    this.config.setPreferredBuildSystem(BuildSystem.GRADLE);
    UiProjectDescriptor _uiProject = this.config.getUiProject();
    _uiProject.setEnabled(true);
    IntellijProjectDescriptor _intellijProject = this.config.getIntellijProject();
    _intellijProject.setEnabled(true);
    XtextVersion _xtextVersion = new XtextVersion("2.9.0");
    this.config.setXtextVersion(_xtextVersion);
    final String snapshotsRepo = "repositories/snapshots";
    Assert.assertFalse(this.config.getParentProject().pom().getContent().contains(snapshotsRepo));
    Assert.assertFalse(this.config.getParentProject().buildGradle().getContent().contains(snapshotsRepo));
    final String xtextIntellijRelease = "xtext/idea/${xtextVersion}";
    Assert.assertTrue(this.config.getIntellijProject().buildGradle().getContent().contains(xtextIntellijRelease));
    final String releaseUpdateSite = "xtext/updates/releases/2.9.0";
    Assert.assertTrue(this.config.getTargetPlatformProject().target().toString().contains(releaseUpdateSite));
}
Also used : UiProjectDescriptor(org.eclipse.xtext.xtext.wizard.UiProjectDescriptor) IntellijProjectDescriptor(org.eclipse.xtext.xtext.wizard.IntellijProjectDescriptor) XtextVersion(org.eclipse.xtext.util.XtextVersion) Test(org.junit.Test)

Aggregations

UiProjectDescriptor (org.eclipse.xtext.xtext.wizard.UiProjectDescriptor)15 Test (org.junit.Test)13 IntellijProjectDescriptor (org.eclipse.xtext.xtext.wizard.IntellijProjectDescriptor)5 TestProjectDescriptor (org.eclipse.xtext.xtext.wizard.TestProjectDescriptor)5 IdeProjectDescriptor (org.eclipse.xtext.xtext.wizard.IdeProjectDescriptor)4 ProjectDescriptor (org.eclipse.xtext.xtext.wizard.ProjectDescriptor)4 TestedProjectDescriptor (org.eclipse.xtext.xtext.wizard.TestedProjectDescriptor)4 WebProjectDescriptor (org.eclipse.xtext.xtext.wizard.WebProjectDescriptor)4 RuntimeProjectDescriptor (org.eclipse.xtext.xtext.wizard.RuntimeProjectDescriptor)3 XtextVersion (org.eclipse.xtext.util.XtextVersion)2 P2RepositoryProject (org.eclipse.xtext.xtext.wizard.P2RepositoryProject)2 PomFile (org.eclipse.xtext.xtext.wizard.PomFile)2 StringConcatenation (org.eclipse.xtend2.lib.StringConcatenation)1 RuntimeTestProjectDescriptor (org.eclipse.xtext.xtext.wizard.RuntimeTestProjectDescriptor)1