Package com.diffplug.gradle.oomph
Class OomphIdeExtension
- java.lang.Object
-
- com.diffplug.gradle.oomph.OomphIdeExtension
-
- All Implemented Interfaces:
P2Declarative
public class OomphIdeExtension extends Object implements P2Declarative
DSL forOomphIdePlugin
.
-
-
Constructor Summary
Constructors Constructor Description OomphIdeExtension(Project project)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAllProjects()
Adds all eclipse projects from all gradle projects.void
addAllProjects(Spec<String> include)
Adds all eclipse projects from all gradle projects whose paths meet the given spec.void
addBuildSrc()
Adds the buildSrc folder as an eclipse project.void
addIncludedProject(String includedBuild, String projectPath)
Adds an eclipse project from the given included build.void
addProject(String projectPath)
Adds the eclipse project from the given project path.void
addProjectFolder(Object folderObj)
Adds the given folder as an eclipse project.void
addSetupAction(SetupAction internalSetupAction)
Adds an action which will be run inside our running application.void
addSetupActionLazy(Action<List<SetupAction>> lazyInternalSetupAction)
Eventually adds some actions which will be run inside our running application.void
description(String description)
Sets the description of the generated IDE.void
eclipseIni(Action<EclipseIni> eclipseIni)
Sets properties in the `eclipse.ini`.void
findProjectsInIncludedBuilds()
Finds projects in the included builds.void
findProjectsInIncludedBuilds(Spec<String> spec)
P2Model
getP2()
Returns the P2 model so that users can add the features they'd like.Project
getProject()
Returns the underlying project.void
icon(Object icon)
Sets the icon image - any size and format is okay, but something square is recommended.void
ideDir(Object ideDir)
Sets the folder where the ide will be built.void
jdt(Action<ConventionJdt> action)
Adds the java development tools, @see ConventionJdt.void
linkedResource(String linkName, Object linkTarget)
Links the given target into the workspace with the given name, see [eclipse manual](https://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Fconcepts%2Fconcepts-13.htm).void
name(String name)
Sets the name of the generated IDE.void
p2director(Action<P2Model.DirectorApp> directorModifier)
Allows for fine-grained manipulation of the mirroring operation.void
pde(Action<ConventionPde> action)
Adds the plugin-development environment, @see ConventionPde.void
perspective(String perspective)
Sets the starting perspective (window layout), seePerspectives
for common perspectives.void
runP2Using(Action<P2Model.DirectorApp> runUsing)
Defaults toP2Model.DirectorApp.runUsingBootstrapper()
- this allows you to override that behavior.void
runP2UsingPDE()
Provisions using the latest available version of the full Eclipse PDE.void
runP2UsingPDE(String version)
Provisions using the given version of the full Eclipse PDE.void
silenceEquoIDE()
void
splash(Object splash)
Sets the splash screen image - any size and format is okay.void
style(Action<ConventionStyle> action)
Convenience methods for setting the style, @see ConventionStyle.void
thirdParty(Action<ConventionThirdParty> action)
Adds third-party tools, @see ConventionThirdParty.void
workspaceFile(String destination, Object fileSrc)
Sets the given path within the workspace directory to be a copy of the file located at fileSrc.void
workspaceProp(String destination, Action<Map<String,String>> configSupplier)
Sets the given path within the workspace directory to be a property file.void
workspaceXml(String destination, Action<XmlProvider> xmlSupplier)
Modifies the xml that was written in a previous call toworkspaceFile(String, Object)
orworkspaceXml(String, Action)
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.diffplug.gradle.p2.P2Declarative
append, artifactRepo, artifactRepo, feature, feature, iu, iu, metadataRepo, metadataRepo, repo, repo, repoEclipse, repoEclipseLatest, slicingOption
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OomphIdeExtension
public OomphIdeExtension(Project project) throws IOException
- Throws:
IOException
-
-
Method Detail
-
silenceEquoIDE
public void silenceEquoIDE()
-
getProject
public Project getProject()
Returns the underlying project.
-
getP2
public P2Model getP2()
Returns the P2 model so that users can add the features they'd like.- Specified by:
getP2
in interfaceP2Declarative
-
p2director
public void p2director(Action<P2Model.DirectorApp> directorModifier)
Allows for fine-grained manipulation of the mirroring operation.
-
icon
public void icon(Object icon)
Sets the icon image - any size and format is okay, but something square is recommended.
-
splash
public void splash(Object splash)
Sets the splash screen image - any size and format is okay.
-
name
public void name(String name)
Sets the name of the generated IDE. Defaults to the name of the root project.
-
description
public void description(String description)
Sets the description of the generated IDE. Defaults to name.
-
perspective
public void perspective(String perspective)
Sets the starting perspective (window layout), seePerspectives
for common perspectives.
-
eclipseIni
public void eclipseIni(Action<EclipseIni> eclipseIni)
Sets properties in the `eclipse.ini`.
-
ideDir
public void ideDir(Object ideDir)
Sets the folder where the ide will be built.
-
addAllProjects
public void addAllProjects()
Adds all eclipse projects from all gradle projects.
-
addAllProjects
public void addAllProjects(Spec<String> include)
Adds all eclipse projects from all gradle projects whose paths meet the given spec.
-
findProjectsInIncludedBuilds
public void findProjectsInIncludedBuilds(Spec<String> spec)
- See Also:
findProjectsInIncludedBuilds()
-
findProjectsInIncludedBuilds
public void findProjectsInIncludedBuilds()
Finds projects in the included builds. You have to run `gradlew eclipse` before running `gradle ide` for this to work, because it relies on pre-existing `.project` files to determine the paths to subprojects. Supports root projects and subprojects, but not subsubprojects.
-
addIncludedProject
public void addIncludedProject(String includedBuild, String projectPath)
Adds an eclipse project from the given included build.
-
addProject
public void addProject(String projectPath)
Adds the eclipse project from the given project path.
-
addProjectFolder
public void addProjectFolder(Object folderObj)
Adds the given folder as an eclipse project.
-
addBuildSrc
public void addBuildSrc()
Adds the buildSrc folder as an eclipse project. It's recommended that you add this snippet to your buildSrc, to ensure that your eclipse project stays up-to-date. ```gradle apply plugin: 'eclipse' build.dependsOn(tasks.getByName('eclipse')) ```
-
workspaceFile
public void workspaceFile(String destination, Object fileSrc)
Sets the given path within the workspace directory to be a copy of the file located at fileSrc.
-
workspaceProp
public void workspaceProp(String destination, Action<Map<String,String>> configSupplier)
Sets the given path within the workspace directory to be a property file. If a property file was already written by a previous call toworkspaceFile(String, Object)
orworkspaceProp(String, Action)
, then it can be modified by this action.
-
workspaceXml
public void workspaceXml(String destination, Action<XmlProvider> xmlSupplier)
Modifies the xml that was written in a previous call toworkspaceFile(String, Object)
orworkspaceXml(String, Action)
. However,
-
addSetupAction
public void addSetupAction(SetupAction internalSetupAction)
Adds an action which will be run inside our running application.
-
addSetupActionLazy
public void addSetupActionLazy(Action<List<SetupAction>> lazyInternalSetupAction)
Eventually adds some actions which will be run inside our running application.
-
linkedResource
public void linkedResource(String linkName, Object linkTarget)
Links the given target into the workspace with the given name, see [eclipse manual](https://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Fconcepts%2Fconcepts-13.htm).
-
runP2Using
public void runP2Using(Action<P2Model.DirectorApp> runUsing)
Defaults toP2Model.DirectorApp.runUsingBootstrapper()
- this allows you to override that behavior.
-
runP2UsingPDE
public void runP2UsingPDE(String version)
Provisions using the given version of the full Eclipse PDE.
-
runP2UsingPDE
public void runP2UsingPDE()
Provisions using the latest available version of the full Eclipse PDE.
-
style
public void style(Action<ConventionStyle> action)
Convenience methods for setting the style, @see ConventionStyle.
-
jdt
public void jdt(Action<ConventionJdt> action)
Adds the java development tools, @see ConventionJdt.
-
pde
public void pde(Action<ConventionPde> action)
Adds the plugin-development environment, @see ConventionPde.
-
thirdParty
public void thirdParty(Action<ConventionThirdParty> action)
Adds third-party tools, @see ConventionThirdParty.
-
-