1 /*******************************************************************************
2  * Copyright (c) 2000, 2008 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.ui.examples.templateeditor.preferences;
15 
16 import org.eclipse.ui.examples.templateeditor.editors.TemplateEditorUI;
17 
18 import org.eclipse.ui.texteditor.templates.TemplatePreferencePage;
19 
20 
21 /**
22  * @see org.eclipse.jface.preference.PreferencePage
23  */
24 public class TemplatesPreferencePage extends TemplatePreferencePage {
25 
TemplatesPreferencePage()26 	public TemplatesPreferencePage() {
27 		setPreferenceStore(TemplateEditorUI.getDefault().getPreferenceStore());
28 		setTemplateStore(TemplateEditorUI.getDefault().getTemplateStore());
29 		setContextTypeRegistry(TemplateEditorUI.getDefault().getContextTypeRegistry());
30 	}
31 
32 	@Override
isShowFormatterSetting()33 	protected boolean isShowFormatterSetting() {
34 		return false;
35 	}
36 
37 
38 	@Override
performOk()39 	public boolean performOk() {
40 		boolean ok= super.performOk();
41 
42 		TemplateEditorUI.getDefault().savePluginPreferences();
43 
44 		return ok;
45 	}
46 }
47