forked from spring-projects/spring-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Spring Framework IDEA Code Formatting
Stéphane Nicoll edited this page Mar 17, 2014
·
4 revisions
This page describes the noticeable changes made to the default code formatting settings in Intellij IDEA. This is also a chance to review some of these changes to validate or tweak them if necessary:
These are the reported issues that we still discuss (or simply things that the formatter does not support). The first is what we use.
- Space in annotation parameter assignment:
@Foo(name="foo")vs.@Foo(name = "foo") - Space in annotation array parameter:
@Target({ ElementType.METHOD, ElementType.TYPE })vs.@Target({ElementType.METHOD, ElementType.TYPE})
- Default indent option to use tab character instead of space
- Use tab character
- Add a space before the left brace of an array initializer
- Keep when reformating: multiple expressions in one line, simple blocks in one line, simple classes in one line
-
else,catchandfinallyon new line - Method declaration parameters: do not align when multiline
- Keep one space before } (solely use to keep the space between the end of the last method and the end of the class)
- Minimum blank line after class header 0 (instead of 1)
- Disabled
- Class count to trigger static import to 50 (to prevent
import org.foo.*;instead of listing the classes oforg.foo) - Changed the import sequence to import in the following order:
static imports,java.*,javax.*, others,org.springframework.*. Each sequence is separated by a space
What's New in the Spring Framework
Building a distribution with dependencies
Migrating from earlier versions of the Spring Framework
Migrating to Spring Framework 5.x
Migrating to Spring Framework 4.x
Migrating to Spring Framework 3.x
Manually merging pull requests