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;
StringFieldEditor localHostSFE;
DirectoryFieldEditor documentRootDFE;
+ BooleanFieldEditor showExternalPreviewBFE;
BooleanFieldEditor externalBrowserBFE;
StringFieldEditor externalBrowserSFE;
StringFieldEditor apacheStartSFE;
StringFieldEditor apacheRestartSFE;
StringFieldEditor mySQLCommandSFE;
RadioGroupFieldEditor chooseParser;
+ StringFieldEditor externalParserSFE;
BooleanFieldEditor parseOnSave;
public PHPEclipseBasePreferencePage() {
protected void performDefaults() {
localHostSFE.loadDefault();
documentRootDFE.loadDefault();
+ showExternalPreviewBFE.loadDefault();
externalBrowserBFE.loadDefault();
externalBrowserSFE.loadDefault();
apacheStartSFE.loadDefault();
apacheRestartSFE.loadDefault();
mySQLCommandSFE.loadDefault();
chooseParser.loadDefault();
+ externalParserSFE.loadDefault();
parseOnSave.loadDefault();
super.performDefaults();
}
public boolean performOk() {
localHostSFE.store();
documentRootDFE.store();
+ showExternalPreviewBFE.store();
externalBrowserBFE.store();
externalBrowserSFE.store();
apacheStartSFE.store();
apacheRestartSFE.store();
mySQLCommandSFE.store();
chooseParser.store();
+ externalParserSFE.store();
parseOnSave.store();
return super.performOk();
}
documentRootDFE.setPreferencePage(this);
documentRootDFE.setPreferenceStore(getPreferenceStore());
documentRootDFE.load();
+
+ new Label(webSettingsGroup, SWT.NONE);
+ showExternalPreviewBFE =
+ new BooleanFieldEditor(
+ IPreferenceConstants.SHOW_EXTERNAL_PREVIEW_PREF,
+ PHPPreferencesMessages.getString("PHPBasePreferencePage.websettingsGroup.showexternalpreview"),
+ webSettingsGroup);
+ showExternalPreviewBFE.setPreferencePage(this);
+ showExternalPreviewBFE.setPreferenceStore(getPreferenceStore());
+ showExternalPreviewBFE.load();
+ new Label(webSettingsGroup, SWT.NONE);
externalBrowserBFE =
new BooleanFieldEditor(
IPreferenceConstants.USE_EXTERNAL_BROWSER_PREF,
externalBrowserBFE.setPreferencePage(this);
externalBrowserBFE.setPreferenceStore(getPreferenceStore());
externalBrowserBFE.load();
+ new Label(webSettingsGroup, SWT.NONE);
externalBrowserSFE =
new StringFieldEditor(
IPreferenceConstants.EXTERNAL_BROWSER_PREF,
chooseParser.setPreferencePage(this);
chooseParser.setPreferenceStore(getPreferenceStore());
chooseParser.load();
- parseOnSave = new BooleanFieldEditor(PHPeclipsePlugin.PHP_PARSE_ON_SAVE, "&Parse automatically on save", parserSettingsGroup);
+ //create a copmposte just for the StringEditor - makes layout simpler
+ Composite externalParserCompo = new Composite(parserSettingsGroup, SWT.NONE);
+ externalParserSFE =
+ new StringFieldEditor(
+ IPreferenceConstants.EXTERNAL_PARSER_PREF,
+ PHPPreferencesMessages.getString("PHPBasePreferencePage.parsers.extcommand"),
+ externalParserCompo
+ /*parserSettingsGroup*/
+ );
+ externalParserSFE.setPreferencePage(this);
+ externalParserSFE.setPreferenceStore(getPreferenceStore());
+ externalParserSFE.load();
+
+ parseOnSave =
+ new BooleanFieldEditor(
+ PHPeclipsePlugin.PHP_PARSE_ON_SAVE,
+ PHPPreferencesMessages.getString("PHPBasePreferencePage.parsers.pos"),
+ parserSettingsGroup);
parseOnSave.setPreferencePage(this);
parseOnSave.setPreferenceStore(getPreferenceStore());
parseOnSave.load();