public TemplateStore getTemplateStore() { if (fTemplateStore == null) { fTemplateStore = new ContributionTemplateStore( getContextTypeRegistry(), getPreferenceStore(), "templates"); // $NON-NLS-1$ try { fTemplateStore.load(); } catch (IOException e) { SpecfileLog.logError(e); } } return fTemplateStore; }
public TemplateStore getTemplateStore() { // this is to avoid recursive call when fContextTypeRegistry is null getContextTypeRegistry(); if (fStore == null) { fStore = new ErlideContributionTemplateStore( getContextTypeRegistry(), getPreferenceStore(), CUSTOM_TEMPLATES_KEY); try { fStore.load(); } catch (final IOException e) { getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, "", e)); // $NON-NLS-1$ } ErlangSourceContextTypeModule.getDefault().addElementResolvers(); } return fStore; }