1

I recently found the AIDE IDE for Android, and love the fact that the editor puts it's braces on the same line when declaring and new code block, like so:

public void foo(){}

Instead of

public void foo(){
}

I think it looks a lot cleaner when you don't need to put much in the method. Is there anyway in Eclipse to do this? I've already looked at the braces settings, but it doesn't seem there's anything in here about this.

2
  • 1
    Do you mean "when you don't need to put anything in the method"? That really doesn't happen often. And when it happens, adding a comment explaining why the method doesn't do anything is a good practice.
    – JB Nizet
    Commented Jan 11, 2014 at 14:48
  • This is personal preference for my personal projects. I also sometimes have one liners, and would like to save some white space.
    – user1650305
    Commented Jan 11, 2014 at 14:56

1 Answer 1

3

You can uncheck the "insert new line in empty method/class/block body" under "New Lines" which is three tabs to the right of "Braces."

1
  • Thanks! That's pretty much as close as I think I'll get to what I wanted!
    – user1650305
    Commented Jan 11, 2014 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.