org.eclipse.datatools.sqltools.sqleditor.internal.templates
Class SQLContributionTemplateStore

java.lang.Object
  extended by org.eclipse.jface.text.templates.persistence.TemplateStore
      extended by org.eclipse.datatools.sqltools.sqleditor.internal.templates.SQLContributionTemplateStore

public class SQLContributionTemplateStore
extends org.eclipse.jface.text.templates.persistence.TemplateStore

Author:
lihuang

Constructor Summary
SQLContributionTemplateStore(org.eclipse.jface.text.templates.ContextTypeRegistry registry, org.eclipse.jface.preference.IPreferenceStore store, java.lang.String key)
          Creates a new template store with a context type registry.
SQLContributionTemplateStore(org.eclipse.jface.preference.IPreferenceStore store, java.lang.String key)
          Creates a new template store.
 
Method Summary
 SQLIntelligentTemplate getRegisteredIntelligentTemplate(java.lang.String templateID)
           
 void registerIntelligentTemplate(SQLTemplate template)
           
 
Methods inherited from class org.eclipse.jface.text.templates.persistence.TemplateStore
add, delete, findTemplate, findTemplate, findTemplateById, getTemplateData, getTemplateData, getTemplates, getTemplates, load, restoreDefaults, restoreDeleted, save, startListeningForPreferenceChanges, stopListeningForPreferenceChanges
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLContributionTemplateStore

public SQLContributionTemplateStore(org.eclipse.jface.preference.IPreferenceStore store,
                                    java.lang.String key)
Creates a new template store.

Parameters:
store - the preference store in which to store custom templates under key
key - the key into store where to store custom templates

SQLContributionTemplateStore

public SQLContributionTemplateStore(org.eclipse.jface.text.templates.ContextTypeRegistry registry,
                                    org.eclipse.jface.preference.IPreferenceStore store,
                                    java.lang.String key)
Creates a new template store with a context type registry. Only templates that specify a context type contained in the registry will be loaded by this store if the registry is not null.

Parameters:
registry - a context type registry, or null if all templates should be loaded
store - the preference store in which to store custom templates under key
key - the key into store where to store custom templates
Method Detail

registerIntelligentTemplate

public void registerIntelligentTemplate(SQLTemplate template)

getRegisteredIntelligentTemplate

public SQLIntelligentTemplate getRegisteredIntelligentTemplate(java.lang.String templateID)