Class BslTemplatePreferencePage
- java.lang.Object
-
- org.eclipse.jface.dialogs.DialogPage
-
- org.eclipse.jface.preference.PreferencePage
-
- com.e1c.g5.v8.dt.lcore.ui.templates.preferences.AbstractTemplatePreferencePage
-
- com.e1c.g5.v8.dt.bsl.ui.templates.preferences.BslTemplatePreferencePage
-
- 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:
BslTemplatePropertyPage
public class BslTemplatePreferencePage extends AbstractTemplatePreferencePage
Built-in Language implementation of Template Preference Page
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.e1c.g5.v8.dt.lcore.ui.templates.preferences.AbstractTemplatePreferencePage
AbstractTemplatePreferencePage.DefaultTemplateLabelProvider, AbstractTemplatePreferencePage.TemplateColumnSelectionAdapter, AbstractTemplatePreferencePage.TemplateViewerComparator
-
-
Field Summary
-
Fields inherited from class com.e1c.g5.v8.dt.lcore.ui.templates.preferences.AbstractTemplatePreferencePage
currentSearchText, templatesTableViewer, templateStorageManager, templateStorageSnapshot
-
-
Constructor Summary
Constructors Constructor Description BslTemplatePreferencePage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
adjustPatternPreview(org.eclipse.swt.custom.StyledText patternPreview, ITemplate template)
Adjusts the preview of the pattern text field with given templateprotected TemplateStorageManager
createTemplateStorageManager()
GetsTemplateStorageManager
for this preference pagevoid
dispose()
protected ITemplate
doAdd()
Creates new template and returns itprotected boolean
doEdit(ITemplate template)
Edits the given templateprotected ScriptVariant
getScriptVariant()
Gets actualScriptVariant
for choosing language Russian or English for editing templateprotected org.eclipse.swt.events.SelectionAdapter
getTemplateColumnSelectionAdapter(org.eclipse.swt.widgets.TableColumn tableColumn, int columnIndex, AbstractTemplatePreferencePage.TemplateViewerComparator viewerComparator, TableViewer tableViewer)
Returns new SelectionAdapter for tableColumn with given parametersprotected String
getTemplateContextPresentation(ITemplateContext templateContext)
Returns presentation of context of given templateContext.protected void
handleExport()
Handle export button selection.protected void
handleImport()
Handles import button selection-
Methods inherited from class com.e1c.g5.v8.dt.lcore.ui.templates.preferences.AbstractTemplatePreferencePage
adjustDescriptionPreview, adjustPreviewField, createContents, createTable, handleAdd, handleEdit, handleRemove, handleSelection, init, isAccebtableTemplate, performCancel, performOk, setNewTemplateStorageManager
-
Methods inherited from class org.eclipse.jface.preference.PreferencePage
applyData, applyDialogFont, computeSize, contributeButtons, createControl, createDescriptionLabel, createNoteComposite, doComputeSize, doGetPreferenceStore, getApplyButton, getContainer, getDefaultsButton, getPreferenceStore, isValid, noDefaultAndApplyButton, noDefaultButton, okToLeave, performApply, performDefaults, performHelp, setContainer, setErrorMessage, setMessage, setPreferenceStore, setSize, setTitle, setValid, toString, updateApplyButton
-
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, 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
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceorg.eclipse.jface.dialogs.IDialogPage
- Overrides:
dispose
in classorg.eclipse.jface.dialogs.DialogPage
-
doEdit
protected boolean doEdit(ITemplate template)
Description copied from class:AbstractTemplatePreferencePage
Edits the given template- Specified by:
doEdit
in classAbstractTemplatePreferencePage
- Parameters:
template
- The template to edit, cannot benull
- Returns:
- Whether editing was completed
-
doAdd
protected ITemplate doAdd()
Description copied from class:AbstractTemplatePreferencePage
Creates new template and returns it- Specified by:
doAdd
in classAbstractTemplatePreferencePage
- Returns:
- The newly created template, can be
null
when adding is canceled
-
createTemplateStorageManager
protected TemplateStorageManager createTemplateStorageManager()
Description copied from class:AbstractTemplatePreferencePage
GetsTemplateStorageManager
for this preference page- Specified by:
createTemplateStorageManager
in classAbstractTemplatePreferencePage
- Returns:
- The
TemplateStorageManager
actual for this preferene page, cannot benull
-
getTemplateContextPresentation
protected String getTemplateContextPresentation(ITemplateContext templateContext)
Description copied from class:AbstractTemplatePreferencePage
Returns presentation of context of given templateContext. It shall be human-readable description on which context this template supports- Specified by:
getTemplateContextPresentation
in classAbstractTemplatePreferencePage
- Parameters:
templateContext
- The templateContext to get presentation, cannot benull
- Returns:
- The presentation of the templateContext, cannot be
null
-
handleImport
protected void handleImport()
Description copied from class:AbstractTemplatePreferencePage
Handles import button selection- Overrides:
handleImport
in classAbstractTemplatePreferencePage
-
getTemplateColumnSelectionAdapter
protected org.eclipse.swt.events.SelectionAdapter getTemplateColumnSelectionAdapter(org.eclipse.swt.widgets.TableColumn tableColumn, int columnIndex, AbstractTemplatePreferencePage.TemplateViewerComparator viewerComparator, TableViewer tableViewer)
Description copied from class:AbstractTemplatePreferencePage
Returns new SelectionAdapter for tableColumn with given parameters- Overrides:
getTemplateColumnSelectionAdapter
in classAbstractTemplatePreferencePage
- Parameters:
tableColumn
- The tableColumn for this adapter, cannot benull
columnIndex
- The index of the columnviewerComparator
- The viewerComparator for this SelectiionAdapter, cannot benull
tableViewer
- The tableViewer of table, cannot benull
- Returns:
- The newly created SelectionAdapter, cannot be
null
-
adjustPatternPreview
protected void adjustPatternPreview(org.eclipse.swt.custom.StyledText patternPreview, ITemplate template)
Description copied from class:AbstractTemplatePreferencePage
Adjusts the preview of the pattern text field with given template- Overrides:
adjustPatternPreview
in classAbstractTemplatePreferencePage
- Parameters:
patternPreview
- The pattern preview text field to adjust, cannot benull
template
- The template to adjust to, can benull
-
handleExport
protected void handleExport()
Description copied from class:AbstractTemplatePreferencePage
Handle export button selection. Exports templates from file.- Overrides:
handleExport
in classAbstractTemplatePreferencePage
-
getScriptVariant
protected ScriptVariant getScriptVariant()
Gets actualScriptVariant
for choosing language Russian or English for editing template- Returns:
- actual
ScriptVariant
, can benull
if context project cannot be got
-
-