Rearranging Code and Optimize Imports - with one command ?

Answered

Hi,

i'm looking for a command that: Rearranging Code and Optimize Imports!

 

'Reformat code' or 'Code cleanup'- should do that ? 

 

is there a coding 'style'/ 'template' - what I can create or something ?

 

(sry I been using resharper and new to IDEA)
Thanks

4 comments

You can record a macro from these actions and assign a new keyboard shortcut to this macro.

0

Imports order and order of the code elements can be specified in the code style settings https://www.jetbrains.com/idea/help/code-style.html.

0

Thanks!

if I have specified in the code style (imports and code order) - should 'Reformat code'  do that? 

or need I record a macro?

1

Reformat don't rearrange, so you need a macro that will call 2 actions.

0

Please sign in to leave a comment.