Examples of TemplateStore


Examples of org.eclipse.jface.text.templates.persistence.TemplateStore

   * @param project
   *            not used
   */
  public static void setCodeTemplate(String templateId, String pattern,
      IScriptProject project) {
    TemplateStore codeTemplateStore = PHPUiPlugin.getDefault()
        .getCodeTemplateStore();
    TemplatePersistenceData data = codeTemplateStore
        .getTemplateData(templateId);
    Template orig = data.getTemplate();
    Template copy = new Template(orig.getName(), orig.getDescription(),
        orig.getContextTypeId(), pattern, true);
    data.setTemplate(copy);
View Full Code Here

Examples of org.eclipse.jface.text.templates.persistence.TemplateStore

    if (project == null) {
      fProjectStore = null;
    } else {
      final ScopedPreferenceStore projectSettings = new ScopedPreferenceStore(
          new ProjectScope(project), SymfonyUiPlugin.PLUGIN_ID);
      fProjectStore = new TemplateStore(projectSettings, KEY) {
        /*
         * Make sure we keep the id of added code templates - add
         * removes it in the usual add() method
         */
        public void add(TemplatePersistenceData data) {
View Full Code Here

Examples of org.eclipse.jface.text.templates.persistence.TemplateStore

    return Activator.getDefault().getTemplateContextRegistry();
  }

  @Override
  protected Template[] getTemplates(String contextTypeId) {
    TemplateStore store = getTemplateStore();
    if (store != null) {
      return store.getTemplates(contextTypeId);
    }
    return null;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.