title: Customize an Eclipse formatter to remove unnecessary curly braces
body: <p>I would like to configure a formatter in Eclipse that removes curly braces when they surround a return/break/continue control statement:</p>
  
  <pre><code>if (x == y) {
      return true;
  } //that's bad
  
  if (x == y) return true; //that's better
  </code></pre>
  
  <p>I've found under <code>Preferences --&gt; Java --&gt; Code Style --&gt; Formatter --&gt; Control Statements</code> how to keep <code>if</code> and <code>else</code> statements on one line, but not how to get rid of the unnecessary braces. Does Eclipse let you define a formatter which eliminates redundant braces?</p>