|
|
|
What about thouse people who always keep this option off and optimize imports on checkin?
These options, although associated with projects, obviously must not be shared because they reflect preferences of particular user. It's just like colors in the editor.
No, it's completely different from the color settings:
It logically belongs to the code style. If you share the project you want to have a common style for imports. (If you do not share the project then the discussion is moot anyway, right?) Having said that, I have to correct myself a little: Hmm, I'd say it should either be an IDE setting or a project setting because I think it would drive me nuts when having to configure these options for every project I check out on a different machine. My personal preference would be the IDE setting - like it used to be in 6.0.x.
Sascha, do you work on different projects where the imports of one project must not be touched (re-organized) and the other project requires to always optimize imports according to Idea's code style?
In Demetra I had to switch the IDE setting each time I opened another project. No, to be honest, this affects only projects where the imports don't matter to anyone.
I see the problem, but to be honest the level of complexity and the potential to get unexpected/unwanted behavior at a different workstation or a new project has already been increased with the change from IDEA 6 to 7 (I've wondered about the missing auto-import several times now). Now storing the settings for the project-specific code style in the IWS would finally end in something that will almost never work out-of-the-box without tweaking anything first. Sascha, I agree with your last statement and I myself would prefer to see the option in the IDE settings (like it was previously), but there's a number of users that find the project level setup useful, so the iws file is a good compromise.
And Stephen, I can suggest a "fix" for your problem: just turn off those settings and use "Optimize imports before checkin". |
|||||||||||||||||||||||||||||||||||||||||||||
Anyway, I like it the way it works in Selena:
Some of my projects are shared among other developers, some of them using Eclipse: On these projects imports must not be changed, because they do not always follow a common pattern. Changing them would bring noise to CVS.
On my own projects I have both options enabled, so that imports always stay clean.