From af800f2f45db7192757ff6feba2a36518b353101 Mon Sep 17 00:00:00 2001 From: teicher Date: Wed, 28 Apr 2004 17:18:34 +0000 Subject: pr 60258: removed runtime dependencies of jface.text --- .../ui/examples/templateeditor/editors/TemplateEditorUI.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'org.eclipse.ui.examples.javaeditor/Template Editor Example/org') diff --git a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TemplateEditorUI.java b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TemplateEditorUI.java index 5752826da8e..dd22d4010e2 100644 --- a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TemplateEditorUI.java +++ b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TemplateEditorUI.java @@ -13,6 +13,8 @@ import org.eclipse.jface.resource.ImageRegistry; import org.eclipse.jface.text.templates.ContextTypeRegistry; import org.eclipse.jface.text.templates.persistence.TemplateStore; +import org.eclipse.ui.editors.text.templates.ContributionTemplateStore; +import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry; import org.eclipse.ui.examples.javaeditor.JavaEditorExamplePlugin; import org.eclipse.ui.examples.templateeditor.template.XMLContextType; @@ -29,7 +31,7 @@ public class TemplateEditorUI { /** The template store. */ private TemplateStore fStore; /** The context type registry. */ - private ContextTypeRegistry fRegistry; + private ContributionContextTypeRegistry fRegistry; private TemplateEditorUI() { } @@ -52,7 +54,7 @@ public class TemplateEditorUI { */ public TemplateStore getTemplateStore() { if (fStore == null) { - fStore= new TemplateStore(getContextTypeRegistry(), JavaEditorExamplePlugin.getDefault().getPreferenceStore(), CUSTOM_TEMPLATES_KEY); + fStore= new ContributionTemplateStore(getContextTypeRegistry(), JavaEditorExamplePlugin.getDefault().getPreferenceStore(), CUSTOM_TEMPLATES_KEY); try { fStore.load(); } catch (IOException e) { @@ -70,7 +72,7 @@ public class TemplateEditorUI { public ContextTypeRegistry getContextTypeRegistry() { if (fRegistry == null) { // create an configure the contexts available in the template editor - fRegistry= new ContextTypeRegistry(); + fRegistry= new ContributionContextTypeRegistry(); fRegistry.addContextType(XMLContextType.XML_CONTEXT_TYPE); } return fRegistry; -- cgit v1.2.3