Automatic reformat / optimize imports before file save

Hello,
I wonder if there is a setting in IntelliJ to perform an automatic reformat / optimize imports before every save operation.
Would be a cool feature, because it's easy to forget.

Regards,
Reto

8 comments
Comment actions Permalink

Hello,

I wonder if there is a setting in IntelliJ to perform an automatic
reformat / optimize imports before every save operation.

Would be a cool feature, because it's easy to forget.

Regards,
Reto


Save is performed automatically by IDEA mostly so this feature would become
annoying soon. We do provide an ability to perform these actions on commit
to the version control. Isn't that enough?

0
Comment actions Permalink

That's cool and even better, but where do I activate this feature ?

Thanks,
Reto

0
Comment actions Permalink

There's two checkboxes on commit project (Ctrl+K) dialog.

That's cool and even better, but where do I activate this feature ?

Thanks,
Reto



0
Comment actions Permalink

The only three checkboxes I have on the Ctrl+K Screen are:
- Keep checked out
- Store only latest version
- Checkout immediately

I' m using IntelliJ 4.5.3 and SourceSafe for Version Control.
Is this option Source Control dependent ?

0
Comment actions Permalink

Well, I'm affraid this doesn't work for SourceSafe. Only works for CVS, SVN,
Perforce and StarTeam.
Would you please submit a feature request for this?

-


Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"

The only three checkboxes I have on the Ctrl+K Screen are:
- Keep checked out
- Store only latest version
- Checkout immediately
I' m using IntelliJ 4.5.3 and SourceSafe for Version Control. Is this
option Source Control dependent ?




0
Comment actions Permalink

Done (feature request added).

0
Comment actions Permalink

This is great, but since I tend to commit files individually (with a different message for each), it would be nice if there were some sort of default setting to do this on individual file commits. I'm now using 5.0.2; I seem to remember this being an option on 4.5?

Please add it back :)

--Dolan

0
Comment actions Permalink

Hello Dolan,

Option should be right there, in the commit file dialog (even if single one).
There was a bug though this option didn't actually work when commiting single
file. The bug was fixed and the fix is included in upcoming 5.1 version to
be released in a week or so. Early access build is available for download
at http://www.intellij.net/eap

-


Maxim Shafirov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

This is great, but since I tend to commit files individually (with a
different message for each), it would be nice if there were some sort
of default setting to do this on individual file commits. I'm now
using 5.0.2; I seem to remember this being an option on 4.5?

Please add it back :)

--Dolan



0

Please sign in to leave a comment.