Package org.eclipse.ui.dialogs
Class PreferencesUtil
java.lang.Object
org.eclipse.ui.dialogs.PreferencesUtil
The PreferencesUtil class is the class that opens a properties or preference
 dialog on a set of ids.
- Since:
- 3.1
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intConstant for configuring a preferences or properties dialog in which the user cannot "unfilter" to show a larger set of pages than was passed tocreatePreferenceDialogOn(Shell, String, String[], Object, int)orcreatePropertyDialogOn(Shell, IAdaptable, String, String[], Object, int).static final intConstant denoting no option.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic PreferenceDialogcreatePreferenceDialogOn(Shell shell, String preferencePageId, String[] displayedIds, Object data) Creates a workbench preference dialog and selects particular preference page.static PreferenceDialogcreatePreferenceDialogOn(Shell shell, String preferencePageId, String[] displayedIds, Object data, int options) Creates a workbench preference dialog and selects particular preference page.static PreferenceDialogcreatePropertyDialogOn(Shell shell, Object element, String propertyPageId, String[] displayedIds, Object data, int options) Creates a workbench preference dialog to a particular preference page.static PreferenceDialogcreatePropertyDialogOn(Shell shell, IAdaptable element, String propertyPageId, String[] displayedIds, Object data) Creates a workbench preference dialog to a particular preference page.static PreferenceDialogcreatePropertyDialogOn(Shell shell, IAdaptable element, String propertyPageId, String[] displayedIds, Object data, int options) Creates a workbench preference dialog to a particular preference page.static booleanhasPropertiesContributors(Object element) Indicates whether the specified element has at least one property page contributor.static IPreferenceNode[]propertiesContributorsFor(Object element) Return all of the properties page contributors for an element.
- 
Field Details- 
OPTION_NONEpublic static final int OPTION_NONEConstant denoting no option.- Since:
- 3.5
- See Also:
 
- 
OPTION_FILTER_LOCKEDpublic static final int OPTION_FILTER_LOCKEDConstant for configuring a preferences or properties dialog in which the user cannot "unfilter" to show a larger set of pages than was passed tocreatePreferenceDialogOn(Shell, String, String[], Object, int)orcreatePropertyDialogOn(Shell, IAdaptable, String, String[], Object, int).- Since:
- 3.5
- See Also:
 
 
- 
- 
Constructor Details- 
PreferencesUtilpublic PreferencesUtil()
 
- 
- 
Method Details- 
createPreferenceDialogOnpublic static PreferenceDialog createPreferenceDialogOn(Shell shell, String preferencePageId, String[] displayedIds, Object data) Creates a workbench preference dialog and selects particular preference page. If there is already a preference dialog open this dialog is used and its selection is set to the page with id preferencePageId. Show the other pages as filtered results using whatever filtering criteria the search uses. It is the responsibility of the caller to then callopen(). The call toopen()will not return until the dialog closes, so this is the last chance to manipulate the dialog.- Parameters:
- shell- The Shell to parent the dialog off of if it is not already created. May be- nullin which case the active workbench window will be used if available.
- preferencePageId- The identifier of the preference page to open; may be- null. If it is- null, then the preference page is not selected or modified in any way.
- displayedIds- The ids of the other pages to be displayed using the same filtering criterea as search. If this is- null, then the all preference pages are shown.
- data- Data that will be passed to all of the preference pages to be applied as specified within the page as they are created. If the data is- nullnothing will be called.
- Returns:
- a preference dialog.
- Since:
- 3.1
- See Also:
 
- 
createPropertyDialogOnpublic static PreferenceDialog createPropertyDialogOn(Shell shell, IAdaptable element, String propertyPageId, String[] displayedIds, Object data) Creates a workbench preference dialog to a particular preference page. Show the other pages as filtered results using whatever filtering criteria the search uses. It is the responsibility of the caller to then callopen(). The call toopen()will not return until the dialog closes, so this is the last chance to manipulate the dialog.- Parameters:
- shell- The shell to use to parent the dialog if required.
- element- IAdaptable An adaptable element to open the dialog on.
- propertyPageId- The identifier of the preference page to open; may be- null. If it is- null, then the dialog is opened with no selected page.
- displayedIds- The ids of the other pages to be displayed using the same filtering criterea as search. If this is- null, then the all preference pages are shown.
- data- Data that will be passed to all of the preference pages to be applied as specified within the page as they are created. If the data is- nullnothing will be called.
- Returns:
- A preference dialog showing properties for the selection or
         nullif it could not be created.
- Since:
- 3.1
 
- 
createPreferenceDialogOnpublic static PreferenceDialog createPreferenceDialogOn(Shell shell, String preferencePageId, String[] displayedIds, Object data, int options) Creates a workbench preference dialog and selects particular preference page. If there is already a preference dialog open this dialog is used and its selection is set to the page with id preferencePageId. Show the other pages as filtered results using whatever filtering criteria the search uses. It is the responsibility of the caller to then callopen(). The call toopen()will not return until the dialog closes, so this is the last chance to manipulate the dialog.- Parameters:
- shell- The Shell to parent the dialog off of if it is not already created. May be- nullin which case the active workbench window will be used if available.
- preferencePageId- The identifier of the preference page to open; may be- null. If it is- null, then the preference page is not selected or modified in any way.
- displayedIds- The ids of the other pages to be displayed using the same filtering criterea as search. If this is- null, then the all preference pages are shown.
- data- Data that will be passed to all of the preference pages to be applied as specified within the page as they are created. If the data is- nullnothing will be called.
- options- a bitwise OR of option constants
- Returns:
- a preference dialog.
- Since:
- 3.5
- See Also:
 
- 
createPropertyDialogOnpublic static PreferenceDialog createPropertyDialogOn(Shell shell, IAdaptable element, String propertyPageId, String[] displayedIds, Object data, int options) Creates a workbench preference dialog to a particular preference page. Show the other pages as filtered results using whatever filtering criteria the search uses. It is the responsibility of the caller to then callopen(). The call toopen()will not return until the dialog closes, so this is the last chance to manipulate the dialog.- Parameters:
- shell- The shell to use to parent the dialog if required.
- element- IAdaptable An adaptable element to open the dialog on.
- propertyPageId- The identifier of the preference page to open; may be- null. If it is- null, then the dialog is opened with no selected page.
- displayedIds- The ids of the other pages to be displayed using the same filtering criteria as search. If this is- null, then the all preference pages are shown.
- data- Data that will be passed to all of the preference pages to be applied as specified within the page as they are created. If the data is- nullnothing will be called.
- options- a bitwise OR of option constants
- Returns:
- A preference dialog showing properties for the selection or
         nullif it could not be created.
- Since:
- 3.5
 
- 
createPropertyDialogOnpublic static PreferenceDialog createPropertyDialogOn(Shell shell, Object element, String propertyPageId, String[] displayedIds, Object data, int options) Creates a workbench preference dialog to a particular preference page. Show the other pages as filtered results using whatever filtering criteria the search uses. It is the responsibility of the caller to then callopen(). The call toopen()will not return until the dialog closes, so this is the last chance to manipulate the dialog.- Parameters:
- shell- The shell to use to parent the dialog if required.
- element- An element to open the dialog on.
- propertyPageId- The identifier of the preference page to open; may be- null. If it is- null, then the dialog is opened with no selected page.
- displayedIds- The IDs of the other pages to be displayed using the same filtering criteria as search. If this is- null, then the all preference pages are shown.
- data- Data that will be passed to all of the preference pages to be applied as specified within the page as they are created. If the data is- nullnothing will be called.
- options- a bitwise OR of option constants
- Returns:
- A preference dialog showing properties for the selection or
         nullif it could not be created.
- Since:
- 3.6
 
- 
hasPropertiesContributorsIndicates whether the specified element has at least one property page contributor.- Parameters:
- element- an adapter element of a property page
- Returns:
- true for having at least one contributor; false otherwise
- Since:
- 3.4
 
- 
propertiesContributorsForReturn all of the properties page contributors for an element.- Parameters:
- element- the element to process
- Returns:
- IPreferenceNode[]
- Since:
- 3.4
 
 
-