Class 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 Details

  • Constructor Details

    • WorkingSetManager

      public WorkingSetManager(BundleContext context)
  • Method Details

    • addRecentWorkingSet

      public void addRecentWorkingSet(IWorkingSet workingSet)
      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 interface IWorkingSetManager
      Parameters:
      workingSet - the working set to add to the list of most recently used working sets.
    • addWorkingSet

      public void addWorkingSet(IWorkingSet workingSet)
      Description copied from interface: IWorkingSetManager
      Adds a working set to the receiver. The working set must not exist yet.
      Specified by:
      addWorkingSet in interface IWorkingSetManager
      Overrides:
      addWorkingSet in class AbstractWorkingSetManager
      Parameters:
      workingSet - the working set to add
    • removeWorkingSet

      public void removeWorkingSet(IWorkingSet workingSet)
      Description copied from interface: IWorkingSetManager
      Removes the working set
      Specified by:
      removeWorkingSet in interface IWorkingSetManager
      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 class AbstractWorkingSetManager
      Parameters:
      changedWorkingSet - the working set that has changed
      propertyChangeId - the changed property. one of CHANGE_WORKING_SET_CONTENT_CHANGE and CHANGE_WORKING_SET_NAME_CHANGE
      oldValue - the old value
    • restoreWorkingSetState

      protected void restoreWorkingSetState(IMemento memento)
      Description copied from class: AbstractWorkingSetManager
      Recreates all working sets from the persistence store and adds them to the receiver.
      Overrides:
      restoreWorkingSetState in class AbstractWorkingSetManager
      Parameters:
      memento - the persistence store