dubreuia / intellij-plugin-save-actions

Supports configurable, Eclipse like, save actions, including "organize imports", "reformat code" and "rearrange code".
MIT License
531 stars 101 forks source link

Formatting the code that is not changed #344

Closed Ennigma closed 3 years ago

Ennigma commented 3 years ago

Describe the bug I have set it to format the code only for the changed code. However, it changes slightly the other code that is not modified by me.

What triggered the plugin Shortcut CTRL+SHIFT+S or CTRL+S.

Versions IntelliJ IDEA 2020.2.3 (Community Edition) Build #IC-202.7660.26, built on October 6, 2020 Runtime version: 11.0.8+10-b944.34 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: ParNew, ConcurrentMarkSweep Memory: 6077M Cores: 8 Registry: ide.balloon.shadow.size=0 Non-Bundled Plugins: AceJump, Key Promoter X, PlantUML integration, com.github.xwsg, JMeter plugin, com.dubreuia, org.pmesmeur.sketchit, simpleUML, com.intellij.plugins.xwinkeymap, myBitbucket, org.sonarlint.idea

image

dubreuia commented 3 years ago

Hello @Ennigma, thank you for your interest in the plugin. The save-actions plugin do not handle the formatting, the IDE does. The plugin is using the formatter you have configured for your project. If you don't want the new line to be added after a method, you can go to code style, then method format, and uncheck add new line after method (or something like that). Let me know if you need anything else. Cheers.