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 20147

Summary: Add "Save As" option
Product: platform Reporter: bamboo <bamboo>
Component: TextAssignee: Stanislav Aubrecht <saubrecht>
Status: RESOLVED FIXED    
Severity: blocker CC: anebuzelsky, mmirilovic, nikmolchanov
Priority: P3 Keywords: UI
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 94604, 98206    
Bug Blocks: 70467    

Description bamboo 2002-02-05 10:53:16 UTC
May be fine to have "save as option" to give us
the possibility to save a java file with another
name.
Comment 1 Jesse Glick 2002-02-20 11:36:05 UTC
Needs a full proposal; I don't know of any immediate plans to
implement such a thing.

You can already copy and paste to make another .java file; saving to a
different extension introduces a lot of messy UI issues, since
NetBeans normally categorizes files by extension.
Comment 2 Marian Mirilovic 2003-01-13 10:30:20 UTC
*** Issue 21838 has been marked as a duplicate of this issue. ***
Comment 3 Marian Mirilovic 2003-01-13 13:17:09 UTC
*** Issue 8155 has been marked as a duplicate of this issue. ***
Comment 4 Ari Meyer 2003-08-23 06:24:38 UTC
This is a feature that's standard on most IDE's and 
editors.  In agree that copy-paste also works, but this is 
something common to virtually all editors, and should not 
(from my limited perspective) be so difficult to 
implement.  If the extension issue is the problem, perhaps 
a first cut would just be limited to saving the file with 
the same extension, but allowing the user to choose an 
alternate name (similar to how copy-paste already works) 
and directory location.
Comment 5 clever 2004-04-30 16:32:50 UTC
I agree wholeheartedly. It's an embarrasment not to have this feature.
It has my vote.
Comment 6 _ rkubacki 2005-02-01 17:31:16 UTC
*** Issue 49555 has been marked as a duplicate of this issue. ***
Comment 7 kschenk 2005-04-14 22:30:17 UTC
Well I don't understand the voting system but YESSSSS!!!!!!! please add this
option....sheesh!!!!!

Solutions proposed in this thread are REALLY unmanagable. What kind of decent
editor doesn't provide this. C'mon guys!

Comment 8 Marian Mirilovic 2005-04-27 15:34:42 UTC
*** Issue 58287 has been marked as a duplicate of this issue. ***
Comment 9 Marian Mirilovic 2005-04-27 15:39:52 UTC
*** Issue 58287 has been marked as a duplicate of this issue. ***
Comment 10 bamboo 2005-04-27 16:03:50 UTC
Ok, is just 3 years (!!) that this problem is opened and I receive e-mail
just for note that is there duplicated issues or that it might to be solved.
I'm very annoyed, in my opinion this situation is incredible.........
I not have other words... (is better.....)

Comment 11 Marian Mirilovic 2005-04-27 16:50:16 UTC
bamboo,
it's in your side to rise priority, collect votes for this issue, or fix it by
yourself .. ;)

But I agree, it's high priority enhancement with 4 duplicates , it should be
adressed for next reelase ... 
Comment 12 Marian Mirilovic 2005-09-27 08:18:09 UTC
*** Issue 65160 has been marked as a duplicate of this issue. ***
Comment 13 R Ramos 2006-05-21 10:01:33 UTC
I have implemented a general and simple "save a copy..." action. The saved copy
gets loaded in the editor. I think it is almost as good as a "save as" and it
avoids some implementation problems. 

My update center:
http://people.freenet.de/ramon.ramos/nb/updates.xml

Comment 14 johnemb 2006-10-25 15:17:16 UTC
So, what's the status of this issue? Will it be ready for NetBeans 6.0?
Comment 15 Nikolay Molchanov 2006-11-22 17:39:25 UTC
I completely agree that "Save As" is a must feature. In many I cases I need a
temporary copy of a file (just to save some interesting version), and there is
no other way than to go to command line terminla window and do a simple 
"cp  file.java  file.java.2" or "cp  file1.java  file2.java". 
Usually I don't need this copy to be immediately open in editor, and if some day 
"Save As" will be implemented, it should not be done as if I renamed this file.
IMO "Save As" is very simple, it is just like that: 

  Save a copy of this file under this new name.

Don't worry about the new name and its extension, just do the same as if user
did "cp" in external terminal window. Nothing else. Thanks in advance :-)
Comment 16 Antonin Nebuzelsky 2006-11-23 09:58:57 UTC
> In many I cases I need a temporary copy of a file (just to save some
> interesting version), and there is no other way than to go to command line
> terminal window and do a simple "cp  file.java  file.java.2"

Note, that you can do this very easily even now, without SaveAs action.

Just do this:
1) select the java file in Projects view (or Files or Favorites view)
2) CTRL+C
3) select a folder (a package)
4) CTRL+V

A copy is created with _1 (_2, _3,..) in the file name.
Comment 17 Nikolay Molchanov 2006-11-23 23:38:30 UTC
Thank you! I tried "copy-paste" solution, and it is really very close to "Save As".
The only difference is that it generates filename (does not allow me to specify
new name). Also it is interesting that it saves current contents into the old file,
which is ok, but not obvious. So, it looks like the functionality is almost there,
and it would not be very difficult to implement "Save As" :-)
Comment 18 sscotti 2007-02-18 05:00:01 UTC
Is this still an open issue?  I've seen comments on the newsgroup about a
cvsbranch "saveas" that addresses this issue, and there is a comment below about
an alternative solution.

http://people.freenet.de/ramon.ramos/nb/updates.xml

I do mostly web design and have to edit html and jsp files quite frequently.  I
 have used Dreamweaver, NotePad++ and UltraEdit, but I do see that NetBeans
could do just as well.  I also do some developement work with Java and .jsp's,
so I am looking to use NetBeans more often.

Is there a feature that would allow me to open, edit and save .html and .jsp
files while browsing a directory structure with the ability also to save as a
new file name.  I think there alot people who do some design and development
work, including 'pure' developers that would like this feature.

sscotti@sscotti.com
Comment 19 Stanislav Aubrecht 2007-03-30 14:29:59 UTC
fixed in trunk

Checking in openide/loaders/src/org/openide/loaders/Bundle.properties;
/cvs/openide/loaders/src/org/openide/loaders/Bundle.properties,v  <-- 
Bundle.properties
new revision: 1.20; previous revision: 1.19
done
Checking in openide/loaders/src/org/openide/loaders/MultiDataObject.java;
/cvs/openide/loaders/src/org/openide/loaders/MultiDataObject.java,v  <-- 
MultiDataObject.java
new revision: 1.28; previous revision: 1.27
done
Checking in openide/loaders/src/org/openide/loaders/DataObjectAccessorImpl.java;
/cvs/openide/loaders/src/org/openide/loaders/DataObjectAccessorImpl.java,v  <--
 DataObjectAccessorImpl.java
new revision: 1.2; previous revision: 1.1
done
Checking in openide/loaders/src/org/openide/loaders/DataObject.java;
/cvs/openide/loaders/src/org/openide/loaders/DataObject.java,v  <--  DataObject.java
new revision: 1.36; previous revision: 1.35
done
RCS file: /cvs/openide/loaders/src/org/openide/loaders/SaveAsCapable.java,v
done
Checking in openide/loaders/src/org/openide/loaders/SaveAsCapable.java;
/cvs/openide/loaders/src/org/openide/loaders/SaveAsCapable.java,v  <-- 
SaveAsCapable.java
initial revision: 1.1
done
Checking in openide/loaders/src/org/openide/loaders/DefaultDataObject.java;
/cvs/openide/loaders/src/org/openide/loaders/DefaultDataObject.java,v  <-- 
DefaultDataObject.java
new revision: 1.13; previous revision: 1.12
done
Checking in openide/loaders/src/org/openide/loaders/FileEntry.java;
/cvs/openide/loaders/src/org/openide/loaders/FileEntry.java,v  <--  FileEntry.java
new revision: 1.6; previous revision: 1.5
done
Checking in openide/loaders/manifest.mf;
/cvs/openide/loaders/manifest.mf,v  <--  manifest.mf
new revision: 1.33; previous revision: 1.32
done
Checking in core/ui/src/org/netbeans/core/ui/resources/layer.xml;
/cvs/core/ui/src/org/netbeans/core/ui/resources/layer.xml,v  <--  layer.xml
new revision: 1.119; previous revision: 1.118
done
Checking in
openide/loaders/src/org/netbeans/modules/openide/loaders/DataObjectAccessor.java;
/cvs/openide/loaders/src/org/netbeans/modules/openide/loaders/DataObjectAccessor.java,v
 <--  DataObjectAccessor.java
new revision: 1.2; previous revision: 1.1
done
Checking in form/src/org/netbeans/modules/form/FormDataObject.java;
/cvs/form/src/org/netbeans/modules/form/FormDataObject.java,v  <-- 
FormDataObject.java
new revision: 1.50; previous revision: 1.49
done
RCS file:
/cvs/openide/loaders/test/unit/src/org/openide/text/DataEditorSupportSaveAsTest.java,v
done
Checking in
openide/loaders/test/unit/src/org/openide/text/DataEditorSupportSaveAsTest.java;
/cvs/openide/loaders/test/unit/src/org/openide/text/DataEditorSupportSaveAsTest.java,v
 <--  DataEditorSupportSaveAsTest.java
initial revision: 1.1
done
Checking in java/source/src/org/netbeans/modules/java/JavaDataObject.java;
/cvs/java/source/src/org/netbeans/modules/java/JavaDataObject.java,v  <-- 
JavaDataObject.java
new revision: 1.4; previous revision: 1.3
done
RCS file:
/cvs/openide/loaders/test/unit/src/org/openide/loaders/DataObjectSaveAsTest.java,v
done
Checking in
openide/loaders/test/unit/src/org/openide/loaders/DataObjectSaveAsTest.java;
/cvs/openide/loaders/test/unit/src/org/openide/loaders/DataObjectSaveAsTest.java,v
 <--  DataObjectSaveAsTest.java
initial revision: 1.1
done
Checking in openide/loaders/api/apichanges.xml;
/cvs/openide/loaders/api/apichanges.xml,v  <--  apichanges.xml
new revision: 1.28; previous revision: 1.27
done
Checking in openide/loaders/src/org/openide/actions/SaveAsAction.java;
/cvs/openide/loaders/src/org/openide/actions/SaveAsAction.java,v  <-- 
SaveAsAction.java
new revision: 1.2; previous revision: 1.1
done