Package org.eclipse.ui.internal
Class WorkingSetManager
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.internal.AbstractWorkingSetManager
org.eclipse.ui.internal.WorkingSetManager
- All Implemented Interfaces:
EventListener,IExtensionChangeHandler,IWorkingSetManager,BundleListener
public class WorkingSetManager
extends AbstractWorkingSetManager
implements IWorkingSetManager, BundleListener
A working set manager stores working sets and provides property change
notification when a working set is added or removed. Working sets are
persisted whenever one is added or removed.
- Since:
- 2.0
- See Also:
-
Field Summary
FieldsFields inherited from interface org.eclipse.ui.IWorkingSetManager
CHANGE_WORKING_SET_ADD, CHANGE_WORKING_SET_CONTENT_CHANGE, CHANGE_WORKING_SET_LABEL_CHANGE, CHANGE_WORKING_SET_NAME_CHANGE, CHANGE_WORKING_SET_REMOVE, CHANGE_WORKING_SET_UPDATER_INSTALLED, CHANGE_WORKING_SET_UPDATER_UNINSTALLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRecentWorkingSet(IWorkingSet workingSet) Adds a working set to the top of the list of most recently used working sets, making it the most recently used working set.voidaddWorkingSet(IWorkingSet workingSet) Adds a working set to the receiver.voidremoveWorkingSet(IWorkingSet workingSet) Removes the working setvoidReads the persistence store and creates the working sets stored in it.protected voidrestoreWorkingSetState(IMemento memento) Recreates all working sets from the persistence store and adds them to the receiver.voidworkingSetChanged(IWorkingSet changedWorkingSet, String propertyChangeId, Object oldValue) Persists all working sets and fires a property change event for the changed working set.Methods inherited from class org.eclipse.ui.internal.AbstractWorkingSetManager
addExtension, addPropertyChangeListener, addToWorkingSets, bundleChanged, createAggregateWorkingSet, createWorkingSet, createWorkingSet, createWorkingSetEditWizard, createWorkingSetNewWizard, createWorkingSetSelectionDialog, createWorkingSetSelectionDialog, createWorkingSetSelectionDialog, dispose, equals, firePropertyChange, getAllWorkingSets, getRecentWorkingSets, getRecentWorkingSetsLength, getWorkingSet, getWorkingSets, hashCode, internalAddRecentWorkingSet, internalRemoveWorkingSet, removeExtension, removePropertyChangeListener, restoreMruList, restoreWorkingSet, saveMruList, saveState, saveWorkingSetState, setRecentWorkingSetsLengthMethods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.osgi.framework.BundleListener
bundleChangedMethods inherited from interface org.eclipse.ui.IWorkingSetManager
addPropertyChangeListener, addToWorkingSets, createAggregateWorkingSet, createWorkingSet, createWorkingSet, createWorkingSetEditWizard, createWorkingSetNewWizard, createWorkingSetSelectionDialog, createWorkingSetSelectionDialog, createWorkingSetSelectionDialog, dispose, getAllWorkingSets, getRecentWorkingSets, getRecentWorkingSetsLength, getWorkingSet, getWorkingSets, removePropertyChangeListener, setRecentWorkingSetsLength
-
Field Details
-
WORKING_SET_STATE_FILENAME
- See Also:
-
-
Constructor Details
-
WorkingSetManager
-
-
Method Details
-
addRecentWorkingSet
Description copied from interface:IWorkingSetManagerAdds a working set to the top of the list of most recently used working sets, making it the most recently used working set. The last (oldest) item will be deleted if the list exceeds the size limit.- Specified by:
addRecentWorkingSetin interfaceIWorkingSetManager- Parameters:
workingSet- the working set to add to the list of most recently used working sets.
-
addWorkingSet
Description copied from interface:IWorkingSetManagerAdds a working set to the receiver. The working set must not exist yet.- Specified by:
addWorkingSetin interfaceIWorkingSetManager- Overrides:
addWorkingSetin classAbstractWorkingSetManager- Parameters:
workingSet- the working set to add
-
removeWorkingSet
Description copied from interface:IWorkingSetManagerRemoves the working set- Specified by:
removeWorkingSetin interfaceIWorkingSetManager- Parameters:
workingSet- the working set to remove
-
restoreState
public void restoreState()Reads the persistence store and creates the working sets stored in it. -
workingSetChanged
public void workingSetChanged(IWorkingSet changedWorkingSet, String propertyChangeId, Object oldValue) Persists all working sets and fires a property change event for the changed working set. Should only be called by org.eclipse.ui.internal.WorkingSet.- Overrides:
workingSetChangedin classAbstractWorkingSetManager- Parameters:
changedWorkingSet- the working set that has changedpropertyChangeId- the changed property. one of CHANGE_WORKING_SET_CONTENT_CHANGE and CHANGE_WORKING_SET_NAME_CHANGEoldValue- the old value
-
restoreWorkingSetState
Description copied from class:AbstractWorkingSetManagerRecreates all working sets from the persistence store and adds them to the receiver.- Overrides:
restoreWorkingSetStatein classAbstractWorkingSetManager- Parameters:
memento- the persistence store
-