01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.examples.templateeditor.preferences;
11:
12: import org.eclipse.ui.IWorkbenchPreferencePage;
13: import org.eclipse.ui.examples.templateeditor.editors.TemplateEditorUI;
14: import org.eclipse.ui.texteditor.templates.TemplatePreferencePage;
15:
16: /**
17: * @see org.eclipse.jface.preference.PreferencePage
18: */
19: public class TemplatesPreferencePage extends TemplatePreferencePage
20: implements IWorkbenchPreferencePage {
21:
22: public TemplatesPreferencePage() {
23: setPreferenceStore(TemplateEditorUI.getDefault()
24: .getPreferenceStore());
25: setTemplateStore(TemplateEditorUI.getDefault()
26: .getTemplateStore());
27: setContextTypeRegistry(TemplateEditorUI.getDefault()
28: .getContextTypeRegistry());
29: }
30:
31: protected boolean isShowFormatterSetting() {
32: return false;
33: }
34:
35: public boolean performOk() {
36: boolean ok = super.performOk();
37:
38: TemplateEditorUI.getDefault().savePluginPreferences();
39:
40: return ok;
41: }
42: }
|