@Test public void testEclipseSetup() { project.getPlugins().apply(EclipsePlugin.class); final EclipseModel eclipseModel = project.getExtensions().getByType(EclipseModel.class); assertThat(eclipseModel.getProject().getNatures(), hasItem(GwtEclipsePlugin.ECLIPSE_NATURE)); assertThat(eclipseModel.getProject().getBuildCommands(), hasItem(new BuildCommand(GwtEclipsePlugin.ECLIPSE_BUILDER_PROJECT_VALIDATOR))); assertThat(eclipseModel.getProject().getBuildCommands(), not(hasItem(new BuildCommand(GwtEclipsePlugin.ECLIPSE_BUILDER_WEBAPP_VALIDATOR)))); project.getPlugins().apply(WarPlugin.class); assertThat(eclipseModel.getProject().getBuildCommands(), hasItem(new BuildCommand(GwtEclipsePlugin.ECLIPSE_BUILDER_WEBAPP_VALIDATOR))); }
@Override public void apply(final Project project) { project.getPlugins().apply(GwtCompilerPlugin.class); project.getPlugins().withType(WarPlugin.class, (warPlugin) -> project.getPlugins().apply(GwtWarPlugin.class)); }
GwtPlugin implements Plugin<Project> { @Override public void apply(final Project project) { project.getPlugins().apply(GwtCompilerPlugin.class); project.getPlugins().withType(WarPlugin.class, (warPlugin) -> project.getPlugins().apply(GwtWarPlugin.class)); } }
GwtPlugin implements Plugin<Project> { @Override public void apply(final Project project) { project.getPlugins().apply(GwtCompilerPlugin.class); project.getPlugins().withType(WarPlugin.class, (warPlugin) -> project.getPlugins().apply(GwtWarPlugin.class)); }  }
GwtPlugin implements Plugin<Project> { @Override public void apply(final Project project) { project.getPlugins().apply(GwtCompilerPlugin.class); project.getPlugins().withType(WarPlugin.class, (warPlugin) -> project.getPlugins().apply(GwtWarPlugin.class)); }  @Override void apply(final Project project); }
GwtPlugin implements Plugin<Project> { @Override public void apply(final Project project) { project.getPlugins().apply(GwtCompilerPlugin.class); project.getPlugins().withType(WarPlugin.class, (warPlugin) -> project.getPlugins().apply(GwtWarPlugin.class)); }  @Override void apply(final Project project);  }