fd11f1be05c8707595f16de13efc726d12db3993
[phpeclipse.git] /
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.FileFieldEditor;
7 import org.eclipse.jface.preference.IPreferenceStore;
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     addField(new FileFieldEditor(WikiEditorPlugin.LOCAL_TEMPLATE_FILE_NAME, Messages.getString("WikiProjectPreferences.LocalTemplateFile"), composite));
39     addField(new FileFieldEditor(WikiEditorPlugin.EXPORT_TEMPLATE_FILE_NAME, Messages.getString("WikiProjectPreferences.ExportTemplateFile"), composite));  
40   
41     }
42
43   /*
44    * (non-Javadoc)
45    * 
46    * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
47    */
48   protected IPreferenceStore doGetPreferenceStore() {
49     return WikiEditorPlugin.getDefault().getPreferenceStore();
50   }
51
52   /*
53    * (non-Javadoc)
54    * 
55    * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
56    */
57   public void init(IWorkbench workbench) {
58     setDescription("Default entries static wiki pages.");
59   }
60 }