Package org.eclipse.ui
Interface IWorkingSetManager
- All Known Subinterfaces:
- ILocalWorkingSetManager
- All Known Implementing Classes:
- AbstractWorkingSetManager,- LocalWorkingSetManager,- WorkingSetManager
public interface IWorkingSetManager
A working set manager stores working sets and provides property change
 notification when a working set is added or removed.
 
 The workbench working set manager can be accessed using
 IWorkbench#getWorkingSetManager()
 
This interface is not intended to be implemented by clients.
- Since:
- 2.0 initial version, 3.0 added createWorkingSet(IMemento)
- See Also:
- Restriction:
- This interface is not intended to be implemented by clients.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringChange event id when a working set is added newValue of the PropertyChangeEvent will be the added working set. oldValue will be null.static final StringChange event id when the working set contents changed newValue of the PropertyChangeEvent will be the changed working set.static final StringChange event id when the working set label changed. newValue of the PropertyChangeEvent will be the changed working set.static final StringChange event id when the working set name changed. newValue of the PropertyChangeEvent will be the changed working set.static final StringChange event id when a working set is removed newValue of the PropertyChangeEvent will be null. oldValue will be the removed working set.static final StringChange event id when a working set updater got installed.static final StringChange event id when a working set updater got uninstalled.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds a property change listener.voidaddRecentWorkingSet(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.voidaddToWorkingSets(IAdaptable element, IWorkingSet[] workingSets) Utility method that will add theelementto each given working set inworkingSetsif possible.voidaddWorkingSet(IWorkingSet workingSet) Adds a working set to the receiver.createAggregateWorkingSet(String name, String label, IWorkingSet[] components) Create a working set that is the union of a collection of other working sets.createWorkingSet(String name, IAdaptable[] elements) Creates a new working set.createWorkingSet(IMemento memento) Re-creates and returns a working set from the state captured within the given memento.createWorkingSetEditWizard(IWorkingSet workingSet) Creates a working set edit wizard for the specified working set.createWorkingSetNewWizard(String[] workingSetIds) Creates a working set new wizard.createWorkingSetSelectionDialog(Shell parent) Deprecated.use createWorkingSetSelectionDialog(parent, true) insteadcreateWorkingSetSelectionDialog(Shell parentShell, boolean multi) Creates a working set selection dialog that lists all working sets and allows the user to add, remove and edit working sets.createWorkingSetSelectionDialog(Shell parentShell, boolean multi, String[] workingsSetIds) Creates a working set selection dialog that lists all working sets with the specified ids and allows the user to add, remove and edit working sets with the specified ids.voiddispose()Disposes the working set manager.Returns an array of all working sets stored in the receiver including those that are marked as being not visible.Returns the list of most recently used working sets.intReturns the maximum length of the recent working sets list.getWorkingSet(String name) Returns the working set with the specified name.Returns an array of all working sets stored in the receiver.voidRemoves the property change listener.voidremoveWorkingSet(IWorkingSet workingSet) Removes the working setvoidsetRecentWorkingSetsLength(int length) Sets maximum length of the recent working sets list.
- 
Field Details- 
CHANGE_WORKING_SET_ADDChange event id when a working set is added newValue of the PropertyChangeEvent will be the added working set. oldValue will be null.- See Also:
 
- 
CHANGE_WORKING_SET_REMOVEChange event id when a working set is removed newValue of the PropertyChangeEvent will be null. oldValue will be the removed working set.- See Also:
 
- 
CHANGE_WORKING_SET_CONTENT_CHANGEChange event id when the working set contents changed newValue of the PropertyChangeEvent will be the changed working set.- See Also:
 
- 
CHANGE_WORKING_SET_NAME_CHANGEChange event id when the working set name changed. newValue of the PropertyChangeEvent will be the changed working set.- See Also:
 
- 
CHANGE_WORKING_SET_LABEL_CHANGEChange event id when the working set label changed. newValue of the PropertyChangeEvent will be the changed working set.- Since:
- 3.2
- See Also:
 
- 
CHANGE_WORKING_SET_UPDATER_INSTALLEDChange event id when a working set updater got installed. NewValue of the PropertyChangeEvent will be the installed updater. OldValue will benull- Since:
- 3.1
- See Also:
 
- 
CHANGE_WORKING_SET_UPDATER_UNINSTALLEDChange event id when a working set updater got uninstalled. NewValue will benullOldValue of the PropertyChangeEvent will be the uninstalled updater.- Since:
- 3.3
- See Also:
 
 
- 
- 
Method Details- 
addPropertyChangeListenerAdds a property change listener.- Parameters:
- listener- the property change listener to add
 
- 
addRecentWorkingSetAdds 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.- Parameters:
- workingSet- the working set to add to the list of most recently used working sets.
 
- 
addWorkingSetAdds a working set to the receiver. The working set must not exist yet.- Parameters:
- workingSet- the working set to add
 
- 
createWorkingSetCreates a new working set. The working set is not added to the working set manager.- Parameters:
- name- the name of the new working set. Should not have leading or trailing whitespace.
- elements- the working set contents
- Returns:
- a new working set with the specified name and content
 
- 
createAggregateWorkingSetCreate a working set that is the union of a collection of other working sets. One connected (viaaddWorkingSet(IWorkingSet)this working set will be automatically updated to reflect the contents of the component sets, should they themselves change.- Parameters:
- name- the name of the new working set. Should not have leading or trailing whitespace.
- label- the user-friendly label the working set
- components- the component working sets
- Returns:
- a new working set with the specified name and content
- Since:
- 3.2
 
- 
createWorkingSetRe-creates and returns a working set from the state captured within the given memento.- Parameters:
- memento- a memento containing the state for the working set
- Returns:
- the restored working set, or nullif it could not be created
- Since:
- 3.0
 
- 
createWorkingSetEditWizardCreates a working set edit wizard for the specified working set. The working set will already be set in the wizard. The caller is responsible for creating and opening a wizard dialog. Example:IWorkingSetEditWizard wizard = workingSetManager.createWorkingSetEditWizard(workingSet); if (wizard != null) { WizardDialog dialog = new WizardDialog(shell, wizard); dialog.create(); if (dialog.open() == Window.OK) { workingSet = wizard.getSelection(); } }- Parameters:
- workingSet- working set to create a working set edit wizard for.
- Returns:
- a working set edit wizard to edit the specified working set or
         nullif no edit wizard has been defined for the working set. If the defined edit wizard for the working set could not be loaded a default IResource based wizard will be returned. If the default edit wizard can not be loadednullis returned.
- Since:
- 2.1
 
- 
createWorkingSetNewWizardCreates a working set new wizard. The wizard will allow creating new working sets. Returnsnullif there aren't any working set definitions that support creation of working sets.Example: IWorkingSetNewWizard wizard= workingSetManager.createWorkingSetNewWizard(null); if (wizard != null) { WizardDialog dialog = new WizardDialog(shell, wizard); dialog.create(); if (dialog.open() == Window.OK) { ... } }- Parameters:
- workingSetIds- a list of working set ids which are valid workings sets to be created or- nullif all currently available working set types are valid
- Returns:
- the working set new wizard or null
- Since:
- 3.1
 
- 
createWorkingSetSelectionDialogDeprecated.use createWorkingSetSelectionDialog(parent, true) instead- Parameters:
- parent- the parent shell
- Returns:
- the dialog
 
- 
createWorkingSetSelectionDialogCreates a working set selection dialog that lists all working sets and allows the user to add, remove and edit working sets. The caller is responsible for opening the dialog withIWorkingSetSelectionDialog#open, and subsequently extracting the selected working sets usingIWorkingSetSelectionDialog#getSelection.- Parameters:
- parentShell- the parent shell of the working set selection dialog
- multi- true=- IWorkingSetSelectionDialog#getSelection()returns the working sets chosen in the dialog as an array of working set. false=- IWorkingSetSelectionDialog#getSelection()returns an array having a single aggregate working set of all working sets selected in the dialog.
- Returns:
- a working set selection dialog
 
- 
createWorkingSetSelectionDialogIWorkingSetSelectionDialog createWorkingSetSelectionDialog(Shell parentShell, boolean multi, String[] workingsSetIds) Creates a working set selection dialog that lists all working sets with the specified ids and allows the user to add, remove and edit working sets with the specified ids. The caller is responsible for opening the dialog withIWorkingSetSelectionDialog#open, and subsequently extracting the selected working sets usingIWorkingSetSelectionDialog#getSelection.- Parameters:
- parentShell- the parent shell of the working set selection dialog
- multi- true=- IWorkingSetSelectionDialog#getSelection()returns the working sets chosen in the dialog as an array of working set. false=- IWorkingSetSelectionDialog#getSelection()returns an array having a single aggregate working set of all working sets selected in the dialog.
- workingsSetIds- a list of working set ids which are valid workings sets to be selected, created, removed or edited, or- nullif all currently available working set types are valid
- Returns:
- a working set selection dialog
- Since:
- 3.1
 
- 
getRecentWorkingSetsIWorkingSet[] getRecentWorkingSets()Returns the list of most recently used working sets. The most recently used working set appears first in the list.- Returns:
- the list of most recently used working sets
 
- 
getWorkingSetReturns the working set with the specified name. Returns null if there is no working set with that name.- Parameters:
- name- the name of the working set to return
- Returns:
- the working set with the specified name.
 
- 
getWorkingSetsIWorkingSet[] getWorkingSets()Returns an array of all working sets stored in the receiver. The array is sorted by names. Any working set whoseIWorkingSet.isVisible()method returns false will not be included in this array. For a complete list of working sets please usegetAllWorkingSets().- Returns:
- the working sets stored in the receiver
 
- 
getAllWorkingSetsIWorkingSet[] getAllWorkingSets()Returns an array of all working sets stored in the receiver including those that are marked as being not visible.- Returns:
- the working sets stored in the receiver
- Since:
- 3.2
- See Also:
 
- 
removePropertyChangeListenerRemoves the property change listener.- Parameters:
- listener- the property change listener to remove
 
- 
removeWorkingSetRemoves the working set- Parameters:
- workingSet- the working set to remove
 
- 
disposevoid dispose()Disposes the working set manager.- Since:
- 3.1
 
- 
addToWorkingSetsUtility method that will add theelementto each given working set inworkingSetsif possible. This method will invokeIWorkingSet.adaptElements(IAdaptable[])for the element on each working set and the result of this method will be used rather than the original element in the addition operation.- Parameters:
- element- the element to adapt and then add to the working sets
- workingSets- the working sets to add the element to
- Since:
- 3.4
 
- 
setRecentWorkingSetsLengthvoid setRecentWorkingSetsLength(int length) Sets maximum length of the recent working sets list.- Parameters:
- length- maximum number of recent working sets to be kept in the list
- Since:
- 3.7
 
- 
getRecentWorkingSetsLengthint getRecentWorkingSetsLength()Returns the maximum length of the recent working sets list.- Returns:
- the maximum length of the recent working sets list.
- Since:
- 3.7
 
 
-