integrated velocity engine for URL templates
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.wiki / src / net / sourceforge / phpeclipse / wiki / preferences / WikiProjectPreferences.java
1 package net.sourceforge.phpeclipse.wiki.preferences;
2
3 import net.sourceforge.phpeclipse.wiki.editor.WikiEditorPlugin;
4
5 import org.eclipse.jface.preference.DirectoryFieldEditor;
6 import org.eclipse.jface.preference.IPreferenceStore;
7 import org.eclipse.jface.preference.PathEditor;
8 import org.eclipse.swt.widgets.Composite;
9 import org.eclipse.ui.IWorkbench;
10 import org.eclipse.ui.IWorkbenchPreferencePage;
11
12 /**
13  * 
14  * This page will be added to the project's property page dialog when the "Properties..." popup menu item is selected
15  */
16 public class WikiProjectPreferences extends FieldEditorOverlayPage implements IWorkbenchPreferencePage {
17
18   public final static String PREF_ID = "net.sourceforge.phpeclipse.wiki.preferences.WikiProjectPreferences";
19
20   public WikiProjectPreferences() {
21     super(GRID);
22   }
23
24   /*
25    * (non-Javadoc)
26    * 
27    * @see net.sourceforge.phpeclipse.wiki.preferences.FieldEditorOverlayPage#getPageId()
28    */
29   protected String getPageId() {
30     return PREF_ID;
31   }
32
33   protected void createFieldEditors() {
34     Composite composite = getFieldEditorParent();
35
36     addField(new DirectoryFieldEditor(WikiEditorPlugin.HTML_OUTPUT_PATH, Messages.getString("WikiProjectPreferences.StaticWikiFolder"), composite));
37     addField(new DirectoryFieldEditor(WikiEditorPlugin.WIKI_TEXTS_BASE_PATH, Messages.getString("WikiProjectPreferences.WikiTextsFolder"), composite));
38   }
39
40   /*
41    * (non-Javadoc)
42    * 
43    * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
44    */
45   protected IPreferenceStore doGetPreferenceStore() {
46     return WikiEditorPlugin.getDefault().getPreferenceStore();
47   }
48
49   /*
50    * (non-Javadoc)
51    * 
52    * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
53    */
54   public void init(IWorkbench workbench) {
55     setDescription("Default entries static wiki pages.");
56   }
57 }