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

Bug 153961

Summary: [WorkingSets] Expose the Components of an AggregateWorkingSet as API
Product: [Eclipse Project] Platform Reporter: Michael D. Elder <mdelder>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: RESOLVED DUPLICATE QA Contact: Hitesh <hsoliwal>
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Michael D. Elder CLA 2006-08-15 14:36:30 EDT
Currently there is no API way to get at the Components of the AggregateWorkingSet (an internal class). To support some of the kinds of behavior that the Package Explorer uses (showing Grouped working sets), there should be some sort of API to get at the Components (the contained IWorkingSets) of an AggregateWorkingSet.
Comment 1 Kim Horne CLA 2006-08-17 08:13:47 EDT
The package explorer shouldn't be using internal classes ... whatever they have implemented should be implementable by you.  What in particular do you want to do?
Comment 2 Michael D. Elder CLA 2006-08-17 09:24:19 EDT
The JDT Package Explorer uses their own class (org.eclipse.jdt.internal.ui.workingsets.WorkingSetModel) which is driven from their own dialog (the "Configure Working Set" dialog). When you select "Top Level Elements > Working Sets", the "Configure Working Set" dialog is popped, you can choose which working sets to display, and they populate their working set model, which they set as a root input. You cannot select the Window Working Set *AND* show Working Sets as a top level elements. You can re-select the same things chosen in the Window Working Set, but there is no synchronization between the two models. The JDT support was implemented before all of the great Window Working Set changes in 3.2.

I wanted to integrate better with Window Working Sets and have less exposed UI, so I wanted a model where I could use the same "Select Working Set" dialog, and allow the user to toggle between "Working Sets" and "Projects" as top level elements. With access to the components of AggregateWorkingSet, I can do this seamlessly using official API. As it is now (in 3.2.1), I have to refer to the internal AggregateWorkingSet, and toggle the mode of the WorkingSetsContentProvider to show working sets or jump through to their components. Doing this though allows the Project Explorer to respond when a user changes the Working Set(s) for the Window Working Set. 
Comment 3 Susan McCourt CLA 2009-07-15 12:48:54 EDT
"As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009"
Comment 4 Hitesh CLA 2009-07-16 04:16:59 EDT

*** This bug has been marked as a duplicate of bug 217955 ***