On Jul 3, 2011, at 11:49 PM, Urs Frei wrote:
Yes, we should all use the same formatting.
Eclipse-built-in formattting would be okay. But we'd rather prefer using
greater line length for code and comments as we talked about it earlier.
Besides, we'd like to use indentations for switch cases.
We're using only two white spaces instead
or tab to win space on display. But we're open to different preferences.
Most important is that all committers use the same formatting as you mentioned
it. And this settings should be available on git as well!
I agree that we need longer lines (I think 800 is too many! I use 120.) but we should definitely use tabs for all white space. I was using four spaces because I thought that was what other projects were doing but it turns out that now almost everyone is using tabs. For the 4 vs. 2 spaces, I think that only affects the code presentation, right? As long as it doesn't change anything about the checked in code, use what you'd like -- I prefer 4 just because I'm used to it.
1. I also like one blank line before first declaration because I think it is looks silly without.
2. No NL for empty anonymous.
3. No new line after param tags.
4. Never join lines (this is because so much generated code relies on where the generator places it and it is really messes up code comparisons.)
There are some code-formatting changes that I'd like to enforce as well. For example, one thing that really annoys me is conditional statements without braces..EMF even generates code like this and it drives me bonkers..
BTW, we should review the code and change everything to Java 1.5 that can be, I think the choice of Java 1.6 in places is often arbitrary. For this reason, I'm still avoiding use of @Override as it unnecessarily prevents some code from running on Java 1.5.
So there are my modified proposals. If they make sense to you, I propose we run the code cleanup on all AMP sources and then hopefully that will get us all on track.