Andrea Aime wrote: > Hmmm... I always clean imports, but never user CTRL-ALT-F because it > mixes together real changes with formatting ones.
Ctrl-Shift-F, perhaps? Reformatting of any kind is a judgement call. I avoid gratuitous reformatting unless I have refactored most of the code and claim exclusive blame (i.e. not often). For the benefit of new players (not Andrea!) here are some other options for improving formatting of existing code in Eclipse. In order of decreasing intrusiveness (i.e. later is better): (A) Select all (Ctrl-A) and fix indentation (Ctrl-I). I suspect this will break "svn blame" for many lines, but will fix all leading tabs without otherwise imposing your formatting on other code. (B) Select the subset you are working on and reformat (Ctrl-Shift-F). Use Compare With > Base Revision to ensure your reformat did not change lines outside your intended local changes. (C) Select subset and and fix indentation (Ctrl-I). Again, check against the base revision. Again, consistency with convention versus consistency with existing code is a judgement call. Avoid having to use your judgement ;-) by producing all new code formatted to spec: (1) use the GeoTools Eclipse formatter config and (2) use Ctrl-Shift-O, Ctrl-Shift-F, Ctrl-S before any commit. Another trick I use is end-of-line comments (//) to defeat Eclipse line wrapping when it is inappropriate or does a terrible job. Kind regards, -- Ben Caradoc-Davies <[email protected]> Software Engineer, CSIRO Exploration and Mining Australian Resources Research Centre 26 Dick Perry Ave, Kensington WA 6151, Australia ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
