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
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRecentWorkingSet
(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.void
addWorkingSet
(IWorkingSet workingSet) Adds a working set to the receiver.void
removeWorkingSet
(IWorkingSet workingSet) Removes the working setvoid
Reads the persistence store and creates the working sets stored in it.protected void
restoreWorkingSetState
(IMemento memento) Recreates all working sets from the persistence store and adds them to the receiver.void
workingSetChanged
(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, setRecentWorkingSetsLength
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.osgi.framework.BundleListener
bundleChanged
Methods 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:IWorkingSetManager
Adds 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:
addRecentWorkingSet
in interfaceIWorkingSetManager
- Parameters:
workingSet
- the working set to add to the list of most recently used working sets.
-
addWorkingSet
Description copied from interface:IWorkingSetManager
Adds a working set to the receiver. The working set must not exist yet.- Specified by:
addWorkingSet
in interfaceIWorkingSetManager
- Overrides:
addWorkingSet
in classAbstractWorkingSetManager
- Parameters:
workingSet
- the working set to add
-
removeWorkingSet
Description copied from interface:IWorkingSetManager
Removes the working set- Specified by:
removeWorkingSet
in 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:
workingSetChanged
in 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:AbstractWorkingSetManager
Recreates all working sets from the persistence store and adds them to the receiver.- Overrides:
restoreWorkingSetState
in classAbstractWorkingSetManager
- Parameters:
memento
- the persistence store
-