Bug 6506 - [Wizard] Project location in subdirectory of home directory / default location configurable
Summary: [Wizard] Project location in subdirectory of home directory / default locatio...
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: Other Linux
: P2 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Simon Arsenault CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2001-12-03 11:17 EST by Sebastian Davids CLA
Modified: 2003-04-10 09:46 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Davids CLA 2001-12-03 11:17:49 EST
The "default location" for creating projects should be configurable.

On Linux it defaults to the current user's home directory.

Let's say I create a new directory for all my Eclipse projects in in my home
directory (e.g. /home/foo/workspace) -- so my home directory doesn't get
cluttered with "eclipse project directories".

When I uncheck "default location" and enter "/home/foo/workspace" in the
location TF and "example" as a project name I get the error message "Location
path cannot overlap with default location".

Sebastian Davids
Comment 1 Erich Gamma CLA 2001-12-03 19:01:22 EST
The first page of the new project wizard is owned by the Platform.
Moving to Platform UI
Comment 2 Simon Arsenault CLA 2001-12-07 15:42:55 EST
The "default" location where projects are created is the workspace directory. 
When you startup Eclipse, the workspace directory setup based on:
   a) current working directory
   b) using the -data command line argument

In your case, you could change directory to /home/foo/workspace and launch 
Eclipse from there. Or you can launch Eclipse from anywhere using:
   eclipse -data /home/foo/workspace

A bit more info about the "Location path cannot overlap with default location". 
Core does not allow a custom location directory to overlap with the workspace 
directory. I think there was a discussion on the eclipse newsgroup about this 
you can look-up. Or you can post and someone from Core can answer.

Ok to close PR?
Comment 3 Sebastian Davids CLA 2001-12-11 00:50:59 EST
OK,
but the user enters a quite reasonable directory (at least from one's 
perspective) and is prompted with that disturbing message without giving the 
reason *why* can't it overlap.

There should be an indication right up front that the user cannot create a 
directory which overlaps with the "default" with the reason why.

Or better: 

Get rid of the browse button and add the tree view from the "browse" dialog 
directly to the "Java Project" panel.

Wizards shouldn't open other dialogs -- all options should be presented on a 
panel of the "wizard" itself -- the current panel still has plenty of room!

The "default" directory should not be visible (or not selectable) in that tree 
view.

There should be some a facility (e.g. small button) to add a new directory 
though  ;-)

The above would IMO improve the New Project wizard ... a disturbing error 
message is not displayed, the user can only do "acceptable" things and the "pop 
up" dialog is integrated into the wizard itself.

BTW, I could try to implement the behavior above ... if I would get a little 
hint to where to look for the present code ;-)
Comment 4 Sebastian Davids CLA 2001-12-11 01:45:55 EST
One more thing:

Why can't one change the "default location" w/ the GUI?

The command line parameter and the "launch from workspace directory" are not 
bad, but I think there should be a "graphical" way to set it.
Comment 5 Kevin Haaland CLA 2001-12-18 11:08:11 EST
Moving to Core for comment. 
Comment 6 John Arthorne CLA 2002-01-24 14:42:12 EST
As Simon described, the "default project location" is set using the "-data" 
command line parameter, or is inferred from the current directory when eclipse 
is started.  Overlapping is not allowed because that would cause situations 
where projects could contain other projects.  Say the user creates a project at:

/home/foo/workspace/P1, where /home/foo is the default location.  Then, if the 
user tried to create another project called "workspace" in the default location, 
they would not be allowed because that creates a nested project.

The main reason why the workspace location must be specified on the command line 
is this: the UI is not started until after the platform is up and running.  It 
needs to know the location before the UI exists, so it can read and write 
metadata related to startup.  Also, the workspace has to be able to run headless 
(without any UI).  The launcher (eclipse.exe) could possibly prompt the user for 
a workspace location, but this code is platform-specific so it's a pain to do 
this.  Please enter a separate PR if you really want this functionality.

This problem report is mostly requesting enhancements to the new project wizard, 
so I'm moving back to UI for consideration.

Comment 7 Simon Arsenault CLA 2002-02-15 17:38:48 EST
Sebastian,

The best we can do right now is to present a better error message when the 
specified location overlaps with the workspace directory.

If you want to look at enhancing the page with your suggestions, please let me 
know. That way, when the error message is fixed, I'll mark it as RESOLVED - 
LATER until I get your code improvements for review. Otherwise, if you do not 
have time, the PR will be marked as RESOLVED - WONT FIX (after the error 
message is fixed).

The page class is WizardNewProjectCreationPage and the wizard class is 
BasicNewProjectResourceWizard. This should be a good starting point for you. 
You can refer to the Eclipse web site for information on how to access the 
latest source code.

PS. Wizard pages are allowed to have buttons on them that open other dialogs. 
This is actually quite common. The use of a "Browse..." style button is very 
common in wizards of other applications - including MS. There is no UI 
guidelines that recommend against this (actually, they typically do recommend 
this approach).
Comment 8 Sebastian Davids CLA 2002-02-15 23:20:47 EST
OK, I'll try my best ;-)
Comment 9 Simon Arsenault CLA 2002-02-22 15:51:12 EST
The error message for location and workspace directory overlap has been 
rewritten to be more understandable.

Fix in build > 2002-02-22
Comment 10 Randy Giffen CLA 2002-08-08 17:11:05 EDT
Reopen for investigation
Comment 11 Tod Creasey CLA 2002-09-23 14:18:08 EDT
This can be closed now - the message has been improved but the functionality 
will remain as is - i.e. overlap within the workbench will still not be 
allowed.
Comment 12 Sebastian Davids CLA 2003-04-10 09:46:27 EDT
OK