Community
Participate
Working Groups
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
The first page of the new project wizard is owned by the Platform. Moving to Platform UI
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?
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 ;-)
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.
Moving to Core for comment.
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.
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).
OK, I'll try my best ;-)
The error message for location and workspace directory overlap has been rewritten to be more understandable. Fix in build > 2002-02-22
Reopen for investigation
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.
OK