This wiki does not contain official documentation and is currently deprecated and read only. Please try reading the documentation on the Liferay Developer Network, the new site dedicated to Liferay documentation. DISCOVER Build your web site, collaborate with your colleagues, manage your content, and more. DEVELOP Build applications that run inside Liferay, extend the features provided out of the box with Liferay's APIs. DISTRIBUTE Let the world know about your app by publishing it in Liferay's marketplace. PARTICIPATE Become a part of Liferay's community, meet other Liferay users, and get involved in the open source project. « Back to Using IntelliJ...
Arranging code with IntelliJ
Rearranger is a nice IntelliJ plugin that may help with arranging code according to Liferay development style. It can organize methods, variables constructors... as defined in user rules.
You can download these rules from this link and import them using Configuration tab option (tested on IntelliJ 13 and Rearranger 5.5)
Here is the screenshot of rules list in action:
Rules can be also exported to a file and therefore shared among developers
Once when rule patterns are generated (tab 'General'), you can invoke Rearranger on current file simply by a hotkey or from a quick-menu.
Other settings #
\n// (-{30} FIELDS -{30}|-{26} ((STATIC|OTHER) METHOD|ENUMERATION|INNER CLASSE)S -{26}|-{27} (CONSTRUCTORS|main\(\) method) -{27}|-{21} (GETTER / SETTER METHODS|Interface [A-Za-z0-9_]+) -{21}|-{24} (CANONICAL|INTERFACE) METHODS -{24})\nOn Spacing and Extracted method tabs everything is unchecked.
33128 Views