1 11 package org.eclipse.ui.internal; 12 13 import org.eclipse.core.runtime.Assert; 14 import org.eclipse.ui.ILocalWorkingSetManager; 15 import org.eclipse.ui.IMemento; 16 import org.eclipse.ui.IWorkingSet; 17 import org.osgi.framework.BundleContext; 18 19 20 public class LocalWorkingSetManager extends AbstractWorkingSetManager implements ILocalWorkingSetManager { 21 22 public LocalWorkingSetManager(BundleContext context) { 23 super(context); 24 } 25 26 29 public void removeWorkingSet(IWorkingSet workingSet) { 30 internalRemoveWorkingSet(workingSet); 31 } 32 33 36 public void addRecentWorkingSet(IWorkingSet workingSet) { 37 internalAddRecentWorkingSet(workingSet); 38 } 39 40 43 public void saveState(IMemento memento) { 44 saveWorkingSetState(memento); 45 saveMruList(memento); 46 } 47 48 51 public void restoreState(IMemento memento) { 52 Assert.isNotNull(memento); 53 Assert.isTrue(getWorkingSets().length == 0); 54 restoreWorkingSetState(memento); 55 restoreMruList(memento); 56 } 57 } 58 | Popular Tags |