Search code examples
intellij-ideawebstormstyling

Can I see rule used for reformat in IDEA IDE?


Sometimes when reformatting code via CTRL + ALT + S I struggle with finding rule which is the reason for changing my code. Is there any detailed view in any IDEA IDE for this?

Specific example:

Before Reformat:

myMethod(){}

After Reformat:

myMethod(){
}

And I kind of have to search through all styling settings.


Solution

  • You can try to do the following:

    • Select a code fragment

    • Press Alt+Enter and click Adjust code style settings

    See https://www.jetbrains.com/help/idea/reformat-and-rearrange-code.html#reformat_code for more information