Package org.eclipse.ui.dialogs
Class WorkingSetConfigurationBlock
java.lang.Object
org.eclipse.ui.dialogs.WorkingSetConfigurationBlock
Instances of this class provide a reusable composite with controls that allow
 the selection of working sets. This class is most useful in
 
IWizardPage instances that wish to create resources and pre-install
 them into particular working sets.- Since:
- 3.4
- 
Constructor SummaryConstructorsConstructorDescriptionWorkingSetConfigurationBlock(String[] workingSetIds, IDialogSettings settings) Create a new instance of this working set block using default labels.WorkingSetConfigurationBlock(String[] workingSetIds, IDialogSettings settings, String enableButtonLabel, String comboLabel, String selectLabel) Create a new instance of this working set block using custom labels.WorkingSetConfigurationBlock(IDialogSettings settings, String... workingSetIds) Create a new instance of this working set block using default labels.WorkingSetConfigurationBlock(IDialogSettings settings, String enableButtonLabel, String newButtonLabel, String comboLabel, String selectLabel, String... workingSetIds) Create a new instance of this working set block using custom labels.
- 
Method SummaryModifier and TypeMethodDescriptionvoidcreateContent(Composite parent) Add this block to theparentstatic IWorkingSet[]filter(IWorkingSet[] workingSets, String[] workingSetIds) Filters the given working sets such that the following is true: for each IWorkingSet s in result: s.getId() is element of workingSetIdsfindApplicableWorkingSets(IStructuredSelection selection) Retrieves a working set from the givenselectionor an empty array if no working set could be retrieved.Return the currently selected working sets.voidsetSelection(IStructuredSelection selection) Deprecated.voidsetWorkingSets(IWorkingSet... workingSets) Set the current selection of working sets.
- 
Constructor Details- 
WorkingSetConfigurationBlockCreate a new instance of this working set block using default labels.- Parameters:
- settings- to store/load the selection history
- workingSetIds- working set ids from which the user can choose
- Since:
- 3.108
 
- 
WorkingSetConfigurationBlockCreate a new instance of this working set block using default labels.Note: Consider using the vararg version of this contructor. - Parameters:
- workingSetIds- working set ids from which the user can choose
- settings- to store/load the selection history
 
- 
WorkingSetConfigurationBlockpublic WorkingSetConfigurationBlock(String[] workingSetIds, IDialogSettings settings, String enableButtonLabel, String comboLabel, String selectLabel) Create a new instance of this working set block using custom labels.Note: Consider using the vararg version of this contructor. - Parameters:
- workingSetIds- working set ids from which the user can choose
- settings- to store/load the selection history
- enableButtonLabel- the label to use for the checkable enablement button. May be- nullto use the default value.
- comboLabel- the label to use for the recent working set combo. May be- nullto use the default value.
- selectLabel- the label to use for the select button. May be- nullto use the default value.
 
- 
WorkingSetConfigurationBlockpublic WorkingSetConfigurationBlock(IDialogSettings settings, String enableButtonLabel, String newButtonLabel, String comboLabel, String selectLabel, String... workingSetIds) Create a new instance of this working set block using custom labels.- Parameters:
- settings- to store/load the selection history
- enableButtonLabel- the label to use for the checkable enablement button. May be- nullto use the default value.
- newButtonLabel- the label to use for the new button. May be- nullto use the default value.
- comboLabel- the label to use for the recent working set combo. May be- nullto use the default value.
- selectLabel- the label to use for the select button. May be- nullto use the default value.
- workingSetIds- working set ids from which the user can choose
- Since:
- 3.108
 
 
- 
- 
Method Details- 
filterFilters the given working sets such that the following is true: for each IWorkingSet s in result: s.getId() is element of workingSetIds- Parameters:
- workingSets- the array to filter
- workingSetIds- the acceptable working set ids
- Returns:
- the filtered elements
 
- 
setSelectionDeprecated.Set the current selection in the workbench.- Parameters:
- selection- the selection to present in the UI or null
 
- 
setWorkingSetsSet the current selection of working sets. This array will be filtered to contain only working sets that are applicable to this instance.- Parameters:
- workingSets- the working sets
 
- 
findApplicableWorkingSetsRetrieves a working set from the givenselectionor an empty array if no working set could be retrieved. This selection is filtered based on the criteria used to construct this instance.- Parameters:
- selection- the selection to retrieve the working set from
- Returns:
- the selected working set or an empty array
 
- 
getSelectedWorkingSetsReturn the currently selected working sets. If the controls representing this block are disabled this array will be empty regardless of the currently selected values.- Returns:
- the selected working sets
 
- 
createContentAdd this block to theparent- Parameters:
- parent- the parent to add the block to
 
 
- 
setWorkingSets(IWorkingSet[])andfindApplicableWorkingSets(IStructuredSelection)instead.