There is a feature in eclipse that you can enable to automatically insert curly brackets and semicolons into the right location. (More info in the top reply here)
Recently I started picking up the habit of adding the curly brace on the next line so that the braces end up lining up. I find that it makes the code nicer to look at. Is it possible to still use this auto positioning feature with curly braces, but instead of inserting the curly brace at the end, insert it on the next line like this:
for (int i = 0; i < 10; i++)
{
I have my eclipse formatter set to use this format, but unfortunately the auto position curly bracket doesn't appear to follow these rules. Anyone know how to fix this or a workaround without having to highlight all the code and format constantly?
Edit: I guess I wasn't really clear in my original post. I do have my formatter set to having braces on the next line, but eclipse's awesome insert at correct location feature doesn't seem to follow the formatters rules. I was trying to figure out if there was a way to solve this issue so that (like the link I posted above), typing a brace on the line will bring me to the next line instead of placing the brace at the end of the current line. Maybe eclipse has a macro plugin I can use for this?