Class AbstractFormatterPreferencePage
- java.lang.Object
-
- org.eclipse.jface.dialogs.DialogPage
-
- org.eclipse.jface.preference.PreferencePage
-
- com.e1c.g5.v8.dt.formatter.ui.preferences.page.AbstractFormatterPreferencePage
-
- All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage
,org.eclipse.jface.dialogs.IMessageProvider
,org.eclipse.jface.preference.IPreferencePage
,org.eclipse.ui.IWorkbenchPreferencePage
- Direct Known Subclasses:
BslFormatterPreferencePage
public abstract class AbstractFormatterPreferencePage extends org.eclipse.jface.preference.PreferencePage implements org.eclipse.ui.IWorkbenchPreferencePage
Represents preference page of formatter. OverridegetPreferenceManager()
andcreateContent(IPreferencePageProvider)
.createContent(IPreferencePageProvider)
method shall useIPreferencePageProvider
to create preference page's UI representation. It also usesIOptionFactory
that createsIOption
's as entity that associates UI element and its preference. Use org.eclipse.ui.preferencePages extension point to register your preference page- See Also:
IPreferenceManager
,IPreferencePageProvider
,IOption
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractFormatterPreferencePage.OptionFactory
This is basic implementation of#IOptionFactory
.protected class
AbstractFormatterPreferencePage.OptionProvider
Simple implementation ofIOptionProvider
that provides cached options in option maps
-
Constructor Summary
Constructors Constructor Description AbstractFormatterPreferencePage()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
contributeButtons(org.eclipse.swt.widgets.Composite parent)
protected abstract void
createContent(IPreferencePageProvider preferencePageProvider)
This method shall create new Instance of IPreferencePageBuilder, add options and then return itprotected org.eclipse.swt.widgets.Control
createContents(org.eclipse.swt.widgets.Composite parent)
protected abstract IPreferenceManager
getPreferenceManager()
Override this method to provide corresponding to this pageIPreferenceManager
protected abstract IPreferencePageProvider
getPreferencePageProvider()
Return implementation of IPreferencePageProvider that can build UI representation of Options.void
init(org.eclipse.ui.IWorkbench workbench)
protected void
onDispose(org.eclipse.swt.events.DisposeEvent e)
This method called when preference page's composite is disposedprotected void
performDefaults()
boolean
performOk()
-
Methods inherited from class org.eclipse.jface.preference.PreferencePage
applyData, applyDialogFont, computeSize, createControl, createDescriptionLabel, createNoteComposite, doComputeSize, doGetPreferenceStore, getApplyButton, getContainer, getDefaultsButton, getPreferenceStore, isValid, noDefaultAndApplyButton, noDefaultButton, okToLeave, performApply, performCancel, performHelp, setContainer, setErrorMessage, setMessage, setPreferenceStore, setSize, setTitle, setValid, toString, updateApplyButton
-
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getImage, getMessage, getMessageType, getShell, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, setButtonLayoutData, setControl, setDescription, setImageDescriptor, setMessage, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
performOk
public boolean performOk()
- Specified by:
performOk
in interfaceorg.eclipse.jface.preference.IPreferencePage
- Overrides:
performOk
in classorg.eclipse.jface.preference.PreferencePage
-
init
public void init(org.eclipse.ui.IWorkbench workbench)
- Specified by:
init
in interfaceorg.eclipse.ui.IWorkbenchPreferencePage
-
createContents
protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
- Specified by:
createContents
in classorg.eclipse.jface.preference.PreferencePage
-
contributeButtons
protected void contributeButtons(org.eclipse.swt.widgets.Composite parent)
- Overrides:
contributeButtons
in classorg.eclipse.jface.preference.PreferencePage
-
performDefaults
protected void performDefaults()
- Overrides:
performDefaults
in classorg.eclipse.jface.preference.PreferencePage
-
getPreferencePageProvider
protected abstract IPreferencePageProvider getPreferencePageProvider()
Return implementation of IPreferencePageProvider that can build UI representation of Options.- Parameters:
optionFactory
- The option factory to create optionsoptionProvider
- The option provider that provides options for preview editors- Returns:
- The new instance of implementation of IPreferencePageProvider See this for easier implementation:
- See Also:
AbstractPreferencePageProvider
,DefaultUITabFolderProvider
,DefaultUITabItemProvider
,DefaultUIGroupProvider
-
onDispose
protected void onDispose(org.eclipse.swt.events.DisposeEvent e)
This method called when preference page's composite is disposed- Parameters:
e
- The DisposeEvent to handle, cannot benull
- See Also:
DisposeListener.widgetDisposed(DisposeEvent)
-
getPreferenceManager
protected abstract IPreferenceManager getPreferenceManager()
Override this method to provide corresponding to this pageIPreferenceManager
- Returns:
- Associated to this page preference manager, cannot be
null
-
createContent
protected abstract void createContent(IPreferencePageProvider preferencePageProvider)
This method shall create new Instance of IPreferencePageBuilder, add options and then return it- Parameters:
preferencePageProvider
- The preferencePageProvider that shall be used to create pages content, cannot benull
-
-