protected static class TemplatePreferencePage.EditTemplateDialog extends StatusDialog
Window.IExceptionHandlerblockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSISCANCEL, OK, resizeHasOccurred| Constructor and Description |
|---|
TemplatePreferencePage.EditTemplateDialog(Shell parent,
Template template,
boolean edit,
boolean isNameModifiable,
ContextTypeRegistry registry)
Creates a new dialog.
|
| Modifier and Type | Method and Description |
|---|---|
void |
create()
Creates this window's widgetry in a new top-level shell.
|
protected Control |
createDialogArea(Composite ancestor)
Creates and returns the contents of the upper part of this dialog (above
the button bar).
|
protected SourceViewer |
createViewer(Composite parent)
Creates the viewer to be used to display the pattern.
|
protected IDialogSettings |
getDialogBoundsSettings()
Gets the dialog settings that should be used for remembering the bounds of
of the dialog, according to the dialog bounds strategy.
|
Template |
getTemplate()
Returns the created template.
|
protected IContentAssistProcessor |
getTemplateProcessor()
Returns the content assist processor that
suggests template variables.
|
protected boolean |
isResizable()
Returns a boolean indicating whether the dialog should be
considered resizable when the shell style is initially
set.
|
protected boolean |
isValidPattern(String pattern)
Validates the pattern.
|
protected void |
okPressed()
Notifies that the ok button of this dialog has been pressed.
|
configureShell, createButtonBar, createButtonsForButtonBar, getStatus, setImage, setStatusLineAboveButtons, setTitle, updateButtonsEnableState, updateStatuscloseTray, createHelpControl, getLayout, getTray, handleShellCloseEvent, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailableapplyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, createButton, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenTextcanHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManagerpublic TemplatePreferencePage.EditTemplateDialog(Shell parent, Template template, boolean edit, boolean isNameModifiable, ContextTypeRegistry registry)
parent - the shell parent of the dialogtemplate - the template to editedit - whether this is a new template or an existing being editedisNameModifiable - whether the name of the template may be modifiedregistry - the context type registry to useprotected boolean isResizable()
Dialogfalse, but also sets a style bit for a
SWT.RESIZE border, the style bit will be honored.isResizable in class Dialogpublic void create()
Window
The default implementation of this framework method creates this window's
shell (by calling createShell), and its controls (by
calling createContents), then initializes this window's
shell bounds (by calling initializeBounds).
create in class StatusDialogprotected Control createDialogArea(Composite ancestor)
Dialog
The Dialog implementation of this framework method creates
and returns a new Composite with standard margins and
spacing.
The returned control's layout data must be an instance of
GridData. This method must not modify the parent's
layout.
Subclasses must override this method but may call super as
in the following example:
Composite composite = (Composite) super.createDialogArea(parent); //add controls to composite as necessary return composite;
createDialogArea in class Dialogancestor - the parent composite to contain the dialog areaprotected SourceViewer createViewer(Composite parent)
parent - the parent composite of the viewerSourceViewerprotected boolean isValidPattern(String pattern)
The default implementation rejects invalid XML characters.
pattern - the pattern to verifytrue if the pattern is validprotected void okPressed()
Dialog
The Dialog implementation of this framework method sets
this dialog's return code to Window.OK and closes the
dialog. Subclasses may override.
public Template getTemplate()
protected IContentAssistProcessor getTemplateProcessor()
protected IDialogSettings getDialogBoundsSettings()
DialoggetDialogBoundsSettings in class Dialognull if the dialog's bounds should
never be stored.Dialog.getDialogBoundsStrategy()
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.