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
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, templateStorageSnapshotFields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadjustPatternPreview(org.eclipse.swt.custom.StyledText patternPreview, ITemplate template) Adjusts the preview of the pattern text field with given templateprotected TemplateStorageManagerGetsTemplateStorageManagerfor this preference pagevoiddispose()protected ITemplatedoAdd()Creates new template and returns itprotected booleanEdits the given templateprotected ScriptVariantGets actualScriptVariantfor choosing language Russian or English for editing templateprotected org.eclipse.swt.events.SelectionAdaptergetTemplateColumnSelectionAdapter(org.eclipse.swt.widgets.TableColumn tableColumn, int columnIndex, AbstractTemplatePreferencePage.TemplateViewerComparator viewerComparator, TableViewer tableViewer) Returns new SelectionAdapter for tableColumn with given parametersprotected StringgetTemplateContextPresentation(ITemplateContext templateContext) Returns presentation of context of given templateContext.protected voidHandle export button selection.protected voidHandles import button selectionMethods 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, setNewTemplateStorageManagerMethods 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, updateApplyButtonMethods 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, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jface.dialogs.IDialogPage
createControl, getControl, getDescription, getErrorMessage, getImage, getMessage, getTitle, performHelp, setDescription, setImageDescriptor, setTitle, setVisibleMethods inherited from interface org.eclipse.jface.preference.IPreferencePage
computeSize, isValid, okToLeave, setContainer, setSize
-
Constructor Details
-
BslTemplatePreferencePage
public BslTemplatePreferencePage()
-
-
Method Details
-
dispose
public void dispose()- Specified by:
disposein interfaceorg.eclipse.jface.dialogs.IDialogPage- Overrides:
disposein classorg.eclipse.jface.dialogs.DialogPage
-
doEdit
Description copied from class:AbstractTemplatePreferencePageEdits the given template- Specified by:
doEditin classAbstractTemplatePreferencePage- Parameters:
template- The template to edit, cannot benull- Returns:
- Whether editing was completed
-
doAdd
Description copied from class:AbstractTemplatePreferencePageCreates new template and returns it- Specified by:
doAddin classAbstractTemplatePreferencePage- Returns:
- The newly created template, can be
nullwhen adding is canceled
-
createTemplateStorageManager
Description copied from class:AbstractTemplatePreferencePageGetsTemplateStorageManagerfor this preference page- Specified by:
createTemplateStorageManagerin classAbstractTemplatePreferencePage- Returns:
- The
TemplateStorageManageractual for this preferene page, cannot benull
-
getTemplateContextPresentation
Description copied from class:AbstractTemplatePreferencePageReturns presentation of context of given templateContext. It shall be human-readable description on which context this template supports- Specified by:
getTemplateContextPresentationin 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:AbstractTemplatePreferencePageHandles import button selection- Overrides:
handleImportin 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:AbstractTemplatePreferencePageReturns new SelectionAdapter for tableColumn with given parameters- Overrides:
getTemplateColumnSelectionAdapterin classAbstractTemplatePreferencePage- Parameters:
tableColumn- The tableColumn for this adapter, cannot benullcolumnIndex- The index of the columnviewerComparator- The viewerComparator for this SelectiionAdapter, cannot benulltableViewer- 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:AbstractTemplatePreferencePageAdjusts the preview of the pattern text field with given template- Overrides:
adjustPatternPreviewin classAbstractTemplatePreferencePage- Parameters:
patternPreview- The pattern preview text field to adjust, cannot benulltemplate- The template to adjust to, can benull
-
handleExport
protected void handleExport()Description copied from class:AbstractTemplatePreferencePageHandle export button selection. Exports templates from file.- Overrides:
handleExportin classAbstractTemplatePreferencePage
-
getScriptVariant
Gets actualScriptVariantfor choosing language Russian or English for editing template- Returns:
- actual
ScriptVariant, can benullif context project cannot be got
-