GRECLIPSE
  1. GRECLIPSE
  2. GRECLIPSE-716

Provide headless Groovy-Eclipse feature

    Details

    • Number of attachments :
      1

      Description

      The current Groovy-Eclipse distribution provides features that can easily be installed into the Eclipse IDE, including all UI artifacts and patches for JDT. It cannot be installed into a headless Eclipse environment, e.g. for building Groovy projects with the Eclipse Buckminster project. It would be great if the Groovy-Eclipse project could provide such a feature. See the forum thread under http://www.eclipse.org/forums/index.php?t=msg&th=165908&start=0& for a motivation for this request.

      I sketched a draft for this feature (see attached file). I could successfully install this feature into a regular Buckminster 3.6 headless environment and build a (simple) Groovy project without failure.

      I also tried to run a script and a JUnit test from this headless environment. The former fails with the following message

      Launch configuration type id "org.codehaus.groovy.eclipse.groovyScriptLaunchConfiguration" does not exist.
      

      I suspect we need to include the plug-in that defines the launch configuration.

      Running a unit test fails with

      java.lang.IllegalArgumentException: No Code Select Helper found
      

      Maybe this is also related to the missing Groovy launch configuration, but this message might just as well have other reasons. Does this error sound familiar to you, or should I better go looking in JDT code?

        Issue Links

          Activity

          Hide
          Andrew Eisenberg added a comment -

          That's good that the feature your provided is working for you. I'll try to use it to build something that can be included in the update site.

          As for the problems you are finding:

          • The launch configuration is in the ui component, not the core component. It could probably be moved over. If you are only running unit tests, then this should not be necessary, though since you can run the standard JUnit test launcher.
          • GroovyCompilationUnit uses an adapter that helps it perform code select (ie- navigation, hovers, etc). This adapter comes from a different plugin, the org.codehaus.groovy.eclipse.codebrowsing plugin. Perhaps you can add that to your feature and see if it works for you. This plugin does not have any UI dependencies.

          Let me know if this works for you.

          Show
          Andrew Eisenberg added a comment - That's good that the feature your provided is working for you. I'll try to use it to build something that can be included in the update site. As for the problems you are finding: The launch configuration is in the ui component, not the core component. It could probably be moved over. If you are only running unit tests, then this should not be necessary, though since you can run the standard JUnit test launcher. GroovyCompilationUnit uses an adapter that helps it perform code select (ie- navigation, hovers, etc). This adapter comes from a different plugin, the org.codehaus.groovy.eclipse.codebrowsing plugin. Perhaps you can add that to your feature and see if it works for you. This plugin does not have any UI dependencies. Let me know if this works for you.
          Hide
          Achim Demelt added a comment -

          org.codehaus.groovy.eclipse.codebrowsing requires org.codehaus.groovy.eclipse.core, and this is turn requires org.eclipse.jdt.junit.

          Despite its (legacy) name, org.eclipse.jdt.junit is the UI part of JDT Junit support. The headless part is in org.eclipse.jdt.junit.core. Can o.c.groovy.eclipse.core work with o.e.jdt.junit.core? If so, I'm pretty confident we can install the codebrowsing bundle into a headless buckminster. The other dependencies look good to me.

          Show
          Achim Demelt added a comment - org.codehaus.groovy.eclipse.codebrowsing requires org.codehaus.groovy.eclipse.core, and this is turn requires org.eclipse.jdt.junit. Despite its (legacy) name, org.eclipse.jdt.junit is the UI part of JDT Junit support. The headless part is in org.eclipse.jdt.junit.core. Can o.c.groovy.eclipse.core work with o.e.jdt.junit.core? If so, I'm pretty confident we can install the codebrowsing bundle into a headless buckminster. The other dependencies look good to me.
          Hide
          Andrew Eisenberg added a comment -

          Achim,

          I am continuing to work on this. The latest 3.5 snapshot has moved the groovy script launch configuration over to o.c.g.eclipse.core.

          As to your most recent comment, I do not see any dependency from o.c.g.eclipse.core to o.e.jdt.junit. Not on 3.5 stream or in the 3.6 stream. Are you working with the latest snapshot?

          Also, just to be sure are you working with the 3.6 stream or the 3.5 stream?

          Show
          Andrew Eisenberg added a comment - Achim, I am continuing to work on this. The latest 3.5 snapshot has moved the groovy script launch configuration over to o.c.g.eclipse.core. As to your most recent comment, I do not see any dependency from o.c.g.eclipse.core to o.e.jdt.junit. Not on 3.5 stream or in the 3.6 stream. Are you working with the latest snapshot? Also, just to be sure are you working with the 3.6 stream or the 3.5 stream?
          Hide
          Achim Demelt added a comment -

          Wow, if you are able to move the launcher out of the UI bundle so quickly then you must have an excellent and clean code base! I did the same thing for JDT and PDE and that took me some time...

          Anyway, here's the MANIFEST.MF from o.c.g.e.core, taken fresh from http://ci.repository.codehaus.org/greclipse/snapshot/e36/plugins/:

          Manifest-Version: 1.0
          Ant-Version: Apache Ant 1.7.0
          Created-By: 1.5.0_15-b04 (Sun Microsystems Inc.)
          Bundle-Name: Groovy Core
          Bundle-ClassPath: lib/commons-lang-2.3.jar,lib/commons-io-1.3.1.jar,.
          Bundle-Activator: org.codehaus.groovy.eclipse.core.GroovyCoreActivator
          Bundle-RequiredExecutionEnvironment: J2SE-1.5
          Bundle-Vendor: The Codehaus
          Bundle-ManifestVersion: 2
          Bundle-SymbolicName: org.codehaus.groovy.eclipse.core;singleton:=true
          Bundle-ActivationPolicy: lazy
          Export-Package: org.apache.commons.io,org.apache.commons.io.filefilter
           ,org.apache.commons.io.input,org.apache.commons.io.output,org.apache.
           commons.lang,org.apache.commons.lang.builder,org.apache.commons.lang.
           enums,org.apache.commons.lang.exception,org.apache.commons.lang.math,
           org.apache.commons.lang.mutable,org.apache.commons.lang.text,org.apac
           he.commons.lang.time,org.codehaus.groovy.eclipse.core,org.codehaus.gr
           oovy.eclipse.core.adapters,org.codehaus.groovy.eclipse.core.builder,o
           rg.codehaus.groovy.eclipse.core.compiler,org.codehaus.groovy.eclipse.
           core.impl,org.codehaus.groovy.eclipse.core.model,org.codehaus.groovy.
           eclipse.core.preferences,org.codehaus.groovy.eclipse.core.templates,o
           rg.codehaus.groovy.eclipse.core.util
          Require-Bundle: org.codehaus.groovy,org.eclipse.core.runtime,org.eclip
           se.jdt.core,org.eclipse.core.resources,org.eclipse.jdt.junit,org.ecli
           pse.debug.core,org.eclipse.jdt.debug,org.apache.ant,org.eclipse.jdt.g
           roovy.core;bundle-version="1.0.0"
          Bundle-Version: 2.0.2.xx-20100426-2000-e36
          

          Fourth line from the bottom shows the reference to o.e.jdt.junit. Judging from the qualifier timestamp, it's about two weeks old. Is there a site that has newer bundles?

          Show
          Achim Demelt added a comment - Wow, if you are able to move the launcher out of the UI bundle so quickly then you must have an excellent and clean code base! I did the same thing for JDT and PDE and that took me some time... Anyway, here's the MANIFEST.MF from o.c.g.e.core, taken fresh from http://ci.repository.codehaus.org/greclipse/snapshot/e36/plugins/ : Manifest-Version: 1.0 Ant-Version: Apache Ant 1.7.0 Created-By: 1.5.0_15-b04 (Sun Microsystems Inc.) Bundle-Name: Groovy Core Bundle-ClassPath: lib/commons-lang-2.3.jar,lib/commons-io-1.3.1.jar,. Bundle-Activator: org.codehaus.groovy.eclipse.core.GroovyCoreActivator Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-Vendor: The Codehaus Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.codehaus.groovy.eclipse.core;singleton:= true Bundle-ActivationPolicy: lazy Export-Package: org.apache.commons.io,org.apache.commons.io.filefilter ,org.apache.commons.io.input,org.apache.commons.io.output,org.apache. commons.lang,org.apache.commons.lang.builder,org.apache.commons.lang. enums,org.apache.commons.lang.exception,org.apache.commons.lang.math, org.apache.commons.lang.mutable,org.apache.commons.lang.text,org.apac he.commons.lang.time,org.codehaus.groovy.eclipse.core,org.codehaus.gr oovy.eclipse.core.adapters,org.codehaus.groovy.eclipse.core.builder,o rg.codehaus.groovy.eclipse.core.compiler,org.codehaus.groovy.eclipse. core.impl,org.codehaus.groovy.eclipse.core.model,org.codehaus.groovy. eclipse.core.preferences,org.codehaus.groovy.eclipse.core.templates,o rg.codehaus.groovy.eclipse.core.util Require-Bundle: org.codehaus.groovy,org.eclipse.core.runtime,org.eclip se.jdt.core,org.eclipse.core.resources,org.eclipse.jdt.junit,org.ecli pse.debug.core,org.eclipse.jdt.debug,org.apache.ant,org.eclipse.jdt.g roovy.core;bundle-version= "1.0.0" Bundle-Version: 2.0.2.xx-20100426-2000-e36 Fourth line from the bottom shows the reference to o.e.jdt.junit. Judging from the qualifier timestamp, it's about two weeks old. Is there a site that has newer bundles?
          Hide
          Andrew Eisenberg added a comment -

          I finally have some time to work on this. I just created the headless feature using the feature id org.codehaus.groovy.headless.feature. This feature will be available from the update site, but will not be categorized and so the only way to see it would be if you uncheck "Group items by category".

          Show
          Andrew Eisenberg added a comment - I finally have some time to work on this. I just created the headless feature using the feature id org.codehaus.groovy.headless.feature. This feature will be available from the update site, but will not be categorized and so the only way to see it would be if you uncheck "Group items by category".
          Hide
          Andrew Eisenberg added a comment -

          I have committed the changes. Since I had to change the build scripts, the next build may not succeed, but this should be available in the update site for the next successful dev snapshot.

          Show
          Andrew Eisenberg added a comment - I have committed the changes. Since I had to change the build scripts, the next build may not succeed, but this should be available in the update site for the next successful dev snapshot.
          Hide
          Andrew Eisenberg added a comment -

          Now in the 3.6 stream dev build. Feature reordering is now complete. The headless Groovy-Eclipse feature is org.codehaus.groovy.headless.feature. It is currently not in any feature category, so you will not see it by default from the update manager. But if you uncheck "Group items by category", you will see it. This feature is not meant for end-user consumption, but only for headless (buckminster) builds.

          Show
          Andrew Eisenberg added a comment - Now in the 3.6 stream dev build. Feature reordering is now complete. The headless Groovy-Eclipse feature is org.codehaus.groovy.headless.feature . It is currently not in any feature category, so you will not see it by default from the update manager. But if you uncheck "Group items by category", you will see it. This feature is not meant for end-user consumption, but only for headless (buckminster) builds.

            People

            • Assignee:
              Andrew Eisenberg
              Reporter:
              Achim Demelt
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: