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.

Bug 124462 - "Save As" does not assign new file name to the currently open file you are saving
Summary: "Save As" does not assign new file name to the currently open file you are sa...
Status: RESOLVED DUPLICATE of bug 116691
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Samaresh Panda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-26 16:47 UTC by theshowmecanuck
Modified: 2008-08-15 00:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description theshowmecanuck 2007-12-26 16:47:29 UTC
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.
Comment 1 Vitezslav Stejskal 2008-01-02 12:55:37 UTC
I'm not sure where/how this actions in implemented, so let's start with trying openide/actions first.
Comment 2 theshowmecanuck 2008-01-03 00:00:07 UTC
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.
Comment 3 theshowmecanuck 2008-01-03 00:03:24 UTC
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.  :)
Comment 4 theshowmecanuck 2008-01-03 00:07:20 UTC
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).
Comment 5 Jiri Prox 2008-01-03 08:09:27 UTC
Reassigning to openinde, the action is implemented there
Comment 6 Vitezslav Stejskal 2008-01-03 11:35:46 UTC
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
Comment 7 Jiri Rechtacek 2008-02-28 11:38:59 UTC
It's valid only for XML files. Works correctly for Java file and for file w/o MIME type as well. => reassign to xml.
Comment 8 Samaresh Panda 2008-08-15 00:21:58 UTC

*** This issue has been marked as a duplicate of 116691 ***