updateElements(fWorkingSetModel.getActiveWorkingSets());
Assert.isTrue(fWorkingSet != null && fWorkingSetModel != null);  IWorkingSet[] activeWorkingSets= fWorkingSetModel.getActiveWorkingSets();  List result= new ArrayList(); Set projects= new HashSet(); for (int i= 0; i < activeWorkingSets.length; i++) { if (activeWorkingSets[i] == fWorkingSet) continue; IAdaptable[] elements= activeWorkingSets[i].getElements(); for (int j= 0; j < elements.length; j++) { IAdaptable element= elements[j]; IResource resource= (IResource)element.getAdapter(IResource.class); if (resource != null && resource.getType() == IResource.PROJECT) { projects.add(resource); } } } IJavaModel model= JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()); try { IJavaProject[] jProjects= model.getJavaProjects(); for (int i= 0; i < jProjects.length; i++) { if (!projects.contains(jProjects[i].getProject())) result.add(jProjects[i]); } Object[] rProjects= model.getNonJavaResources(); for (int i= 0; i < rProjects.length; i++) { if (!projects.contains(rProjects[i])) result.add(rProjects[i]); } } catch (JavaModelException e) { JavaPlugin.log(e); } fWorkingSet.setElements((IAdaptable[])result.toArray(new IAdaptable[result.size()]));
	public void updateElements() {		updateElements(fWorkingSetModel.getActiveWorkingSets());	}