| Summary: | Adding xtext nature to a groovy-project deletes groovy files on save | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Thomas Schindl <tom.schindl> | ||||
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | sebastian.zarnekow, sven.efftinge | ||||
| Version: | 2.3.0 | Flags: | sven.efftinge:
juno+
|
||||
| Target Milestone: | RC2 | ||||||
| Hardware: | PC | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Thomas Schindl
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. |