Bug 114496 [working sets] working sets: counter-intuitive hiding of resource sets
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/ConfigureWorkingSetAction.java
private final IWorkbenchPartSite fSite;
	private WorkingSetModel fWorkingSetModel;
	public ConfigureWorkingSetAction(IWorkbenchPartSite site) {
		super(WorkingSetMessages.ConfigureWorkingSetAction_label); 
		fSite= site;
	}
	
	public void setWorkingSetModel(WorkingSetModel model) {
		fWorkingSetModel= model;
	}
	
	/**
	 * {@inheritDoc}
	 */
	public void run() {
		List workingSets= new ArrayList(Arrays.asList(fWorkingSetModel.getAllWorkingSets()));
		WorkingSetConfigurationDialog dialog= new WorkingSetConfigurationDialog(
			fSite.getShell(), 
			(IWorkingSet[])workingSets.toArray(new IWorkingSet[workingSets.size()])); 
		dialog.setSelection(fWorkingSetModel.getActiveWorkingSets());
		if (dialog.open() == IDialogConstants.OK_ID) {
			IWorkingSet[] selection= dialog.getSelection();
			fWorkingSetModel.setActiveWorkingSets(selection);
		}
	}
}