Reputation: 659
Why can't we just F2 in IDEs?
Instead we have to Refactor -> Rename... -> Enter name, tick some boxes etc.?
I understand that being more or less necessary (even if it could also work without all the hassle) for variables/methods etc., but if I JUST want to change the name of a file, why is this not implemented to work just like that?
(I don't know if this is true for ALL IDEs, but i suppose the majority, specifically talkiing about JetBrains here)
Upvotes: 0
Views: 70
Reputation: 103
Firstly, the file name could be referenced from other files, so needs to be changed in those files too.
Secondly, some languages, like Java, use the file name within the file. In Java, the class name must be the same as the file name without the .java extension.
Upvotes: 1