reformat wish list

I would like if I could click a single button and:

all the modules in my project got rearranged and reformatted.

BUT classes  that had not recently changed would be left alone.

It is quite tedious rearranging and reformatting each module
individually.
--
Roedy Green Canadian Mind Products http://mindprod.com
A new scientific truth does not triumph by convincing its opponents and making them see the light,
but rather because its opponents eventually die, and a new generation grows up that is familiar with it.
~ Max Planck 1858-04-23 1947-10-04


0
3 comments
Roedy Green wrote:

BUT classes  that had not recently changed would be left alone.
  1. What's use case for that? Either you have a coding standard, or you don't.
  2. How do you define "recent"? 1 hour? 1 day? Since last restart?
0

On Sun, 02 Sep 2012 20:30:47 MSK, Lance   <no_reply@jetbrains.com>
wrote, quoted or indirectly quoted someone who said :

>

Roedy Green wrote:
>BUT classes  that had not recently changed would be left alone.
>

>1. What's use case for that? Either you have a coding standard, or you don't.
>2. How do you define "recent"? 1 hour? 1 day? Since last restart?

If they have not changed since the last reformat, there is no need to
do them again.

You could either track the last reformat timestamp on a per file basis
or a single global one.  You would normally only request a global
reformat since it would be fastest.  It would only do the files that
have recently changed.


--
Roedy Green Canadian Mind Products http://mindprod.com
A new scientific truth does not triumph by convincing its opponents and making them see the light,
but rather because its opponents eventually die, and a new generation grows up that is familiar with it.
~ Max Planck 1858-04-23 1947-10-04


0

Roedy Green wrote:
If they have not changed since the last reformat, there is no need to do them again.

If no reformat is needed, they are not reformatted. This is evidenced by the fact that when you reformat, the file does not show as modified in version control. Hence it was not changed. It seems to me that what you are asking for already exists. Open the project window, select the root node of the project, and initiate a reformat. This will reformat the entire project. Only files that do not conform to the format settings are modified. This takes only a few seconds on a large project.

You also have the option to reformat the code when committing to version control.Only the changed files being committed are reformatted. This would also satisfy the desire to only reformat recently changed files.

0

Please sign in to leave a comment.