diff --git a/development-101.md b/development-101.md index 1b68784..265f2b6 100644 --- a/development-101.md +++ b/development-101.md @@ -63,6 +63,26 @@ If you find that tedious, there are some alternatives: button on next to the commit button which let's you configure actions such as 'Reformat code' and 'Optimize imports' that happen at commit time. +### Save Actions Plugin + +The Save Actions Plugin needs some configuration to work as expected: + +* Go to `settings` → `Other Settings` → `Save Actions` + * In the `General` section, enable 'Activate save actions on save' + * In the `Formatting Actions` section, enable + * 'Optimize imports' + * 'Reformat file' + * 'Rearrange filds and methods' (important for xml attribute order etc.) + * In the `Java IInspection and Quick Fix` section, enable + * 'Add missing @Override annotations' + +Enabling the 'Rearrange fields and methods' option is nice for automatically +rearranging attributes in XML files, however it also enables rearranging of +Java source files, which can cause undesired changes in existing files. +To prevent that, navigate to `Editor` → `Code Style` → `Java`, select the +`Arrangement` tab and remove all the Matching rules defined in the +bottommost section. + ## Coding patterns ### Patterns for visibility and interfaces