It's time for a discussion on what should be done on codestyles, I haven't seen yet any post by anyone at jetbrains about this. It would be useful to know their thoughts on this (in Ariadna and maybe on the next versions).
After all the postings about this, here's my view on a implementation: 1. Codestyles should migrate from ide options to project options: codestyle is a project property. 2. The default project has the list of available codestyles in *this* computer the default codestyles are permanently stored in the config dir, the same as now. (By the way, the config dir should be placed inside the system dir, so that it's in a read write place). 3. The current project has an assigned codestyle. A copy of the codestyle is stored inside the project file. If the project is moved/copied/checked out/etc, the codestyle goes with it. !!! The codestyle inside the project file is the one used for code layouts, optimize imports/etc. !!! Having the codestyle inside the project file is the simplest way to ensure the project one codestyle and it's also a simple way to distribute the codestyle to new users/installations/etc. Note that the codestyle list could continue on IDE options, but moving it to the default project makes only one interface for maintaining codestyles. 4. For projects with one codestyle per user, the current project has an option "no codestyle". In this case, the default project codestyle is used for code layouting, etc. 5. Action to synchronize codestyles between the project and the defaults: another user may have changed the style in the current project or a default codestyle has changed and should be applied to several projects. Codestyles should have a timestamp so that the we can know which codestyle is obsolete. 6. Import codestyle command: if the codestyle exists only in the project, it's imported to the list of codestyles existing in the computer. This, I think :-) is the minimum implementation necessary. Optional: 7. IDE option "autocheck codestyle timestamps": when the project is opened idea compares timestamps ands asks the user if he wants to synchronize codestyles. Further options which I don't need implemented - after all, my projects have mandatory codestyles :-) Simple: 8. Startup option "-Didea.codestyle.path=path_to_codestyle.xml" to have the codestyle reside wherever the user wants. This makes it possible for users to share codestyles without having the codestyle inside the project file (for places with multi styles per project). Complicated: 9. Automatic code layout with project codestyle before commit to repository and before diffs. Automatic code-layout with codestyle on default project on checkout/update from repository. An IDE option to control this would be necessary. No reformat should be done if both styles are the same (including the timestamp). And that's all folks. I think I'll take some holydays, so that I'll not be burned with all the flames :-) Carlos -- Carlos Costa e Silva <[EMAIL PROTECTED]> _______________________________________________ Eap-features mailing list [EMAIL PROTECTED] http://lists.jetbrains.com/mailman/listinfo/eap-features
