When renaming a file, netbeans prohibits the user from changing the file extension.
The use case where this issue comes to light is when a user wishes to refactor a .rhtml file to be a .rxml file.
When renaming the 'name' of the file (sans extension) should be selected so typing overwrites the selected part, but
still leaves users the option of renaming the file completely.
Not a problem of the explorer. Explorer just uses Node's getName/setName methods.
Not a problems of the Node layer either, DataObject handles this.
Not even a problem of the DataSystems layer, each data object is free to implement getName/setName to allow file
extension change, as you can see on the example of text files: create a text file aa.txt, rename it however you wish.
You can even rename it to, say, aa.mf, but then the ManifestDataObject takes ownership of the file and no further
extension changes are possible.
If it's a use case for Ruby developers, then ruby's DataObject should allow this for it's files.
This is really an enhancement request, not a defect.
*** Issue 123759 has been marked as a duplicate of this issue. ***
This occurs across the entire IDE and not just in Ruby. C++ and other languages have the same issue. I don't know what
is the best category for things that span the entire IDE, but someone should reassign this.
Also, there are 10 other issues that are duplicates of this and one that looks like it was opened years ago. If you
search for "file extension" you'll see them all and someone should clean them up and then determine who needs to fix
I'm currently using NetBeans 7 RC 2 on Mac OS and this problem still exists! I wonder if it would take that long to fix something like this.
4 years and counting...
I know that going to Properties one can change the extension of the file, but what we want is to press F2 and be able to rename the extension as well, not having to right click + click on properties click on the "..." button before we can change the extension, and then pressing Enter doesnt equals to clicking "Ok" (looks like extensions can have line breaks in Netbeans' world).
(1)Left click file
(1)Right click file
(2)Left click properties
(3)Left click "..." button
(5)Left click Ok
Doesnt look like much and it probably isnt, but I still think its a better way
*** This bug has been marked as a duplicate of bug 27444 ***
I don't think it is exactly a dup. It can be considered a ENH to make the UI better. Can I reopen it?
I don't think it's fair to close this ticket as a duplicate of an 11 years old ticket (4 major version earlier).
I bumped the IDE version, since the problem still exists in NetBeans 7.3 and 7.4 beta when renaming from ".php" or ".phtml" for instance.
Would like to add my vote to this. I don't understand why netbeans ignores the extension while renaming a file, or while creating it.
A file extension is also part of the actual name of the file, especially for those with a unix mindset where it seems bizarre to hide file extensions.
It seems like all of that confusion could be avoided if netbeans considered the file extension as part of the file name.
*** Bug 237555 has been marked as a duplicate of this bug. ***
This still exists and I see no way to rename e.g. "index.html" file to "index.php" (extension change is not available even in Properties).
I've just voted for this, too. I quite often find myself using the inbuilt file creation wizard to create a .jspf file but forgetting to click the "create as fragment" checkbox, so it gets created as a .jsp file instead.
Ideally, I'd like to just select the file, hit F2, and change the extension. Why is on Earth should the IDE want to prevent me doing that? Having to delete and recreate the file, or rename via the properties box is a frustrating PITA.
I voted for this extremely useful feature because it make life easier. However, since years nobody is going to implement this. Amazing. I thought it is an easy task but I would guess its not.
I vote for this, too. Extremely useful. Doesn't make sense don't have it.