Package org.eclipse.jface.util
Class Policy
java.lang.Object
org.eclipse.jface.util.Policy
The Policy class handles settings for behaviour, debug flags and logging
 within JFace.
- Since:
- 3.0
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic booleanA flag to indicate whether unparented dialogs should be checked.static final booleanConstant for the the default setting for debug options.static final StringThe unique identifier of the JFace plug-in.static booleanA flag to indicate whether actions are being traced.static booleanA flag to indicate whether toolbars are being traced.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic AnimatorFactoryDeprecated, for removal: This API element is subject to removal in a future version.this is no longer in use as of 3.3static Comparator<Object> Return the comparator used by JFace to sort strings.static ErrorSupportProviderReturn the ErrorSupportProvider for the receiver.static ILoggergetLog()Returns the logger used by JFace to log errors.static StatusHandlerReturns the status handler used by JFace to handle statuses.static voidlogException(Exception exception) Log the Exception to the logger.static voidsetAnimatorFactory(AnimatorFactory factory) Deprecated, for removal: This API element is subject to removal in a future version.this is no longer in use as of 3.3static voidsetComparator(Comparator<Object> comparator) Sets the comparator used by JFace to sort strings.static voidsetErrorSupportProvider(ErrorSupportProvider provider) Set the error support provider for error dialogs.static voidSets the logger used by JFace to log errors.static voidsetStatusHandler(StatusHandler status) Sets the status handler used by JFace to handle statuses.
- 
Field Details- 
DEFAULTpublic static final boolean DEFAULTConstant for the the default setting for debug options.- See Also:
 
- 
JFACEThe unique identifier of the JFace plug-in.- See Also:
 
- 
DEBUG_DIALOG_NO_PARENTpublic static boolean DEBUG_DIALOG_NO_PARENTA flag to indicate whether unparented dialogs should be checked.
- 
TRACE_ACTIONSpublic static boolean TRACE_ACTIONSA flag to indicate whether actions are being traced.
- 
TRACE_TOOLBARpublic static boolean TRACE_TOOLBARA flag to indicate whether toolbars are being traced.
 
- 
- 
Constructor Details- 
Policypublic Policy()
 
- 
- 
Method Details- 
setLogSets the logger used by JFace to log errors.- Parameters:
- logger- the logger to use, or- nullto use the default logger
- Since:
- 3.1
 
- 
getLogReturns the logger used by JFace to log errors.The default logger prints the status to System.err.- Returns:
- the logger
- Since:
- 3.1
 
- 
setStatusHandlerSets the status handler used by JFace to handle statuses.- Parameters:
- status- the handler to use, or- nullto use the default one
- Since:
- 3.4
 
- 
getStatusHandlerReturns the status handler used by JFace to handle statuses.- Returns:
- the status handler
- Since:
- 3.4
 
- 
getComparatorReturn the comparator used by JFace to sort strings.- Returns:
- the comparator used by JFace to sort strings
- Since:
- 3.2
 
- 
setComparatorSets the comparator used by JFace to sort strings.- Parameters:
- comparator- comparator used by JFace to sort strings
- Since:
- 3.2
 
- 
setAnimatorFactory@Deprecated(forRemoval=true, since="2025-03") public static void setAnimatorFactory(AnimatorFactory factory) Deprecated, for removal: This API element is subject to removal in a future version.this is no longer in use as of 3.3Sets the animator factory used by JFace to create control animator instances.- Parameters:
- factory- the AnimatorFactory to use.
- Since:
- 3.2
 
- 
getAnimatorFactoryDeprecated, for removal: This API element is subject to removal in a future version.this is no longer in use as of 3.3Returns the animator factory used by JFace to create control animator instances.- Returns:
- the animator factory used to create control animator instances.
- Since:
- 3.2
 
- 
setErrorSupportProviderSet the error support provider for error dialogs.- Parameters:
- provider- provider to set
- Since:
- 3.3
 
- 
getErrorSupportProviderReturn the ErrorSupportProvider for the receiver.- Returns:
- ErrorSupportProvider or nullif this has not been set
- Since:
- 3.3
 
- 
logExceptionLog the Exception to the logger.- Parameters:
- exception- exception to log
- Since:
- 3.4
 
 
-