KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > editors > text > LanguageEditorPreferencePage


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.ui.internal.editors.text;
13
14
15 import org.eclipse.swt.SWT;
16 import org.eclipse.swt.widgets.Composite;
17 import org.eclipse.swt.widgets.Control;
18
19 import org.eclipse.jface.preference.PreferencePage;
20
21 import org.eclipse.ui.editors.text.ITextEditorHelpContextIds;
22
23 import org.eclipse.ui.IWorkbench;
24 import org.eclipse.ui.IWorkbenchPreferencePage;
25 import org.eclipse.ui.PlatformUI;
26
27
28
29
30 /**
31  * The preference page for setting the editor options.
32  * <p>
33  * This class is internal and not intended to be used by clients.</p>
34  *
35  * @since 3.1
36  */

37 public class LanguageEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
38
39
40
41
42     public LanguageEditorPreferencePage() {
43         setDescription("Configure the preferences for individual languages on their respective page."); //$NON-NLS-1$
44
setPreferenceStore(EditorsPlugin.getDefault().getPreferenceStore());
45     }
46
47     /*
48      * @see IWorkbenchPreferencePage#init()
49      */

50     public void init(IWorkbench workbench) {
51     }
52
53     /*
54      * @see PreferencePage#createControl(Composite)
55      */

56     public void createControl(Composite parent) {
57         super.createControl(parent);
58         PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ITextEditorHelpContextIds.TEXT_EDITOR_PREFERENCE_PAGE);
59     }
60
61     /*
62      * @see PreferencePage#createContents(Composite)
63      */

64     protected Control createContents(Composite parent) {
65         Composite composite= new Composite(parent, SWT.NONE);
66
67         return composite;
68     }
69
70     /*
71      * @see PreferencePage#performOk()
72      */

73     public boolean performOk() {
74         return true;
75     }
76 }
77
Popular Tags