Keeping track of changes is difficult enough. Merging differently formatted code makes sad monkeys !
If you use eclipse, we have a file which will make eclipse do the myrobotlab "standard" formatting.
Here it is ! -> https://github.com/MyRobotLab/myrobotlab/blob/develop/mrl_java_formatte…
- Just start eclipse.
- Window -> Preferences -> Java -> Code Style -> Formatter -> Import
- Import this file -> https://github.com/MyRobotLab/myrobotlab/blob/develop/mrl_java_formatte…
That's It !
Eclipse powerful auto-format keys.
- CTRL-SHIFT-F - auto format - the file currently in the IDE. This can even be applied over an entire project.
- CTRL-SHIFT-O - organize imports - will sort and remove unused imports.
Simple rule to remember - if you're going to do a lot of formatting, do that as a "separate" commit from other code changes.
Thanks !
Eclipse Java Formatter
I've checked in an eclipse java formatter in the root directory of the myrobotlab project.
https://github.com/MyRobotLab/myrobotlab/blob/develop/mrl_java_formatte…
When you check out the code, you can import the settings by loading this file.
Thank you, great tip
Thank you, great tip
Hi seem when I use the
Hi seem when I use the formater , it crop java doc lines.
First I'm sorry for javadoc bombing !
Are we all using the same ?
oops
So, yes we all should be using the mrl eclipse formatter checked in as the file
I think, if we want to change our formatting rules regarding javadocs, I hope we can all specify it in that file.
I'm ok if we have longer lines in the javadoc. I do prefer an arbitrary max width of 132 chars. I'm not sure why I like that number, so feel free to propose another one if you like.