Class AbstractPreferenceTabFolderProvider
- java.lang.Object
-
- com.e1c.g5.v8.dt.formatter.ui.preferences.page.builders.AbstractPreferenceTabFolderProvider
-
- All Implemented Interfaces:
IPreferenceTabFolderProvider
- Direct Known Subclasses:
DefaultUITabFolderProvider
public abstract class AbstractPreferenceTabFolderProvider extends Object implements IPreferenceTabFolderProvider
This is abstract implementation ofIPreferenceTabFolderProvider
that collects tabItems and creates them withcreatePreferenceTabItemProvider()
. It can create itself withcreateTabFodler(Composite)
-
-
Constructor Summary
Constructors Constructor Description AbstractPreferenceTabFolderProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addOption(String tabName, String groupName, IOption<?> option)
Adds option to the TabItem with given name and the Group with given namevoid
addShowWhitespaceOption(IOption<Boolean> option)
Adds specific option that is used to turn on/off showing of whitespace characters in preview editors.void
createContent(org.eclipse.swt.widgets.Composite parent)
Builds UI representation of this TabFolderprotected abstract IPreferenceTabItemProvider
createPreferenceTabItemProvider()
Creates new instance ofIPreferenceTabItemProvider
, cannot benull
protected abstract org.eclipse.swt.widgets.TabFolder
createTabFodler(org.eclipse.swt.widgets.Composite parent)
Creates instance of the TabFolder on the compositeprotected void
reformat(String tabItemName)
Calls reformat on tab with given namevoid
setPreview(String tabName, String previewText, IOptionProvider optionProvider)
Sets given previewText and given previewFromatter for the tab with given tabName
-
-
-
Method Detail
-
addOption
public void addOption(String tabName, String groupName, IOption<?> option)
Description copied from interface:IPreferenceTabFolderProvider
Adds option to the TabItem with given name and the Group with given name- Specified by:
addOption
in interfaceIPreferenceTabFolderProvider
- Parameters:
tabName
- The name of the TabItem to add the option, cannot benull
groupName
- The name of the Group held by TabItem to add the option, can benull
option
- The option to add, cannot benull
-
createContent
public void createContent(org.eclipse.swt.widgets.Composite parent)
Description copied from interface:IPreferenceTabFolderProvider
Builds UI representation of this TabFolder- Specified by:
createContent
in interfaceIPreferenceTabFolderProvider
- Parameters:
parent
- The composite parent of this TabFolder, cannot benull
-
setPreview
public void setPreview(String tabName, String previewText, IOptionProvider optionProvider)
Description copied from interface:IPreferenceTabFolderProvider
Sets given previewText and given previewFromatter for the tab with given tabName- Specified by:
setPreview
in interfaceIPreferenceTabFolderProvider
- Parameters:
tabName
- The name of the tab to set preview preferences on, cannot benull
previewText
- The text of preview(code example to be formatted), can benull
optionProvider
- The option provider for formatter(that shall format previewText with given preferences), cannot benull
-
addShowWhitespaceOption
public void addShowWhitespaceOption(IOption<Boolean> option)
Description copied from interface:IPreferenceTabFolderProvider
Adds specific option that is used to turn on/off showing of whitespace characters in preview editors. The last option that is called with this will be applied- Specified by:
addShowWhitespaceOption
in interfaceIPreferenceTabFolderProvider
- Parameters:
option
- The option that is used to read and write actual values
-
reformat
protected void reformat(String tabItemName)
Calls reformat on tab with given name- Parameters:
tabItemName
- The name of the tab to call reformat on, cannot benull
-
createTabFodler
protected abstract org.eclipse.swt.widgets.TabFolder createTabFodler(org.eclipse.swt.widgets.Composite parent)
Creates instance of the TabFolder on the composite- Parameters:
parent
- The composite parent to build TabFodler on, cannot benull
- Returns:
- The new instance of TabFodler, cannot be
null
-
createPreferenceTabItemProvider
protected abstract IPreferenceTabItemProvider createPreferenceTabItemProvider()
Creates new instance ofIPreferenceTabItemProvider
, cannot benull
- Returns:
- new instance of
IPreferenceTabItemProvider
, cannot benull
-
-