ArtiSynth Coding Standard

8 Align conditional expressions with the opening parentheses

When line wrapping is used inside a conditional expression, the expression itself should be aligned with the opening parentheses, with operators placed at the right:

         if (e.getSource() instanceof Rotator3d ||
             e.getSource() instanceof Transrotator3d ||
             e.getSource() instanceof Scaler3d) {
            centerTransform (transform, dragger.getDraggerToWorld());

Again, note the Eclipse will not generally enforce this, and will instead tend to produce output like this:

         if (e.getSource() instanceof Rotator3d
         || e.getSource() instanceof Transrotator3d
         || e.getSource() instanceof Scaler3d) {
            centerTransform (transform, dragger.getDraggerToWorld());