public interface IWorkingSetManager
The workbench working set manager can be accessed using
IWorkbench#getWorkingSetManager()
This interface is not intended to be implemented by clients.
IWorkingSet
Modifier and Type | Field and Description |
---|---|
static String |
CHANGE_WORKING_SET_ADD
Change event id when a working set is added
newValue of the PropertyChangeEvent will be the added working set.
|
static String |
CHANGE_WORKING_SET_CONTENT_CHANGE
Change event id when the working set contents changed
newValue of the PropertyChangeEvent will be the changed working set.
|
static String |
CHANGE_WORKING_SET_LABEL_CHANGE
Change event id when the working set label changed.
|
static String |
CHANGE_WORKING_SET_NAME_CHANGE
Change event id when the working set name changed.
|
static String |
CHANGE_WORKING_SET_REMOVE
Change event id when a working set is removed
newValue of the PropertyChangeEvent will be null.
|
static String |
CHANGE_WORKING_SET_UPDATER_INSTALLED
Change event id when a working set updater got installed.
|
static String |
CHANGE_WORKING_SET_UPDATER_UNINSTALLED
Change event id when a working set updater got uninstalled.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(IPropertyChangeListener listener)
Adds a property change listener.
|
void |
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 |
addToWorkingSets(IAdaptable element,
IWorkingSet[] workingSets)
Utility method that will add the
element to each given
working set in workingSets if possible. |
void |
addWorkingSet(IWorkingSet workingSet)
Adds a working set to the receiver.
|
IWorkingSet |
createAggregateWorkingSet(String name,
String label,
IWorkingSet[] components)
Create a working set that is the union of a collection of other working
sets.
|
IWorkingSet |
createWorkingSet(IMemento memento)
Re-creates and returns a working set from the state captured within the
given memento.
|
IWorkingSet |
createWorkingSet(String name,
IAdaptable[] elements)
Creates a new working set.
|
IWorkingSetEditWizard |
createWorkingSetEditWizard(IWorkingSet workingSet)
Creates a working set edit wizard for the specified working set.
|
IWorkingSetNewWizard |
createWorkingSetNewWizard(String[] workingSetIds)
Creates a working set new wizard.
|
IWorkingSetSelectionDialog |
createWorkingSetSelectionDialog(Shell parent)
Deprecated.
use createWorkingSetSelectionDialog(parent, true) instead
|
IWorkingSetSelectionDialog |
createWorkingSetSelectionDialog(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.
|
IWorkingSetSelectionDialog |
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.
|
void |
dispose()
Disposes the working set manager.
|
IWorkingSet[] |
getAllWorkingSets()
Returns an array of all working sets stored in the receiver including
those that are marked as being not visible.
|
IWorkingSet[] |
getRecentWorkingSets()
Returns the list of most recently used working sets.
|
int |
getRecentWorkingSetsLength()
Returns the maximum length of the recent working sets list.
|
IWorkingSet |
getWorkingSet(String name)
Returns the working set with the specified name.
|
IWorkingSet[] |
getWorkingSets()
Returns an array of all working sets stored in the receiver.
|
void |
removePropertyChangeListener(IPropertyChangeListener listener)
Removes the property change listener.
|
void |
removeWorkingSet(IWorkingSet workingSet)
Removes the working set
|
void |
setRecentWorkingSetsLength(int length)
Sets maximum length of the recent working sets list.
|
static final String CHANGE_WORKING_SET_ADD
IPropertyChangeListener
,
Constant Field Valuesstatic final String CHANGE_WORKING_SET_REMOVE
IPropertyChangeListener
,
Constant Field Valuesstatic final String CHANGE_WORKING_SET_CONTENT_CHANGE
IPropertyChangeListener
,
Constant Field Valuesstatic final String CHANGE_WORKING_SET_NAME_CHANGE
IPropertyChangeListener
,
Constant Field Valuesstatic final String CHANGE_WORKING_SET_LABEL_CHANGE
IPropertyChangeListener
,
Constant Field Valuesstatic final String CHANGE_WORKING_SET_UPDATER_INSTALLED
null
static final String CHANGE_WORKING_SET_UPDATER_UNINSTALLED
null
OldValue of the PropertyChangeEvent will be the uninstalled updater.void addPropertyChangeListener(IPropertyChangeListener listener)
listener
- the property change listener to addvoid addRecentWorkingSet(IWorkingSet workingSet)
workingSet
- the working set to add to the list of most
recently used working sets.void addWorkingSet(IWorkingSet workingSet)
workingSet
- the working set to addIWorkingSet createWorkingSet(String name, IAdaptable[] elements)
name
- the name of the new working set. Should not have
leading or trailing whitespace.elements
- the working set contentsIWorkingSet createAggregateWorkingSet(String name, String label, IWorkingSet[] components)
addWorkingSet(IWorkingSet)
this working set
will be automatically updated to reflect the contents of the component
sets, should they themselves change.name
- the name of the new working set. Should not have leading or
trailing whitespace.label
- the user-friendly label the working setcomponents
- the component working setsIWorkingSet createWorkingSet(IMemento memento)
memento
- a memento containing the state for the working setnull
if it could not be createdIWorkingSetEditWizard createWorkingSetEditWizard(IWorkingSet workingSet)
IWorkingSetEditWizard wizard = workingSetManager.createWorkingSetEditWizard(workingSet);
if (wizard != null) {
WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.create();
if (dialog.open() == Window.OK) {
workingSet = wizard.getSelection();
}
}
workingSet
- working set to create a working set edit wizard
for.null
if 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 loaded null
is
returned.IWorkingSetNewWizard createWorkingSetNewWizard(String[] workingSetIds)
null
if 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) {
...
}
}
workingSetIds
- a list of working set ids which are valid workings sets
to be created or null
if all currently available working set types
are validnull
@Deprecated IWorkingSetSelectionDialog createWorkingSetSelectionDialog(Shell parent)
parent
- the parent shellIWorkingSetSelectionDialog createWorkingSetSelectionDialog(Shell parentShell, boolean multi)
IWorkingSetSelectionDialog#open
, and subsequently
extracting the selected working sets using
IWorkingSetSelectionDialog#getSelection
.parentShell
- the parent shell of the working set selection dialogmulti
- 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.IWorkingSetSelectionDialog createWorkingSetSelectionDialog(Shell parentShell, boolean multi, String[] workingsSetIds)
IWorkingSetSelectionDialog#open
, and subsequently
extracting the selected working sets using
IWorkingSetSelectionDialog#getSelection
.parentShell
- the parent shell of the working set selection dialogmulti
- 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 null
if all currently
available working set types are validIWorkingSet[] getRecentWorkingSets()
IWorkingSet getWorkingSet(String name)
name
- the name of the working set to returnIWorkingSet[] getWorkingSets()
IWorkingSet.isVisible()
method returns false will not be included in this array. For a complete
list of working sets please use getAllWorkingSets()
.IWorkingSet[] getAllWorkingSets()
IWorkingSet.isVisible()
void removePropertyChangeListener(IPropertyChangeListener listener)
listener
- the property change listener to removevoid removeWorkingSet(IWorkingSet workingSet)
workingSet
- the working set to removevoid dispose()
void addToWorkingSets(IAdaptable element, IWorkingSet[] workingSets)
element
to each given
working set in workingSets
if possible. This method will
invoke IWorkingSet.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.element
- the element to adapt and then add to the working setsworkingSets
- the working sets to add the element tovoid setRecentWorkingSetsLength(int length)
length
- maximum number of recent working sets to be kept in the listint getRecentWorkingSetsLength()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.