Community
Participate
Working Groups
How to reproduce: * install the groovyfx plugin (http://groovy.codehaus.org/Eclipse+Plugin) * create a groovy project (New > Project ... > Groovy Project) * create a Groovy-Class (New > Other ... > Groovy Class) * add the xtext nature to the project * modify the groovy file and save the changes => The groovy file is deleted!
Created attachment 216337 [details] patch I found the cause of the deletion - the SmapInstallingCompilationParticipant is assuming all compilation units are .java-Files and does a simple replace which is not a good idea (e.g. of it is a groovy class the Compilation units filename is MyGroovyClass.groovy), the smap replace fails and my groovy file is deleted by xtext.
Would be nice if you could consider this for Juno.
I used IPath.removeFileExtension and .addFileExtension instead of the string replace. Pushed to master.
Requested via bug 522520. -M.