| org.eclipse.ui.texteditor.templates.TemplatePreferencePage
TemplatePreferencePage | abstract public class TemplatePreferencePage extends PreferencePage implements IWorkbenchPreferencePage(Code) | | A template preference page allows configuration of the templates for an
editor. It provides controls for adding, removing and changing templates as
well as enablement, default management and an optional formatter preference.
Subclasses need to provide a
TemplateStore and a
ContextTypeRegistry and should set the preference store. They may
optionally override
TemplatePreferencePage.isShowFormatterSetting() .
since: 3.0 |
Inner Class :protected static class EditTemplateDialog extends StatusDialog | |
TemplatePreferencePage | protected TemplatePreferencePage()(Code) | | Creates a new template preference page.
|
createContents | protected Control createContents(Composite ancestor)(Code) | | |
createTemplateEditDialog | protected Dialog createTemplateEditDialog(Template template, boolean edit, boolean isNameModifiable)(Code) | | Creates the edit dialog. Subclasses may override this method to provide a
custom dialog.
Parameters: template - the template being edited Parameters: edit - whether the dialog should be editable Parameters: isNameModifiable - whether the template name may be modified an EditTemplateDialog which will be opened.TemplatePreferencePage.editTemplate(Template,boolean,boolean) |
createViewer | protected SourceViewer createViewer(Composite parent)(Code) | | Creates, configures and returns a source viewer to present the template
pattern on the preference page. Clients may override to provide a custom
source viewer featuring e.g. syntax coloring.
Parameters: parent - the parent control a configured source viewer |
editTemplate | protected Template editTemplate(Template template, boolean edit, boolean isNameModifiable)(Code) | | Creates the edit dialog. Subclasses may override this method to provide a
custom dialog.
Parameters: template - the template being edited Parameters: edit - whether the dialog should be editable Parameters: isNameModifiable - whether the template name may be modified the created or modified template, or null if the edition failed since: 3.1 |
getContextTypeRegistry | public ContextTypeRegistry getContextTypeRegistry()(Code) | | Returns the context type registry.
the context type registry |
getFormatterPreferenceKey | protected String getFormatterPreferenceKey()(Code) | | Returns the key to use for the formatter preference.
the formatter preference key |
getTableViewer | protected TableViewer getTableViewer()(Code) | | |
getTemplateStore | public TemplateStore getTemplateStore()(Code) | | Returns the template store.
the template store |
getViewer | protected SourceViewer getViewer()(Code) | | |
isShowFormatterSetting | protected boolean isShowFormatterSetting()(Code) | | Returns whether the formatter preference checkbox should be shown.
true if the formatter preference checkbox shouldbe shown, false otherwise |
performCancel | public boolean performCancel()(Code) | | |
performDefaults | protected void performDefaults()(Code) | | |
performOk | public boolean performOk()(Code) | | |
setContextTypeRegistry | public void setContextTypeRegistry(ContextTypeRegistry registry)(Code) | | Sets the context type registry.
Parameters: registry - the new context type registry |
setTemplateStore | public void setTemplateStore(TemplateStore store)(Code) | | Sets the template store.
Parameters: store - the new template store |
setVisible | public void setVisible(boolean visible)(Code) | | |
updateButtons | protected void updateButtons()(Code) | | Updates the buttons.
|
updateViewerInput | protected void updateViewerInput()(Code) | | Updates the pattern viewer.
|
|
|