This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Situation: I am editing a file (in this case an XML file) and I want to save it as a different name and keep editing. Action: 1) editing original file name: "file1" 2) I click the file menu and 'save as' 3) I save the file as "file2" 4) The open file in the editor is still "file1" 5) In order to edit "file2" I have to go to file open and open it up (and close "file1" because I am no longer interested in it). Bottom Line: This is totally inconsistent with 99.99% of all windows based based GUI editors (!!!NOTE: I pursposely did not put capitalization on the word 'windows'... I am talking about *any* GUI system, Windows, OSX, KDE, GNOME). When I save as I expect the new file to be the one I am editing, and I am sure this is the same for most other people. I messed up a file due to this. Also, when I go to open the file I have to do so using the the OS's file manager because the open file dialog in NetBeans does not allow me to search based on last updated. And I am working on xml log files with crazy GUID file names. So this makes it even more annoying for me. :) Please fix this to be like every other editor out there (it should be easy). Thank you.
I'm not sure where/how this actions in implemented, so let's start with trying openide/actions first.
Okie Doke 1) open ide 2) file/open file/open an xml file (file1) 3) edit file "file1" 2) I click the file menu and 'save as' 3) I save the file as "file2" 4) The open file in the editor is still "file1" (if I save again I will overwrite file1 with the data that belongs in file2). 5) In order to edit "file2" I have to go to file open and open it up (and close "file1" because I am no longer interested in it). Hope that helps.
This has to do with saving an xml file that is being edited. I have changed this to editor since it doesn't have anything to do with opening the ide. :)
Sorry some clarification to my last set of bullet points: 4) The open file in the editor is still "file1" (if I save again I will overwrite file1 with the data that belongs in file2). is better said this way. 4) The open file in the editor is still has the file name "file1" (if I save again I will overwrite file1 with the data that belongs in file2). That is even though I have modified this file and saved it with another name, it is still instantiated in the editor with the _original_ file name. Even though I want it to have a new file name. This makes it a very dangerous possibility that I could over-write and destroy the data in the original file, which I don't want to do (that is why I saved it with a different name).
Reassigning to openinde, the action is implemented there
theshowmecanuck, thanks for your clarifications. We do understand your report and I tested and confirm the behavior that you described. If I am not mistaken the 'Save As' action is implemented in the openide/actions module, which is why I passed your report there. I know that the connection between what you see in Netbeans UI and modules where this functionality is implemented can be unclear, but please rest assured that somebody will have a look at this problem and decide what needs to be done. Cheers
It's valid only for XML files. Works correctly for Java file and for file w/o MIME type as well. => reassign to xml.
*** This issue has been marked as a duplicate of 116691 ***