org.eclipse.datatools.sqltools.sqleditor.internal.templates.dialog
Class EditTemplateDialog

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by org.eclipse.jface.dialogs.TrayDialog
              extended by org.eclipse.jface.dialogs.StatusDialog
                  extended by org.eclipse.datatools.sqltools.sqleditor.internal.templates.dialog.EditTemplateDialog
All Implemented Interfaces:
org.eclipse.help.IContextProvider, org.eclipse.jface.window.IShellProvider

public class EditTemplateDialog
extends org.eclipse.jface.dialogs.StatusDialog
implements org.eclipse.help.IContextProvider

Dialog to edit a template. Clients will usually instantiate, but may also may extend. This is just a copy of org.eclipse.ui.texteditor.templates.EditTemplateDialog to make it visible.

Author:
Hui Cao

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
 
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, 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, ELLIPSIS
 
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK
 
Fields inherited from interface org.eclipse.help.IContextProvider
NONE, SELECTION
 
Constructor Summary
EditTemplateDialog(org.eclipse.swt.widgets.Shell parent, org.eclipse.jface.text.templates.Template template, boolean edit, boolean isNameModifiable, org.eclipse.jface.text.templates.ContextTypeRegistry registry)
          Creates a new dialog.
 
Method Summary
 void create()
           
 org.eclipse.help.IContext getContext(java.lang.Object target)
           
 int getContextChangeMask()
           
 java.lang.String getSearchExpression(java.lang.Object target)
           
 
Methods inherited from class org.eclipse.jface.dialogs.StatusDialog
getStatus, setImage, setStatusLineAboveButtons, setTitle
 
Methods inherited from class org.eclipse.jface.dialogs.TrayDialog
close, closeTray, getTray, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getBlockedHandler, getImage, setBlockedHandler, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
getDefaultImage, getDefaultImages, getDefaultOrientation, getReturnCode, getShell, getWindowManager, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setWindowManager
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditTemplateDialog

public EditTemplateDialog(org.eclipse.swt.widgets.Shell parent,
                          org.eclipse.jface.text.templates.Template template,
                          boolean edit,
                          boolean isNameModifiable,
                          org.eclipse.jface.text.templates.ContextTypeRegistry registry)
Creates a new dialog.

Parameters:
parent - the shell parent of the dialog
template - the template to edit
edit - whether this is a new template or an existing being edited
isNameModifiable - whether the name of the template may be modified
registry - the context type registry to use
Method Detail

getContext

public org.eclipse.help.IContext getContext(java.lang.Object target)
Specified by:
getContext in interface org.eclipse.help.IContextProvider

getContextChangeMask

public int getContextChangeMask()
Specified by:
getContextChangeMask in interface org.eclipse.help.IContextProvider

getSearchExpression

public java.lang.String getSearchExpression(java.lang.Object target)
Specified by:
getSearchExpression in interface org.eclipse.help.IContextProvider

create

public void create()
Overrides:
create in class org.eclipse.jface.dialogs.StatusDialog