Merged xdebug from 1.3.x
[phpeclipse.git] / net.sourceforge.phpeclipse.phphelp / src / net / sourceforge / phpdt / phphelp / PHPHelpPreferencePage.java
index 6f0475e..7eba32e 100644 (file)
@@ -2,7 +2,6 @@ package net.sourceforge.phpdt.phphelp;
 
 import org.eclipse.jface.preference.BooleanFieldEditor;
 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;
@@ -14,82 +13,81 @@ 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;
-  BooleanFieldEditor phpCHMHelpEnabled;
-  StringFieldEditor phpCHMHelpCommand;
+       FileFieldEditor phpCHMHelpFile;
 
-  public PHPHelpPreferencePage() {
-    super();
-    setPreferenceStore(PHPHelpPlugin.getDefault().getPreferenceStore());
-    setDescription("PHP Help Settings (WIN_32 only)"); //$NON-NLS-1$
-  }
+       BooleanFieldEditor phpCHMHelpEnabled;
 
-  public void init(IWorkbench workbench) {
-  }
+       StringFieldEditor phpCHMHelpCommand;
 
-  protected void performDefaults() {
-    phpCHMHelpFile.loadDefault();
-    phpCHMHelpEnabled.loadDefault();
-    phpCHMHelpCommand.loadDefault();
-    super.performDefaults();
-  }
+       public PHPHelpPreferencePage() {
+               super();
+               setPreferenceStore(PHPHelpPlugin.getDefault().getPreferenceStore());
+               setDescription(PHPHelpPreferenceMessages
+                               .getString("PHPHelpPreferencePage.PHPHelpSettings")); //$NON-NLS-1$
+       }
 
-  public boolean performOk() {
-    phpCHMHelpFile.store();
-    phpCHMHelpEnabled.store();
-    phpCHMHelpCommand.store();
-    return super.performOk();
-  }
+       public void init(IWorkbench workbench) {
+       }
 
-  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));
+       protected void performDefaults() {
+               phpCHMHelpFile.loadDefault();
+               phpCHMHelpEnabled.loadDefault();
+               phpCHMHelpCommand.loadDefault();
+               super.performDefaults();
+       }
 
-    //    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 boolean performOk() {
+               phpCHMHelpFile.store();
+               phpCHMHelpEnabled.store();
+               phpCHMHelpCommand.store();
+               return super.performOk();
+       }
 
-    phpCHMHelpEnabled =
-      new BooleanFieldEditor(
-        PHPHelpPlugin.PHP_CHM_ENABLED,
-        "Show Help in *.chm format?",
-        composite);
-    phpCHMHelpEnabled.setPreferencePage(this);
-    phpCHMHelpEnabled.setPreferenceStore(getPreferenceStore());
-    phpCHMHelpEnabled.load();
+       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));
 
-    new Label(composite, SWT.NONE);
-    phpCHMHelpFile =
-      new FileFieldEditor(
-        PHPHelpPlugin.PHP_CHM_FILE,
-        "PHP *.chm file:",
-        composite);
-    phpCHMHelpFile.setPreferencePage(this);
-    phpCHMHelpFile.setPreferenceStore(getPreferenceStore());
-    phpCHMHelpFile.load();
+               // 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());
 
-    new Label(composite, SWT.NONE);
-    phpCHMHelpCommand =
-      new StringFieldEditor(
-        PHPHelpPlugin.PHP_CHM_COMMAND,
-        "PHP Help command:",
-        composite);
-    phpCHMHelpCommand.setPreferencePage(this);
-    phpCHMHelpCommand.setPreferenceStore(getPreferenceStore());
-    phpCHMHelpCommand.load();
+               phpCHMHelpEnabled = new BooleanFieldEditor(
+                               PHPHelpPlugin.PHP_CHM_ENABLED, PHPHelpPreferenceMessages
+                                               .getString("PHPHelpPreferencePage.PHPHelp.format"), //$NON-NLS-1$
+                               composite);
+               phpCHMHelpEnabled.setPage(this);
+               phpCHMHelpEnabled.setPreferenceStore(getPreferenceStore());
+               phpCHMHelpEnabled.load();
 
-    return composite;
-  }
+               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;
+       }
 }