Community
Participate
Working Groups
we have this question asked on the newsgroup every week and i see it asked on other forums too: 'how to updgrade from eclipse build X to build Y?' seems like using -data is just something nobody ever comes up with we should provide some help for people here vame had something, other ides have something too: you can point the ide to a workspace we could ask on startup - that would be good current solution is not intuitive to anyone marking as major, since when we ship 2.1 there'll be thousands of frustrated people copying their workspaces thinking that this is the way to upgrade
A few ideas: 1) Within Eclipse, an option to "Move Workspace" would help before the upgrade 2) Within Eclipse, an option to "Change Workspace" would make life easier for some people, of possible. (May well not be possible, given that some configuration changes require a restart of Eclipse...) 3) Possibly have another launcher which allows: o Twiddling of VM, options etc o Selection of workspaces from "recently used" list Feature 3 would involve keeping a file with last-used options and existing workspaces in "some well known place" - not sure where that would be.
If you go the route of asking at startup what workspace to use I think that this should only happen if the -data command line argument has not been specified. In addition, The dialog should indicate that the permanent solution is to add a -data argument to the command line. Regards Jonathan Gossage
My suggestion was for a separate actual executable which would be launched, and which would in turn launch Eclipse itself. However, I think if we went down this route, we should have some kind of option on eclipse.exe itself to use the "current set of defaults".
separate executable, sort of an installation program, could be an easiest and non-intrusive solution. My guess is that some users are not aware of -data option, I was not aware of this option until I start writing ant script for eclipse upgrade. For users that not aware of - data the script will copy workspace, for others it is an optional property in the script; it could be similar to Jon's first point from comment #1. The script has no dialog for now, everything thru Ant properties, but they could be set thru dialog, the script has "some well known place" for previous installation, and eclipse.bat is generated with different options including - data, vm options; could be simular to feature 3 from Jon's comment #1, Main benefits of the script come from external plugin directory that is a different issue but often related in a sense that user installed plugins can add to users frustration when upgrading eclipse, at least from my experience. You can look at the script at http://home.nyc.rr.com/olegs/eclipse/antscript/readme.htm
You should be able to set and change the workspace directory from within the Eclipse UI. Users do not expect, and should not have to resort to, using the command line to set a non-standard workspace dir, or change workspaces. In addition, Eclipse should definitely ask the user where to put the workspace the first time it is run (related bug 26756).
No disagreement that having GUI is better than command line, in todo section of the readme file I mention it under todo section. When I switched to Eclipse I had very vague idea what Eclipse workspace meant and having default workspace was very helpful and seems to be consistent with having default project folders and default plugin directory. You can use external project folders, external plugin directory too. I would argue that one does not need to be an Eclipse expert in order to use Eclipse. Users who understand what workspace is can use - data option without any problem.
A separate execuatble is how WSAD launches a different workspace. We default to the Windows default user dir and on Linux to the home dir. Once selected we save it off to a prefence (registry on windows) ~/.wstools/workspace on linux. There is also a checkbox to turn it off and a -setworkspace flag to turn it on. We found it to be useful. Its fairly simple. I'll see about getting it contributed.
[Here is the MacOS X point of view (as reported some tiem ago in bug 23863). I've changed platform and OS to All, since the problem is not Win2k specific] Mac UI applications are not started via the command line but by double-clicking. As a consequence Eclipse's execution options are not easily accessible. The not-Mac-like work around is to specify the execution arguments by editing a (normally invisible) file within the application bundle. Since this is rather static, the user has to duplicate the 60MB Eclipse application if she wants to work with multiple workspaces. It would be more Mac-like to have an initial dialog to choose from recent workspaces, or to have a file which is associated with Eclipse so that a double click would lauch Eclipse with the correct workspace. In addition it would make sense to have some of the execution options on a preference page and would apply after a restart.
BTW, bug 5509 is closely related to (if not even a duplicate of) this one too.
I filed a similar br too http://bugs.eclipse.org/bugs/show_bug.cgi?id=24896
The eclipse.exe shipped with Eclipse is a bare-bones launcher. Eclipse-based products like WSAD typically improve on it, e.g. by adding a prompt for workspace location. We would like to improve the launcher, but this will not happen for 2.1. We will document in the README how to migrate from one release to another.
While the additional functionality to select the proper workspace is not yet in place, I would like to have /Users/<uid>/Projects as the default workspace folder on MacOS X. Is this possible, now that a real Eclipse launcher is in place for this platform? Andre, comments? Ringo
Yes, that should work since last night. Just edit your Info.plist file and change "workspace" to "~/Projects/workspace"
What ever happened to the prompt in VA Micro Edition? That's what is needed here.
I think that the easier solution would be, when eclipse is launched the first time (there is no workspace forder in ECLIPSE_HOME/ ) to show a dialog prompting for either : - new workspace creation (can be in ECLIPSE_HOME or somewhere else) - use of an old workspace stored somewhere Then if the workspace is not in ECLIPSE_HOME/workspace, create a dummy workspace there with a file pointing to the real workspace, so that next runs will not prompt for the workspace.
*** Bug 46379 has been marked as a duplicate of this bug. ***
Investigate prompt for workspace on startup for M8.
With the RCP changes and changes to Runtime, it is now possible for the primary application to bring up a prompter to choose the Workspace location before the Workbench is brought up. For example, if you add the following to run() after Display creation but before Workbench creation, it will prompt you for the directory to use. Note that in order for (!Platform.hasInstanceData()) to pass, you'll need to add -noDefaultData to the command line for now (whether or not you're specifying -data). if (!Platform.hasInstanceData()) { IPath instanceLoc = promptForInstanceLoc(display); if (instanceLoc == null) { return IPlatformRunnable.EXIT_OK; } Platform.setInstanceLocation(instanceLoc); Platform.lockInstanceData(); } /** * Prompts for an instance location (workspace folder). * * @return the instance location, or <code>null</code> if the user cancels. */ private IPath promptForInstanceLoc(Display display) { Shell shell = new Shell(display); DirectoryDialog dialog = new DirectoryDialog(shell); dialog.setText("Select Workspace Directory"); dialog.setMessage("Select the workspace directory to use."); String dir = dialog.open(); shell.dispose(); return dir == null ? null : new Path(dir); } The code above is just a proof of concept though. For M8, we should have a dialog like: title: "Choose Workspace directory" message: Choose the directory to use as the workspace location. It will have a combo box remembering the recently used workspace locations (5 max, in MRU order), and a Browse button that will bring up a directory chooser in case it's not in the MRU list. It will have an OK and Cancel button. OK will only be enabled when the user has chosen a valid workspace location (i.e. a valid folder). Cancel will exit immediately without bringing up the Workbench.
The run() method referred to above is in IDEApplication.
I like the vs.net solution idea. A workspace should be an associated set of projects. And I can then chosose to open whichever one I like. The only problem with mapping this to a workspace is that the workspace persists all my settings including ones that I want regardless of which workspace I have open (like code format options ,....) I have tried using Working Sets but that feels kind of a glued on after thought.
Created attachment 8328 [details] Dialog to allow workspace selection on startup The attached patch opens a workspace selection dialog during ide startup. This works on top of the recent runtime changes to the -data command line option as follows: -data xxx: same as current behaviour, dialog is not displayed, command line parameter is used as the workspace -data not given: dialog is opened, user selects workspace -data @none: ide's always require a workspace, application exits -data @noDefault: dialog is opened, on first use a safe default is generated and displayed Outstanding issues: 1. If the user selects a workspace that is already in use, they should be given the opportunity to select a new one. Waiting for a runtime change to allow this functionality, the current patch displays an error dialog and the application exits. 2. The version check (Bug#48686) should be moved to this startup procedure, so the user has a chance to change their selection if they have chosen a workspace from an older version of the application. Waiting for the same change described in #1. So, this current patch implements most of the bells but a few whistles are missing.
We have released new API setURL(URL, boolean) where the boolean says whether or not to lock.
Created attachment 8366 [details] adds version checking in the ide This patch adds version checking to the ide. It will need to be committed in concert with jeff's change to take version checking out of the runtime.
Created attachment 8423 [details] handle case where selected workspace does not exist The previous version would fail if the selected workspace did not exist. The runtime part of the solution is described by bug#54085; this is the ui half of the fix. This patch also prunes some unused values from messages.properties.
Patch plus workaround for bug 54081 released to HEAD for the nightly build, but not submitted to the integration build. Need to test on GTK and Mac.
Created attachment 8434 [details] contains workaround for bug#54081 This patch changes IDEApplication to use an URL constructor rather than File.toURL to get around bug#54081 where the runtime seems to have troubles with a path containing a leading slash.
Andrew, can you please verify this on the Mac and GTK?
I wasn't able to get eclipse to run at all on the mac (not even the mar 10 integration build). On gtk I got the same behaviour as xp. 1) Running with -data someDir, does not open the prompt -- intended behaviour 2) Running with -data @noDefault, opens the prompt -- intended behaviour 3) Running without -data does not open the prompt -- unintended behaviour, but this case is explained by a known problem where the resources plugin is accessing the instance area too early.
Patch released and tested as best we can for now. Closing.
All 3 cases work just fine on Panther (Mac OS X 10.3.3) and Java 1.4.2_03 Cool. Will verify later today for Jaguar.
Thanks Andre.
Verified 3 cases for jaguar too.
Verified on Windows XP with Build id: 200403250800.
The workspace prompt dialog is gone in builds >= I20040420. Please see bug 59897.
The workspace dialog going away is described by bug 59274. The fix has been submitted and will be in the next integration build.