Originally the GXF code base has had formatting conventions that were largely based on Eclipse defaults. Developers using other IDEs such as IntelliJ were unable to set up their development environment to match these settings completely. This caused formatting differences distracting from the actual changes and discussions handling pull requests, and harmed consistency.
In search of better defaults we decided to check if we could establish conventions that are easier shared, and ended up with Google Java Format. IDE configuration settings to apply an extended version of the Google Java Format conventions for Eclipse and IntelliJ can be found in this Config repository. The modifications to Google Java Format add pre-existing conventions in the GXF code base that should not conflict with Google Java Style.
- Code cleanup in IntelliJ removes the last semicolon in an enum that has no code following the constants, and Eclipse does not do this. Both code-styles are fine! Eclipse will not add the semicolon again.
Valid style enum with semicolon:
public enum MethodAccessModeType {
NO_ACCESS,
ACCESS,
AUTHENTICATED_ACCESS;
}Valid style enum without semicolon:
public enum MethodAccessModeType {
NO_ACCESS,
ACCESS,
AUTHENTICATED_ACCESS
}