Class OomphIdePlugin

  • All Implemented Interfaces:
    Plugin<Project>

    public class OomphIdePlugin
    extends ProjectPlugin
    Downloads and sets up an Eclipse IDE. Each IDE created by Goomph stores its plugins centrally in GoomphCacheLocations.bundlePool(). This means it only takes ~1MB of extra diskspace per IDE, so that you can install many IDE's, each with their own settings and plugins, while being very efficient with your disk and network resources. - `gradlew ide` launches the IDE, after running any required setup tasks. To create an IDE for java projects (see ConventionJdt for more JDT options). ```groovy apply plugin: 'com.diffplug.oomph.ide' oomphIde { repoEclipseLatest() jdt {} } ``` For an Eclipse Plugin project (see ConventionPde for more JDT options). ```groovy oomphIde { repoEclipse '4.5.2' pde {} } ``` You can also set the icon and splashscreen used to launch the IDE for your project, as well as detailed settings. ```groovy oomphIde { icon 'images/icon.png' splash 'images/mascot.png' repoEclipseLatest() jdt {} eclipseIni { vmargs('-Xmx2g') // IDE can have up to 2 gigs of RAM } workspaceProp '.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.e4.ui.css.swt.theme.prefs', { it.put('themeid', 'org.eclipse.e4.ui.css.theme.e4_classic') } } ``` The Eclipse IDE has a broad ecosystem. You can use Goomph to configure any combination of pieces from this ecosystem, but this requires detailed knowledge of the update sites and installable units that these projects use. ```groovy oomphIde { repo 'https://download.eclipse.org/buildship/updates/e45/releases/1.0' iu 'org.eclipse.buildship' } ``` ## What if I want to change my setup It helps to know a little about the guts of the tasks. `ide` - `ideSetupWorkspace` - `ideSetupP2` - `ideSetupP2` installs plugins and updates their versions. + If you change something about the p2 model or the icons, this will rerun to generate exactly the plugins which have been specified. - `ideSetupWorkspace` imports the projects and sets user settings. + If you change the projects or user settings, this will not rerun automatically, because that would wipe out any changes you've made manually while using the IDE. If you want to wipe out the workspace, you can run `ideClean` and it will wipe the workspace. - `ide` runs the IDE. ## Which projects get imported? If the gradle project to which you applied this plugin also contains an eclipse project, it will automatically be imported into the workspace. If you have a multiproject build, you can do the following: ```groovy oomphIde { // adds the eclipse project from the given project addProject(':gradle-project:path') // adds eclipse projects from every Gradle project in the build addAllProjects() } ``` ## How do I control the details? See OomphIdeExtension for the full DSL. ## Proxy support If you need to pass through a proxy, you'll need to create a file called `proxies.ini` with content like this: ```ini org.eclipse.core.net/proxyData/HTTP/host=someproxy.ericsson.se org.eclipse.core.net/proxyData/HTTPS/host=someproxy.ericsson.se org.eclipse.core.net/proxyData/HTTPS/hasAuth=false org.eclipse.core.net/proxyData/HTTP/port=8080 org.eclipse.core.net/proxyData/HTTPS/port=8080 org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true org.eclipse.core.net/nonProxiedHosts=*.ericsson.com|127.0.0.1 org.eclipse.core.net/systemProxiesEnabled=false org.eclipse.core.net/proxyData/HTTP/hasAuth=false ``` Once you've done this, add this to your `build.gradle`: ```groovy oomphIde { ... p2director { addArg('plugincustomization', 'path to proxies.ini') } } ``` If you think this is too hard, vote for [this issue on GitHub](https://github.com/diffplug/goomph/issues/12) and [this bug on eclipse](https://bugs.eclipse.org/bugs/show_bug.cgi?id=382875) and we can make it easier.
    • Constructor Detail

      • OomphIdePlugin

        public OomphIdePlugin()
    • Method Detail

      • applyOnce

        protected void applyOnce​(Project project)
        Description copied from class: ProjectPlugin
        Plugin application, which is guaranteed to execute only once.
        Specified by:
        applyOnce in class ProjectPlugin