palantir / palantir-java-format

A modern, lambda-friendly, 120 character Java formatter.
Apache License 2.0
481 stars 48 forks source link

Formatter is run when IntelliJ loses focus and file is unchanged #1092

Open emmercm opened 6 months ago

emmercm commented 6 months ago

What happened?

Starting with IntelliJ v2024.1.2 (this didn't happen with v2024.1.1), when my IntelliJ window loses focus (i.e. due to alt-tab) this plugin is running on files that haven't changed. This causes the files to be re-saved, frequently giving me a dialog box that disk and in-memory changes are conflicting even though they aren't.

In case it matters, I'm on a MacBook Pro M2 running macOS Sonoma v14.4.1.

What did you want to happen?

The plugin should not run when IntelliJ loses focus and no files have been changed.

jamesmazur commented 6 months ago

I'm also having this problem.

jamesmazur commented 5 months ago

It appears not to be an issue in 2.44.0, but is an issue in 2.47.0.

cdorf1 commented 1 month ago

Same Issue with palantir plugin 2.50 and IntelliJ 2024.2.3

Seems like this is going on for a while, I know that this has not been an issue with IntelliJ 2023. Can you please take a look at this, since its really impacting the workflow. Files are constantly changed (although they should not) and the dialog box with the in-memory changes is a real pain.

Thank you