Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 162102

Summary: [Workbench] User configurability for MAX_RECENT_WORKSPACES
Product: [Eclipse Project] Platform Reporter: Robert Warner <rwarner1>
Component: IDEAssignee: Paul Webster <pwebster>
Status: VERIFIED FIXED QA Contact: Paul Webster <pwebster>
Severity: enhancement    
Priority: P2 CC: bokowski, eclipse-bugs, Mike_Wilson, rolarenfan, rsternberg
Version: 3.3Keywords: helpwanted
Target Milestone: 3.5 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch with a proposed UI (Preference page)
none
Screenshot showing the new preferences page
none
Patch that implements reading and writing of the workspaces data.
none
Patch that includes Help changes and externalizes the UI strings pwebster: iplog+

Description Robert Warner CLA 2006-10-24 12:00:17 EDT
MAX_RECENT_WORKSPACES=5 from org.eclipse.ui.ide.prefs needs to have an easier interface to change this value.  It is obscured from users who need more then 5 workspaces.
Comment 1 Robert Warner CLA 2007-06-21 13:28:17 EDT
The file with this configuration setting is in .. C:\eclipse\configuration\.settings\org.eclipse.ui.ide.prefs

I use more the 5 workspaces and would liek this configurable.  I assume others may have more then 5 workpsaces as well.

thanks.
Comment 2 Ralf Sternberg CLA 2008-08-03 05:34:27 EDT
I'd also like to see a way of editing the list of recent workspaces or at least removing deleted workspaces from the list. Finding and editing the config file is inconvenient.

I could imagine a link "Configure Workspaces" on the Workspace Launcher dialog, that opens some launcher config dialog.
Comment 3 Paul E. Keyser CLA 2009-02-06 10:44:52 EST
OK, I just voted for this -- both prefs should be UI-visible. Here's my use-case for making the "recent WS" list visible: 

I am happily using Eclipse in WS_1; I also have WS_2 that I use less often; all fine. Now some new code comes along that I wish to test, but is not really part of the set of projects in either WS_1 or WS_2, so ... I create WS_TEST_FOO, and test the code there, and (let's say) after some while I am done testing, and no longer need that WS_TEST_FOO at all. How do I remove the WS_TEST_FOO? (Deleting the directory "WS_TEST_FOO" helps not at all, because the WS is still listed under File -> Switch Workspace, and the directory will be *RECREATED* by Eclipse if I switch to it.) 
Comment 4 Eric Rizzo CLA 2009-02-18 09:38:47 EST
Would a preferences page for configuring the list be acceptable?
Also, can anyone point towards the existing code that reads this file? With those pointers, I may be able to contribute a patch in a reasonable timeframe.
Comment 5 Paul E. Keyser CLA 2009-02-18 12:28:56 EST
(In reply to comment #4)
> Would a preferences page for configuring the list be acceptable?
> 
Would suit me, surely. 
Comment 6 Eric Rizzo CLA 2009-02-19 22:19:07 EST
Created attachment 126254 [details]
Patch with a proposed UI (Preference page)

This is a patch with just the UI skeleton; it does not actually read or write any data. It is derived from HEAD as of today (2/19/09).
The patch adds a new preferences page under the General > Startup and Shutdown page, where the user can control the workspace prompt, the number of remembers workspaces, and the list of recent workspaces.
I'd like some feedback on this UI - does it meet the needs described here? Is it in a logical/acceptable place in the preferences? Are the labels and widgets approrpiate and clear?
I'd especially like feedback from a committer so I can know whether this is something worth taking all the way.
Comment 7 Eric Rizzo CLA 2009-02-19 22:23:35 EST
Created attachment 126255 [details]
Screenshot showing the new preferences page
Comment 8 Paul E. Keyser CLA 2009-02-20 09:27:41 EST
(In reply to comment #6)
> The patch adds a new preferences page under the General > Startup and Shutdown
> page, where the user can control the workspace prompt, the number of remembers
> workspaces, and the list of recent workspaces.
> I'd like some feedback on this UI - does it meet the needs described here? Is
> it in a logical/acceptable place in the preferences? Are the labels and widgets
> appropriate and clear?
> 
It looks fine to me, with regard to all three of the questions you ask! Thanks.
Comment 9 Eric Rizzo CLA 2009-02-24 14:05:21 EST
Created attachment 126589 [details]
Patch that implements reading and writing of the workspaces data.

This patch replaces the first one and adds implementation of reading/writing the actual data. It also removes the "Prompt for workspace at startup" checkbox from its original location (on the Starup and Shutdown preferences page) since it has been placed on the new "Workspaces" page under that one.
Please give this patch a try and provide feedback.

Tod, are you still listening to this bug? I need you (or another committer) to respond in order to go any further.
Comment 10 Paul Webster CLA 2009-03-03 08:34:41 EST
(In reply to comment #9)
> Created an attachment (id=126589) [details]
> Patch that implements reading and writing of the workspaces data.

Hi Eric,

The patch looks good, although I'm a little concerned about moving a preference.  I still think it would be OK, but we then need a little help page for the new page you've created (and move the "launched" pref off of the old page).

If you are willing to add that to the patch (I can help with the "where" part) then I would be willing to put it in for M6 (basically this Friday :-)

PW
Comment 11 Eric Rizzo CLA 2009-03-03 09:05:39 EST
This will be the first help authoring I've done for Eclipse, but if you point me in the right direction I'll do my best to get it added before Friday.
Comment 12 Paul Webster CLA 2009-03-03 09:42:11 EST
(In reply to comment #11)
> This will be the first help authoring I've done for Eclipse, but if you point
> me in the right direction I'll do my best to get it added before Friday.
> 

The information for the existing page is in /org.eclipse.platform.doc.user/topics_Reference.xml and has <topic label="Startup and Shutdown" href="reference/ref-startup.htm"></topic>

So the ref-startup.htm file needs to be updated (remove the old info).  Then probably create a ref-workspace-startup.htm with your new information (I'd copy ref-startup.htm as the starting point) and add it to the same section in topics_Reference.xml.  You don't have to take the new screenshots, we'll do that in M7/RC1.

If you want to keep the help patch separate from the code patch, that's fine by me.  The htm files are fragile, so the more of the ref-startup.htm file you can use as a template, the better off we'll be.

Then I think that /org.eclipse.platform.doc.user/contexts_Workbench.xml also needs to be updated, at least it has:
    <context id="startup_preference_page_context">
        <description>This page shows you all of the plug-ins that are activated when the workbench starts.</description>
        <topic label="Preferences - Startup" href="reference/ref-startup.htm"/>
    </context>

in it.  Generate a new help context id and tie it to your new preference page.


PW
Comment 13 Eric Rizzo CLA 2009-03-04 09:51:33 EST
Created attachment 127480 [details]
Patch that includes Help changes and externalizes the UI strings

This patch adds the Help changes suggested in Comment 12 and also externalizes the Strings in RecentWorkspacesPreferencePage.
Comment 14 Paul Webster CLA 2009-03-04 12:24:30 EST
(In reply to comment #13)
> Created an attachment (id=127480) [details]
> Patch that includes Help changes and externalizes the UI strings

Released to HEAD >20090304

I've pegged your code contribution as +217 lines ... less than my IP limit of 250 :-)

PW
Comment 15 Eric Rizzo CLA 2009-03-04 12:52:03 EST
(In reply to comment #14)
> I've pegged your code contribution as +217 lines ... less than my IP limit of
> 250 :-)

Whew, I thought it might be getting close with the Help stuff. I was afraid I'd have to do some creative formatting to squeak in under that limit ;-)

By the way, how does something like this get included on the New & Noteworthy page for the milestone?
Comment 16 Paul Webster CLA 2009-03-04 13:08:18 EST
(In reply to comment #15)
> 
> By the way, how does something like this get included on the New & Noteworthy
> page for the milestone?

We'll write up something and send it to John

PW

Comment 17 Boris Bokowski CLA 2009-03-04 15:58:57 EST
(In reply to comment #16)
> (In reply to comment #15)
> > 
> > By the way, how does something like this get included on the New & Noteworthy
> > page for the milestone?
> 
> We'll write up something and send it to John
> 
> PW
> 

Or even better, if you want to write a a paragraph for it, Eric... :-)
Comment 18 Eric Rizzo CLA 2009-03-05 13:27:33 EST
Well, I'm not sure if this is worthy of mention in New & Noteworthy or not, but since you asked for it...

<bold>Workspaces preference page</bold>
"A new preference page supports managing the startup prompt to select a workspace: <bold>General > Startup and Shutdown > Workspaces</bold>. You can enable or disable the prompt altogether (this setting used to be on  <bold>General > Startup and Shutdown</bold>) and specify the maximum number of recent workspaces to be remembered. The page also lists the recently used workspaces and allows you to remove unwanted workspaces from that list."

<include the screenshot attached to this bug>
Comment 19 Paul Webster CLA 2009-03-10 10:43:46 EDT
In I20090310-0100
PW