GRECLIPSE
  1. GRECLIPSE
  2. GRECLIPSE-404

Groovy Eclipse plugin breaks Scala Eclipse plugin

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0alpha
    • Fix Version/s: 2.0.0RC1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Mac OS 10.6.1
      Eclipse EE 3.5
    • Number of attachments :
      1

      Description

      After installing GrEclipse, the Scala plugin (http://www.scala-lang.org/scala-eclipse-plugin) reports syntax errors all over the place, and programs can no longer be run. After uninstalling GrEclipse, Scala plugin works as expected.

        Activity

        Hide
        Peter Niederwieser added a comment -

        Clarification: Link points to the Scala Eclipse plugin update site.

        Show
        Peter Niederwieser added a comment - Clarification: Link points to the Scala Eclipse plugin update site.
        Hide
        Andy Clement added a comment -

        Andrew - do you know if the scala pointcuts are targeted at things like compilationunit creation and would be missing things we have factored out?

        Show
        Andy Clement added a comment - Andrew - do you know if the scala pointcuts are targeted at things like compilationunit creation and would be missing things we have factored out?
        Hide
        Andrew Eisenberg added a comment -

        I am fairly certain that the problem has to do with the CompilationUnitProviderAspect that comes with the JDT Weaving support that the Scala Plugin uses. They are using a very old version of JDT Weaving and this has some bad effects (such as not being able to co-exist with a recent build of AJDT).

        The only reasonable solution that I can think of is for the Scala plugin to use a more recent version of JDT Weaving. I believe that there is already a bug already open for this:

        https://lampsvn.epfl.ch/trac/scala/ticket/2327

        Actually, reading the bug now, it seems like it is describing a slightly different issue. So, I'd recommend that you open a new bug for the scala plugin. If you do, please post a link here. I'll be happy to help them fix it.

        Show
        Andrew Eisenberg added a comment - I am fairly certain that the problem has to do with the CompilationUnitProviderAspect that comes with the JDT Weaving support that the Scala Plugin uses. They are using a very old version of JDT Weaving and this has some bad effects (such as not being able to co-exist with a recent build of AJDT). The only reasonable solution that I can think of is for the Scala plugin to use a more recent version of JDT Weaving. I believe that there is already a bug already open for this: https://lampsvn.epfl.ch/trac/scala/ticket/2327 Actually, reading the bug now, it seems like it is describing a slightly different issue. So, I'd recommend that you open a new bug for the scala plugin. If you do, please post a link here. I'll be happy to help them fix it.
        Hide
        Andrew Eisenberg added a comment -

        Potential workaround:

        1. Uninstall the scala plugin.

        2. Install JDT Weaving and Equinox Aspects from here instead:
        http://download.eclipse.org/tools/ajdt/35/dev/update

        3. install the latest nightly build of the scala plugin:
        http://www.scala-lang.org/scala-eclipse-plugin-nightly
        This latest version of the plugin adds JDT Weaving as an optional dependency and so it is possible to install a later version of it.

        I am installing the nightly build of the plugin right now to see if the problem goes away.

        Show
        Andrew Eisenberg added a comment - Potential workaround: 1. Uninstall the scala plugin. 2. Install JDT Weaving and Equinox Aspects from here instead: http://download.eclipse.org/tools/ajdt/35/dev/update 3. install the latest nightly build of the scala plugin: http://www.scala-lang.org/scala-eclipse-plugin-nightly This latest version of the plugin adds JDT Weaving as an optional dependency and so it is possible to install a later version of it. I am installing the nightly build of the plugin right now to see if the problem goes away.
        Hide
        Peter Niederwieser added a comment -
        Show
        Peter Niederwieser added a comment - Just raised https://lampsvn.epfl.ch/trac/scala/ticket/2408
        Hide
        Andrew Eisenberg added a comment -

        Is the Scala plugin still broken if you have the latest version of AJDT installed?

        Show
        Andrew Eisenberg added a comment - Is the Scala plugin still broken if you have the latest version of AJDT installed?
        Hide
        Martin Ellis added a comment -

        Yes, it's still broken.

        Just checked with:

        I'll try to attach a screen grab so you can check versions...

        Show
        Martin Ellis added a comment - Yes, it's still broken. Just checked with: eclipse-jee-galileo-SR1-macosx-cocoa.tar.gz new workspace AspectJ from http://download.eclipse.org/tools/ajdt/35/dev/update Weaving enabled (before installing groovy or scala plugins) scala-nightly I'll try to attach a screen grab so you can check versions...
        Hide
        Martin Ellis added a comment -

        > I'll try to attach a screen grab so you can check versions...

        Attached.

        Also I forgot to mention: I've checked the scala plugin behaves correctly after uninstalling the Groovy feature, restarting Eclipse and doing a clean rebuild.

        Show
        Martin Ellis added a comment - > I'll try to attach a screen grab so you can check versions... Attached. Also I forgot to mention: I've checked the scala plugin behaves correctly after uninstalling the Groovy feature, restarting Eclipse and doing a clean rebuild.
        Hide
        Andrew Eisenberg added a comment -

        Got it. This was a real pain to find. The Scala plugin is now using so many aspects and there is no load-time weaving tool support, so I had to trace through the aspects by hand (and mind) to find out which one was broken.

        The problem was with org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName was no longer being called from jdt, but rather was delegated and called from within groovy-eclipse.

        The change I made ensures that the method is called from within JDT if the project is not a groovy project.

        Show
        Andrew Eisenberg added a comment - Got it. This was a real pain to find. The Scala plugin is now using so many aspects and there is no load-time weaving tool support, so I had to trace through the aspects by hand (and mind) to find out which one was broken. The problem was with org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName was no longer being called from jdt, but rather was delegated and called from within groovy-eclipse. The change I made ensures that the method is called from within JDT if the project is not a groovy project.

          People

          • Assignee:
            Andrew Eisenberg
            Reporter:
            Peter Niederwieser
          • Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: