SlickEdit Community
SlickEdit Product Discussion => SlickEdit® => Topic started by: edgue on August 17, 2018, 09:50:21 AM
-
Google has various style guides for languages such as Java, C++ ( see https://github.com/google/styleguide (https://github.com/google/styleguide)) for details.
There are instructions how to use the style guides with IDEs like IntelliJ or eclipse.
I am simply wondering if there are pre-defined "formatter templates" for SlickEdit with google java format?
-
There isn't a predefined Google Java style that ships with SlickEdit. I made a quick pass through section 4 of the style guide, and put together a (attached) style you can import via Tools -> Options -> Import/Export. Once you import it, you should be able to select it as the language style in Tools -> Options -> Languages -> Application Languages -> Java -> Formatting.
The differences from the style guide:
- There isn't a rule for spaces around the "&" in a type bounds. We'd need to add that to the formatter.
- We don't do the line wrapping.
- With the exception of some rules for return/throw, we don't rewrite code. So we don't force unbraced "if" statements to braced, or add grouping parenthesis, etc...
-
Thank you very much for the quick comeback. I appreciate your efforts!
Honestly, I find it a bit discouraging that there wasn't specific support before, but I is very nice to say how quickly you folks react.
In case our team decides to pick up the google formatter, I might provide some feedback if SlickEdit formatting will be in sync "enough" with what eclipse/intelliJ will be doing.