1 package net.sourceforge.phpeclipse.wiki.preferences;
3 import net.sourceforge.phpeclipse.wiki.editor.WikiEditorPlugin;
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.jface.preference.StringFieldEditor;
9 import org.eclipse.swt.widgets.Composite;
10 import org.eclipse.ui.IWorkbench;
11 import org.eclipse.ui.IWorkbenchPreferencePage;
15 * This page will be added to the project's property page dialog when the "Properties..." popup menu item is selected
17 public class WikiProjectPreferences extends FieldEditorOverlayPage implements IWorkbenchPreferencePage {
19 public final static String PREF_ID = "net.sourceforge.phpeclipse.wiki.preferences.WikiProjectPreferences";
21 public WikiProjectPreferences() {
28 * @see net.sourceforge.phpeclipse.wiki.preferences.FieldEditorOverlayPage#getPageId()
30 protected String getPageId() {
34 protected void createFieldEditors() {
35 Composite composite = getFieldEditorParent();
37 addField(new DirectoryFieldEditor(WikiEditorPlugin.HTML_OUTPUT_PATH, Messages.getString("WikiProjectPreferences.StaticWikiFolder"), composite));
38 addField(new DirectoryFieldEditor(WikiEditorPlugin.WIKI_TEXTS_BASE_PATH, Messages.getString("WikiProjectPreferences.WikiTextsFolder"), composite));
39 addField(new FileFieldEditor(WikiEditorPlugin.LOCAL_TEMPLATE_FILE_NAME, Messages.getString("WikiProjectPreferences.LocalTemplateFile"), composite));
40 addField(new StringFieldEditor(WikiEditorPlugin.LOCAL_CSS_URL, Messages.getString("WikiProjectPreferences.LocalCssUrl"), composite));
41 addField(new FileFieldEditor(WikiEditorPlugin.EXPORT_TEMPLATE_FILE_NAME, Messages.getString("WikiProjectPreferences.ExportTemplateFile"), composite));
42 addField(new StringFieldEditor(WikiEditorPlugin.EXPORT_CSS_URL, Messages.getString("WikiProjectPreferences.ExportCssUrl"), composite));
48 * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
50 protected IPreferenceStore doGetPreferenceStore() {
51 return WikiEditorPlugin.getDefault().getPreferenceStore();
57 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
59 public void init(IWorkbench workbench) {
60 setDescription("Default entries static wiki pages.");