Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.6.1.Release
-
Fix Version/s: 2.8.0.Release
-
Component/s: Editor
-
Labels:None
-
Number of attachments :
Description
I have a Groovy source file in my workspace that, whenever I change it and hit Ctrl+S to save, the file is saved, but the editor is kept dirty ("*" in the editor title).
The issue is caused by the following strange behaviour. On every save, the following lines are re-formatted:
ModelConversionImplG(){
basicProfilefactories[SoloArtist.class] = {
return new SoloArtistBean(defaultSongLicense: it.defaultSongLicense,
foundationDate: it.foundationDate, dissolutionDate: it.dissolutionDate)
} as BasicProfileBeanFactory;
basicProfilefactories[Band.class] = {
return new BandBean(defaultSongLicense: it.defaultSongLicense,
foundationDate: it.foundationDate, dissolutionDate: it.dissolutionDate)
} as BasicProfileBeanFactory;
basicProfilefactories[Listener.class] = {
return new ListenerBean() } as BasicProfileBeanFactory;
basicProfilefactories[Club.class] = {
return new ClubBean(googleMapsAddress:it.googleMapsAddress)
} as BasicProfileBeanFactory;
}
On even saves, the code looks like that. On odd saves, it's reformatted as such:
ModelConversionImplG(){
basicProfilefactories[SoloArtist.class] = {
return new SoloArtistBean(defaultSongLicense: it.defaultSongLicense,
foundationDate: it.foundationDate, dissolutionDate: it.dissolutionDate)
} as BasicProfileBeanFactory;
basicProfilefactories[Band.class] = {
return new BandBean(defaultSongLicense: it.defaultSongLicense,
foundationDate: it.foundationDate, dissolutionDate: it.dissolutionDate)
} as BasicProfileBeanFactory;
basicProfilefactories[Listener.class] = { return new ListenerBean() } as BasicProfileBeanFactory;
basicProfilefactories[Club.class] = {
return new ClubBean(googleMapsAddress:it.googleMapsAddress)
} as BasicProfileBeanFactory;
}
So, there seems to be two problems here:
- the formatter is formatting the same code differently on every save operation, guaranteeing the same formatting on every other save
- the editor is left dirty after the formatting operation has finished
I have some save actions enabled but I don't know which of them are causing this. I may export the Eclipse formatter settings if you need further details.
Are there any errors in your error log?