// Code as shown in the "Format" dialog. @Anno( paramA = "a Value", paramB = "bValue" ) public class ClassA extends Object implements InterfaceA, InterfaceB, InterfaceC { public int number = 1; public String letters[] = new String[] { "A", "B", "C", "D" }; public ClassA() { } public int method( String text, int number, throws ExceptionA, ExceptionB { assert number + text.length() < 20 : "message"; if( text == null ) { text = "a"; } else if( text.length() == 0 ) { text = number == 2 ? "empty" : "nonempty"; number = ((op3() + 2) * op4); } else { number++; } for( int i = 1; i < 100; i++ ) { } while( this.number < 2 && number != 3 ) { method( "Some text", 12, new Object() ); } do { try { op1().op2.op3(). op4(); } catch( Throwable t ) { log(); } finally { close(); } } while( this.number < 2 && number != 3 ); } public enum Where { NORTH, EAST, SOUTH, WEST; } } // After hitting 'Format'. @Anno( paramA = "a Value", paramB = "bValue" ) public class ClassA extends Object implements InterfaceA, InterfaceB, InterfaceC { public int number = 1; public String letters[] = new String[]{ "A", "B", "C", "D" }; public ClassA() { } public int method( String text, int number, throws ExceptionA, ExceptionB { assert number + text.length() < 20 : "message"; if( text == null ) { text = "a"; } else if( text.length() == 0 ) { text = number == 2 ? "empty" : "nonempty"; number = ((op3() + 2) * op4); } else { number++; } for( int i = 1; i < 100; i++ ) { } while( this.number < 2 && number != 3 ) { method( "Some text", 12, new Object() ); } do { try { op1().op2.op3(). op4(); } catch( Throwable t ) { log(); } finally { close(); } } while( this.number < 2 && number != 3 ); } public enum Where { NORTH, EAST, SOUTH, WEST; } }