Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
eclipse 3.2.1, jdk 5.0 release 9 , windows xp
-
Patch
Description
the output folder for groovy files in the plugin is kept in two places:
The first is found under 'Window' -> 'Preferences' then 'Groovy Preferences' and 'Default Groovy Compiler Output Location'. I believe this is meant to be the default output location that is added to a Java project when the groovy nature is added.
The second is found on the project properties in 'Groovy Project Properties' as 'Groovy Compiler Output Location'. I believe this is where the groovy compiler should put the class files generated for that project.
If you change the project compiler output location an event fires that removes the old output folder ( if it is not the java output folder ), creates the new output folder and does a rebuild of that project.
Right now, if you change the 'Default Groovy Compiler Output Location' stored in the workspace the above mentioned event fires for each project in your workspace. It doesn't actually change the property on the project it just deletes the old folder, adds the new and does a rebuild on each one of your projects. This can really wreak havoc on your projects and if you get caught in the wrong scenario can get you some really nasty errors.
I've attached a patch to correct this.
We were using the same preference constant to find both values so I added a new reference constant for the default compiler location, and changed the appropriate references to use the new property.
Note: right after applying the patch your default output location will be blank, that is because the property has a new name, and it is stored correctly after you change it.