Jindent

Jindent is a powerful source code formatter for the Java, C and C++ programming languages and offers a user-friendly standalone application, command line tool for batch processing and plugins for all IDEs, text editors and version control systems.