Bug 102424 - [IDE] File "save as" should auto-suggest name and folder based on package name in file
Summary: [IDE] File "save as" should auto-suggest name and folder based on package nam...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P5 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-30 20:03 EDT by Ken Silveman CLA
Modified: 2019-09-06 16:09 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Silveman CLA 2005-06-30 20:03:42 EDT
when a new untitled document is opened and the user adds:

package a.b;

class Widget {

}

When the "save as" button is selected,  the code should be automatically 
anlyzed and a pop-up suggesting "save as a/b/Widget.java and add source 
structure to project?" should be displayed.  Upon answering yes, the source 
folder structure a/b should be automatically generated AND added to the project 
and the file should be saved as a/b/Widget.java.   All at the touch of a single 
defualt option.  This is what most top level IDE's have.  This would save the 
developer boatloads of time!
Comment 1 Dani Megert CLA 2005-07-04 06:50:56 EDT
The untitled text document is created by Platform Text and at that level we
don't know anything about Java, C++ or any other project type and its expected
setup or structure for its files.

There would have to be something like a 'saveAsParticipant' extension point
where clients could plug-in code that is run when a file is saved under a
different/new content type, e.g.
- switch to the correct editor
- create the correct project structure and/or build path
...

Note: you could use the New Class wizard to create the class.
Comment 2 Michael Van Meekeren CLA 2005-09-09 09:05:07 EDT
I think that at a minimum we should offer to save the file as "Untitled1" or
some name that just allows the user to quickly save it to something.
Comment 3 Ken Silveman CLA 2006-10-17 03:00:26 EDT
Well,

Having a java plug-in created by your team and shipped automatically with the Eclipse executable would be very good (as well as other plug-ins for other languages.)   It should simply look at the line "package a.b.c"  and then create the directory structure and then suggest adding the file with the same class name.

There should be a Default plug-in selector on the menu so a user could easily change default plug-ins provided by your team - and added to by the user if desired.  In fact,  a set of plug-ins should be loadable based on the user selcting a radio button: "java", "c++" or etc...  Then a whole set of default plug-ins may be loaded and swapped with others at the touch of a radio button, each mapping to a set of plug-ins where each set are in sub-directories that map to what button is selected.

(In reply to comment #1)
> The untitled text document is created by Platform Text and at that level we
> don't know anything about Java, C++ or any other project type and its expected
> setup or structure for its files.
> There would have to be something like a 'saveAsParticipant' extension point
> where clients could plug-in code that is run when a file is saved under a
> different/new content type, e.g.
> - switch to the correct editor
> - create the correct project structure and/or build path
> ...
> Note: you could use the New Class wizard to create the class.

Comment 4 Susan McCourt CLA 2009-07-15 12:06:41 EDT
"As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009"
Comment 5 Eclipse Webmaster CLA 2019-09-06 16:09:03 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.