Bug 65284 [preferences][templates] importing template preferences does not update the template store
RC1 Importing preferences may change the custom (code) templates. However, the TemplateStore instance storing the templates for the Java editor does not update itself. Steps to reproduce: - import a preferences file with custom template for the file comment - create a new class -> the old file comment is used Solution is to create a IPropertyChangeListener in JavaPlugin and reload the (Code)TemplateStore upon a preference change.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPlugin.java
/**
	 * Returns the template store for the java editor templates.
	 * 
	 * @return the template store for the java editor templates
	 * @since 3.0
	 */
	public TemplateStore getTemplateStore() {
		if (fTemplateStore == null) {
			boolean alreadyMigrated= getPreferenceStore().getBoolean(TEMPLATES_MIGRATION_KEY);
			if (alreadyMigrated)
				fTemplateStore= new ContributionTemplateStore(getTemplateContextRegistry(), getPreferenceStore(), TEMPLATES_KEY);
			else {
				fTemplateStore= new CompatibilityTemplateStore(getTemplateContextRegistry(), getPreferenceStore(), TEMPLATES_KEY, getOldTemplateStoreInstance());
				getPreferenceStore().setValue(TEMPLATES_MIGRATION_KEY, true);
			}
			try {
				fTemplateStore.load();
			} catch (IOException e) {
				log(e);
			}
		}
		
		return fTemplateStore;
	}
	
	/**
	 * @deprecated Indirection added to avoid deprecated warning on file
	 */
	private org.eclipse.jdt.internal.corext.template.java.Templates getOldTemplateStoreInstance() {
		return org.eclipse.jdt.internal.corext.template.java.Templates.getInstance();