Rearranging Code Using Arrangement Rules
You can rearrange your code according to your arrangement rules preferences.
To rearrange your code using the arrangement rules
- In the editor select a part of the code that you want to rearrange.
- On the main menu, choose File | Settings | Code Style
Alternatively, use Ctrl+Alt+S.
- Open Code Style node and select the appropriate language.
- On the Arrangement tab of the language settings, specify rules for your code rearrangement and click OK .
- On the main menu, choose Code | Rearrange Code .
Alternatively, on the main menu, choose Code | Reformat Code . In the Reformat Code dialog, select Rearrange entries check box and click OK .
Consider the following code that lets you test an arrangement rule that puts fields before methods:
Last modified: 12 November 2014