final IPropertyChangeListener updater= new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (TEMPLATES_KEY.equals(event.getProperty())) try { fTemplateStore.load(); } catch (IOException x) { log(x); } } }; store.addPropertyChangeListener(updater); fPreferenceListeners.add(updater);
	public TemplateStore getTemplateStore() {		if (fTemplateStore == null) {			final IPreferenceStore store= getPreferenceStore();			boolean alreadyMigrated= store.getBoolean(TEMPLATES_MIGRATION_KEY);			if (alreadyMigrated)				fTemplateStore= new ContributionTemplateStore(getTemplateContextRegistry(), store, TEMPLATES_KEY);			else {				fTemplateStore= new CompatibilityTemplateStore(getTemplateContextRegistry(), store, TEMPLATES_KEY, getOldTemplateStoreInstance());				store.setValue(TEMPLATES_MIGRATION_KEY, true);			}			try {				fTemplateStore.load();			} catch (IOException e) {				log(e);			}						final IPropertyChangeListener updater= new IPropertyChangeListener() {				public void propertyChange(PropertyChangeEvent event) {					if (TEMPLATES_KEY.equals(event.getProperty()))						try {							fTemplateStore.load();						} catch (IOException x) {							log(x);						}				}			};			store.addPropertyChangeListener(updater);			fPreferenceListeners.add(updater);		}				return fTemplateStore;	}