Class and file name - keep in sync?

I'd like to discuss the option to keep file name and class in sync. This is for the following cases:

- single class in a file (obvious)
- main class and supplementary classes. Supplementary are:

    • Inner classes

    • EventArgs and Delegate types

    • Exception classes

    • may be more...


That is, when single or main class is renamed, rename file as well.

Another option could be to keep in sync namespace and directory structure. E.g. Move Type could also move file to appropriate folder (and create, if needed).

Any feedback on idea?

2 comments
Comment actions Permalink

Uhm, Resharper already does this, doesn't it?

"Ilya Ryzhenkov" <no_mail@jetbrains.com> wrote in message
news:21272082.1082727455022.JavaMail.itn@is.intellij.net...

I'd like to discuss the option to keep file name and class in sync. This
is for the following cases:

>

- single class in a file (obvious)
- main class and supplementary classes. Supplementary are:

    • Inner classes

    • EventArgs and Delegate types

    • Exception classes

    • may be more...

>

That is, when single or main class is renamed, rename file as well.

>

Another option could be to keep in sync namespace and directory structure.
E.g. Move Type could also move file to appropriate folder (and create, if
needed).

>

Any feedback on idea?



0
Comment actions Permalink

Well, it didn't several times I tried rename feature before. Now, on a small test project it did. Either fresh addition, or a bug. I will need to dig it further.

0

Please sign in to leave a comment.