Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.editors.text.templates
Class ContributionTemplateStore


java.lang.Object
  extended by 

org.eclipse.jface.text.templates.persistence.TemplateStore
      extended by 
org.eclipse.ui.editors.text.templates.ContributionTemplateStore

public class ContributionTemplateStore
extends TemplateStore

Manages templates. Handles reading default templates contributed via XML and user-defined (or overridden) templates stored in the preferences.

Clients may instantiate but not subclass this class.

Since:
3.0
Restriction:
This class is not intended to be subclassed by clients.

Constructor Summary
ContributionTemplateStore ( ContextTypeRegistry registry, IPreferenceStore store, String key)
          Creates a new template store with a context type registry.
ContributionTemplateStore ( IPreferenceStore store, String key)
          Creates a new template store.
 
Method Summary
protected  void handleException ( IOException x)
          Handles an IOException thrown during reloading the preferences due to a preference store update.
protected  void loadContributedTemplates ()
          Loads the templates contributed via the templates extension point.
 
Methods inherited from class org.eclipse.jface.text.templates.persistence. TemplateStore
add, delete, findTemplate, findTemplate, findTemplateById, getRegistry, getTemplateData, getTemplateData, getTemplates, getTemplates, internalAdd, load, restoreDefaults, restoreDefaults, restoreDeleted, save, startListeningForPreferenceChanges, stopListeningForPreferenceChanges
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContributionTemplateStore

public ContributionTemplateStore(
IPreferenceStore store,
                                 
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

ContributionTemplateStore

public ContributionTemplateStore(
ContextTypeRegistry registry,
                                 
IPreferenceStore store,
                                 
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

loadContributedTemplates

protected void loadContributedTemplates()
                                 throws 
IOException
Loads the templates contributed via the templates extension point.

Overrides:
loadContributedTemplates in class TemplateStore
Throws:
IOException - if loading fails

handleException

protected void handleException(
IOException x)
Description copied from class: TemplateStore
Handles an IOException thrown during reloading the preferences due to a preference store update. The default is to write to stderr.

Overrides:
handleException in class TemplateStore
Parameters:
x - the exception

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire