Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorteicher2004-03-19 10:49:08 +0000
committerteicher2004-03-19 10:49:08 +0000
commitfa2f7a70c657eb42555ba5521c90ec930b9543de (patch)
tree3d58baee80cdaba94b1a074f7579b48bdfd886d7 /org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/preferences
parentb85ebfebd841a945be7ffa33a718394da2f517b2 (diff)
downloadeclipse.platform.text-fa2f7a70c657eb42555ba5521c90ec930b9543de.tar.gz
eclipse.platform.text-fa2f7a70c657eb42555ba5521c90ec930b9543de.tar.xz
eclipse.platform.text-fa2f7a70c657eb42555ba5521c90ec930b9543de.zip
added template editor example to javaeditor example plug-in
Diffstat (limited to 'org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/preferences')
-rw-r--r--org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/preferences/TemplatesPreferencePage.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/preferences/TemplatesPreferencePage.java b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/preferences/TemplatesPreferencePage.java
new file mode 100644
index 000000000..7c30caa71
--- /dev/null
+++ b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/preferences/TemplatesPreferencePage.java
@@ -0,0 +1,32 @@
+package org.eclipse.ui.examples.templateeditor.preferences;
+
+import org.eclipse.jface.preference.PreferencePage;
+
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.examples.templateeditor.editors.TemplateEditorUI;
+import org.eclipse.ui.texteditor.templates.TemplatePreferencePage;
+
+/**
+ * @see PreferencePage
+ */
+public class TemplatesPreferencePage extends TemplatePreferencePage implements IWorkbenchPreferencePage {
+
+ public TemplatesPreferencePage() {
+ setPreferenceStore(TemplateEditorUI.getDefault().getPreferenceStore());
+ setTemplateStore(TemplateEditorUI.getDefault().getTemplateStore());
+ setContextTypeRegistry(TemplateEditorUI.getDefault().getContextTypeRegistry());
+ }
+
+ protected boolean isShowFormatterSetting() {
+ return false;
+ }
+
+
+ public boolean performOk() {
+ boolean ok= super.performOk();
+
+ TemplateEditorUI.getDefault().savePluginPreferences();
+
+ return ok;
+ }
+}

Back to the top