public final class PreferencesUtil extends Object
Modifier and Type | Field and Description |
---|---|
static int |
OPTION_FILTER_LOCKED
Constant for configuring a preferences or properties dialog in which the
user cannot "unfilter" to show a larger set of pages than was passed to
createPreferenceDialogOn(Shell, String, String[], Object, int)
or
createPropertyDialogOn(Shell, IAdaptable, String, String[], Object, int)
. |
static int |
OPTION_NONE
Constant denoting no option.
|
Constructor and Description |
---|
PreferencesUtil() |
Modifier and Type | Method and Description |
---|---|
static PreferenceDialog |
createPreferenceDialogOn(Shell shell,
String preferencePageId,
String[] displayedIds,
Object data)
Creates a workbench preference dialog and selects particular preference
page.
|
static PreferenceDialog |
createPreferenceDialogOn(Shell shell,
String preferencePageId,
String[] displayedIds,
Object data,
int options)
Creates a workbench preference dialog and selects particular preference
page.
|
static PreferenceDialog |
createPropertyDialogOn(Shell shell,
IAdaptable element,
String propertyPageId,
String[] displayedIds,
Object data)
Creates a workbench preference dialog to a particular preference page.
|
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.
|
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.
|
static boolean |
hasPropertiesContributors(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.
|
public static final int OPTION_NONE
public static final int OPTION_FILTER_LOCKED
createPreferenceDialogOn(Shell, String, String[], Object, int)
or
createPropertyDialogOn(Shell, IAdaptable, String, String[], Object, int)
.public static final PreferenceDialog createPreferenceDialogOn(Shell shell, String preferencePageId, String[] displayedIds, Object data)
open()
. The call to open()
will not return
until the dialog closes, so this is the last chance to manipulate the
dialog.shell
- The Shell to parent the dialog off of if it is not already
created. May be null
in 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 null
nothing will be called.PreferenceDialog.PreferenceDialog(Shell, PreferenceManager)
public static final PreferenceDialog createPropertyDialogOn(Shell shell, IAdaptable element, String propertyPageId, String[] displayedIds, Object data)
open()
. The call to open()
will not
return until the dialog closes, so this is the last chance to manipulate
the dialog.shell
- The shell to use to parent the dialog if required.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.element
- IAdaptable An adaptable element to open the dialog on.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 null
nothing will be called.null
if it could not be created.public static final PreferenceDialog createPreferenceDialogOn(Shell shell, String preferencePageId, String[] displayedIds, Object data, int options)
open()
. The call to open()
will not return
until the dialog closes, so this is the last chance to manipulate the
dialog.shell
- The Shell to parent the dialog off of if it is not already
created. May be null
in 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 null
nothing will be called.options
- a bitwise OR of option constantsPreferenceDialog.PreferenceDialog(Shell, PreferenceManager)
public static final PreferenceDialog createPropertyDialogOn(Shell shell, IAdaptable element, String propertyPageId, String[] displayedIds, Object data, int options)
open()
. The call to open()
will not return
until the dialog closes, so this is the last chance to manipulate the
dialog.shell
- The shell to use to parent the dialog if required.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.element
- IAdaptable An adaptable element to open the dialog on.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 null
nothing will be called.options
- a bitwise OR of option constantsnull
if it could not be created.public static final PreferenceDialog createPropertyDialogOn(Shell shell, Object element, String propertyPageId, String[] displayedIds, Object data, int options)
open()
. The call to open()
will not return
until the dialog closes, so this is the last chance to manipulate the
dialog.shell
- The shell to use to parent the dialog if required.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.element
- An element to open the dialog on.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 null
nothing will be called.options
- a bitwise OR of option constantsnull
if it could not be created.public static boolean hasPropertiesContributors(Object element)
element
- an adapter element of a property pagepublic static IPreferenceNode[] propertiesContributorsFor(Object element)
element
- IPreferenceNode
[]
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.