750be81ee909a7c2842c906bbe17c0fc21d509fe
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / PHPOutlinePreferencePage.java
1 /**********************************************************************
2 Copyright (c) 2000, 2002 IBM Corp. and others.
3 All rights reserved. This program and the accompanying materials
4 are made available under the terms of the Common Public License v1.0
5 which accompanies this distribution, and is available at
6 http://www.eclipse.org/legal/cpl-v10.html
7
8 Contributors:
9     IBM Corporation - Initial implementation
10     Klaus Hartlage - www.eclipseproject.de
11 **********************************************************************/
12 package net.sourceforge.phpeclipse;
13
14 import org.eclipse.jface.preference.BooleanFieldEditor;
15 import org.eclipse.jface.preference.FieldEditorPreferencePage;
16 import org.eclipse.jface.preference.IPreferenceStore;
17 import org.eclipse.ui.IWorkbench;
18 import org.eclipse.ui.IWorkbenchPreferencePage;
19
20 /**
21  * 
22  * @author khartlage
23  */
24 public class PHPOutlinePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
25
26   public PHPOutlinePreferencePage() {
27     super(FieldEditorPreferencePage.GRID);
28     //Initialize the preference store we wish to use
29     setPreferenceStore(PHPeclipsePlugin.getDefault().getPreferenceStore());
30   }
31
32   protected void createFieldEditors() {
33     final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
34
35     BooleanFieldEditor outlineShowClass =
36       new BooleanFieldEditor(PHPeclipsePlugin.PHP_OUTLINE_CLASS, "Show classes in outline", getFieldEditorParent());
37     BooleanFieldEditor outlineShowFunc =
38       new BooleanFieldEditor(PHPeclipsePlugin.PHP_OUTLINE_FUNC, "Show functions in outline", getFieldEditorParent());
39     BooleanFieldEditor outlineShowVar =
40       new BooleanFieldEditor(PHPeclipsePlugin.PHP_OUTLINE_VAR, "Show variables in outline", getFieldEditorParent());
41
42     addField(outlineShowClass);
43     addField(outlineShowFunc);
44     addField(outlineShowVar);
45   }
46
47   /**
48    * @see IWorkbenchPreferencePage#init
49    */
50   public void init(IWorkbench workbench) {
51   }
52
53 }