/** * @param memento a memento, or <code>null</code> */ public WorkingSetModel(IMemento memento) { fLocalWorkingSetManager= PlatformUI.getWorkbench().createLocalWorkingSetManager(); addListenersToWorkingSetManagers(); fActiveWorkingSets= new ArrayList<>(); fAllWorkingSets= new ArrayList<>(); if (memento == null || ! restoreState(memento)) { IWorkingSet others= fLocalWorkingSetManager.createWorkingSet(WorkingSetMessages.WorkingSetModel_others_name, new IAdaptable[0]); others.setId(IWorkingSetIDs.OTHERS); fLocalWorkingSetManager.addWorkingSet(others); fActiveWorkingSets.add(others); fAllWorkingSets.add(others); } Assert.isNotNull(fOthersWorkingSetUpdater); fElementMapper.rebuild(getActiveWorkingSets()); fOthersWorkingSetUpdater.updateElements(); }
/** * @param memento a memento, or <code>null</code> */ public WorkingSetModel(IMemento memento) { fLocalWorkingSetManager= PlatformUI.getWorkbench().createLocalWorkingSetManager(); addListenersToWorkingSetManagers(); fActiveWorkingSets= new ArrayList<>(); fAllWorkingSets= new ArrayList<>(); if (memento == null || ! restoreState(memento)) { IWorkingSet others= fLocalWorkingSetManager.createWorkingSet(WorkingSetMessages.WorkingSetModel_others_name, new IAdaptable[0]); others.setId(IWorkingSetIDs.OTHERS); fLocalWorkingSetManager.addWorkingSet(others); fActiveWorkingSets.add(others); fAllWorkingSets.add(others); } Assert.isNotNull(fOthersWorkingSetUpdater); fElementMapper.rebuild(getActiveWorkingSets()); fOthersWorkingSetUpdater.updateElements(); }
/** * @param memento a memento, or <code>null</code> */ public WorkingSetModel(IMemento memento) { fLocalWorkingSetManager= PlatformUI.getWorkbench().createLocalWorkingSetManager(); addListenersToWorkingSetManagers(); fActiveWorkingSets= new ArrayList(2); if (memento == null || ! restoreState(memento)) { IWorkingSet others= fLocalWorkingSetManager.createWorkingSet(WorkingSetMessages.WorkingSetModel_others_name, new IAdaptable[0]); others.setId(OthersWorkingSetUpdater.ID); fLocalWorkingSetManager.addWorkingSet(others); fActiveWorkingSets.add(others); } Assert.isNotNull(fOthersWorkingSetUpdater); fElementMapper.rebuild(getActiveWorkingSets()); fOthersWorkingSetUpdater.updateElements(); }