Updated .cvsignore to be more minimalist, and only excludes the bin dir
[phpeclipse.git] / net.sourceforge.phpeclipse.phphelp / src / net / sourceforge / phpdt / phphelp / PHPHelpPreferencePage.java
index 2b5f3c1..7eba32e 100644 (file)
@@ -1,9 +1,7 @@
 package net.sourceforge.phpdt.phphelp;
 
 import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.DirectoryFieldEditor;
 import org.eclipse.jface.preference.FileFieldEditor;
-import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.jface.preference.StringFieldEditor;
 import org.eclipse.swt.SWT;
@@ -11,86 +9,85 @@ import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
 
-public class PHPHelpPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+public class PHPHelpPreferencePage extends PreferencePage implements
+               IWorkbenchPreferencePage {
 
+       FileFieldEditor phpCHMHelpFile;
 
-  FileFieldEditor phpCHMHelpFile;
-  BooleanFieldEditor phpCHMHelpEnabled;
-  StringFieldEditor phpCHMHelpCommand;
+       BooleanFieldEditor phpCHMHelpEnabled;
 
-  public PHPHelpPreferencePage() {
-    super();
-    setPreferenceStore(PHPHelpPlugin.getDefault().getPreferenceStore());
-    setDescription("PHP Help Settings (WIN_32 only)"); //$NON-NLS-1$
-  }
-  
-  public void init(IWorkbench workbench) {
-  }
-  
-  protected void performDefaults() {
-    phpCHMHelpFile.loadDefault();
-    phpCHMHelpEnabled.loadDefault();
-    phpCHMHelpCommand.loadDefault();
-    super.performDefaults();
-  }
+       StringFieldEditor phpCHMHelpCommand;
 
-  public boolean performOk() {
-    phpCHMHelpFile.store();
-    phpCHMHelpEnabled.store();
-    phpCHMHelpCommand.store();
-    return super.performOk();
-  }
+       public PHPHelpPreferencePage() {
+               super();
+               setPreferenceStore(PHPHelpPlugin.getDefault().getPreferenceStore());
+               setDescription(PHPHelpPreferenceMessages
+                               .getString("PHPHelpPreferencePage.PHPHelpSettings")); //$NON-NLS-1$
+       }
 
-  protected Control createContents(Composite parent) {
-    initializeDialogUnits(parent);
-    final IPreferenceStore store = PHPHelpPlugin.getDefault().getPreferenceStore();
-    Composite composite = new Composite(parent, SWT.LEFT);
-    composite.setLayout(new GridLayout());
-    composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-    
-//    Composite helpSettingsComposite = new Composite(composite, SWT.NONE);
-//    helpSettingsComposite.setLayout(new GridLayout());
-//    helpSettingsComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-//    Group helpSettingsGroup = new Group(helpSettingsComposite, SWT.NONE);
-//    helpSettingsGroup.setText("Windows CHM settings");
-//    helpSettingsGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-//    helpSettingsGroup.setLayout(new GridLayout());
+       public void init(IWorkbench workbench) {
+       }
 
-    phpCHMHelpEnabled =
-      new BooleanFieldEditor(
-        PHPHelpPlugin.PHP_CHM_ENABLED,
-        "Show Help in *.chm format?",
-    composite);
-    phpCHMHelpEnabled.setPreferencePage(this);
-    phpCHMHelpEnabled.setPreferenceStore(getPreferenceStore());
-    phpCHMHelpEnabled.load();
-    
-    new Label(composite, SWT.NONE);
-    phpCHMHelpFile =
-      new FileFieldEditor(
-    PHPHelpPlugin.PHP_CHM_FILE,"PHP *.chm file:",
-    composite);
-    phpCHMHelpFile.setPreferencePage(this);
-    phpCHMHelpFile.setPreferenceStore(getPreferenceStore());
-    phpCHMHelpFile.load();
-    
-    new Label(composite, SWT.NONE);
-    phpCHMHelpCommand =
-      new StringFieldEditor(
-        PHPHelpPlugin.PHP_CHM_COMMAND,
-        "PHP Help command:",
-    composite);
-    phpCHMHelpCommand.setPreferencePage(this);
-    phpCHMHelpCommand.setPreferenceStore(getPreferenceStore());
-    phpCHMHelpCommand.load();
+       protected void performDefaults() {
+               phpCHMHelpFile.loadDefault();
+               phpCHMHelpEnabled.loadDefault();
+               phpCHMHelpCommand.loadDefault();
+               super.performDefaults();
+       }
 
-    
-    return composite;
-  }
+       public boolean performOk() {
+               phpCHMHelpFile.store();
+               phpCHMHelpEnabled.store();
+               phpCHMHelpCommand.store();
+               return super.performOk();
+       }
+
+       protected Control createContents(Composite parent) {
+               initializeDialogUnits(parent);
+               Composite composite = new Composite(parent, SWT.LEFT);
+               composite.setLayout(new GridLayout());
+               composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+               // Composite helpSettingsComposite = new Composite(composite, SWT.NONE);
+               // helpSettingsComposite.setLayout(new GridLayout());
+               // helpSettingsComposite.setLayoutData(new
+               // GridData(GridData.FILL_HORIZONTAL));
+               // Group helpSettingsGroup = new Group(helpSettingsComposite, SWT.NONE);
+               // helpSettingsGroup.setText("Windows CHM settings");
+               // helpSettingsGroup.setLayoutData(new
+               // GridData(GridData.FILL_HORIZONTAL));
+               // helpSettingsGroup.setLayout(new GridLayout());
+
+               phpCHMHelpEnabled = new BooleanFieldEditor(
+                               PHPHelpPlugin.PHP_CHM_ENABLED, PHPHelpPreferenceMessages
+                                               .getString("PHPHelpPreferencePage.PHPHelp.format"), //$NON-NLS-1$
+                               composite);
+               phpCHMHelpEnabled.setPage(this);
+               phpCHMHelpEnabled.setPreferenceStore(getPreferenceStore());
+               phpCHMHelpEnabled.load();
+
+               new Label(composite, SWT.NONE);
+               phpCHMHelpFile = new FileFieldEditor(PHPHelpPlugin.PHP_CHM_FILE,
+                               PHPHelpPreferenceMessages
+                                               .getString("PHPHelpPreferencePage.PHPHelp.chm.file"), //$NON-NLS-1$
+                               composite);
+               phpCHMHelpFile.setPage(this);
+               phpCHMHelpFile.setPreferenceStore(getPreferenceStore());
+               phpCHMHelpFile.load();
+
+               new Label(composite, SWT.NONE);
+               phpCHMHelpCommand = new StringFieldEditor(
+                               PHPHelpPlugin.PHP_CHM_COMMAND, PHPHelpPreferenceMessages
+                                               .getString("PHPHelpPreferencePage.PHPHelp.command"), //$NON-NLS-1$
+                               composite);
+               phpCHMHelpCommand.setPage(this);
+               phpCHMHelpCommand.setPreferenceStore(getPreferenceStore());
+               phpCHMHelpCommand.load();
+
+               return composite;
+       }
 }