Skip to content

Instantly share code, notes, and snippets.

@vanpeerdevelopment
Last active September 15, 2025 21:28
Show Gist options
  • Save vanpeerdevelopment/8198598 to your computer and use it in GitHub Desktop.
Save vanpeerdevelopment/8198598 to your computer and use it in GitHub Desktop.

Revisions

  1. vanpeerdevelopment revised this gist Dec 31, 2013. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions formatter-annotation.java
    Original file line number Diff line number Diff line change
    @@ -11,9 +11,9 @@ public void nonFormattedMethod() {
    // @formatter:on

    /**
    * Without the @formatter annotations the
    * same piece of code is formatted as below.
    */
    * Without the @formatter annotations the
    * same piece of code is formatted as below.
    */
    public void formattedMethod() {
    int sum = 1 + 2 + 3
    + 4 + 5;
  2. vanpeerdevelopment revised this gist Dec 31, 2013. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions formatter-annotation.java
    Original file line number Diff line number Diff line change
    @@ -10,12 +10,12 @@ public void nonFormattedMethod() {
    }
    // @formatter:on

    /**
    * Without the @formatter annotations the
    * same piece of code is formatted as below.
    */
    public void formattedMethod() {
    int sum = 1 + 2 + 3
    + 4 + 5;
    }
    /**
    * Without the @formatter annotations the
    * same piece of code is formatted as below.
    */
    public void formattedMethod() {
    int sum = 1 + 2 + 3
    + 4 + 5;
    }
    }
  3. vanpeerdevelopment revised this gist Dec 31, 2013. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions formatter-annotation.java
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,14 @@
    public class Formatter {

    /**
    * The next piece of code is not formatted
    * because of the @formatter annotations.
    */
    // @formatter:off
    public void nonFormattedMethod() {
    int sum = 1 + 2 + 3 + 4 + 5;
    }
    // @formatter:on
    /**
    * The next piece of code is not formatted
    * because of the @formatter annotations.
    */
    // @formatter:off
    public void nonFormattedMethod() {
    int sum = 1 + 2 + 3 + 4 + 5;
    }
    // @formatter:on

    /**
    * Without the @formatter annotations the
  4. vanpeerdevelopment revised this gist Dec 31, 2013. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion formatter-annotation.java
    Original file line number Diff line number Diff line change
    @@ -18,5 +18,4 @@ public void formattedMethod() {
    int sum = 1 + 2 + 3
    + 4 + 5;
    }

    }
  5. vanpeerdevelopment revised this gist Dec 31, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions formatter-annotation.java
    Original file line number Diff line number Diff line change
    @@ -18,4 +18,5 @@ public void formattedMethod() {
    int sum = 1 + 2 + 3
    + 4 + 5;
    }

    }
  6. vanpeerdevelopment created this gist Dec 31, 2013.
    21 changes: 21 additions & 0 deletions formatter-annotation.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    public class Formatter {

    /**
    * The next piece of code is not formatted
    * because of the @formatter annotations.
    */
    // @formatter:off
    public void nonFormattedMethod() {
    int sum = 1 + 2 + 3 + 4 + 5;
    }
    // @formatter:on

    /**
    * Without the @formatter annotations the
    * same piece of code is formatted as below.
    */
    public void formattedMethod() {
    int sum = 1 + 2 + 3
    + 4 + 5;
    }
    }