1 package net.sourceforge.phpdt.externaltools.preferences;
3 import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
4 // import net.sourceforge.phpeclipse.xdebug.core.XDebugCorePlugin;
6 import org.eclipse.jface.preference.FileFieldEditor;
7 import org.eclipse.jface.preference.IPreferenceStore;
8 import org.eclipse.jface.preference.PreferencePage;
9 import org.eclipse.swt.SWT;
10 import org.eclipse.swt.layout.GridData;
11 import org.eclipse.swt.layout.GridLayout;
12 import org.eclipse.swt.widgets.Composite;
13 import org.eclipse.swt.widgets.Control;
14 import org.eclipse.ui.IWorkbench;
15 import org.eclipse.ui.IWorkbenchPreferencePage;
17 public class XamppPrefencePage extends PreferencePage implements
18 IWorkbenchPreferencePage {
20 FileFieldEditor xamppStartSFE;
22 FileFieldEditor xamppStopSFE;
24 public XamppPrefencePage() {
27 if (ExternalToolsPlugin.getDefault () != null) {
28 setPreferenceStore (ExternalToolsPlugin.getDefault().getPreferenceStore());
32 protected Control createContents(Composite parent) {
33 initializeDialogUnits(parent);
34 Composite composite = new Composite(parent, SWT.LEFT);
35 composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
36 composite.setLayout(new GridLayout());
38 xamppStartSFE = new FileFieldEditor(
39 ExternalToolsPlugin.XAMPP_START_PREF,
40 PHPPreferencesMessages
41 .getString("PHPBasePreferencePage.apacheGroup.xampp_start"),
43 xamppStartSFE.setPage(this);
44 xamppStartSFE.setPreferenceStore(getPreferenceStore());
47 xamppStopSFE = new FileFieldEditor(
48 ExternalToolsPlugin.XAMPP_STOP_PREF,
49 PHPPreferencesMessages
50 .getString("PHPBasePreferencePage.apacheGroup.xampp_stop"),
52 xamppStopSFE.setPage(this);
53 xamppStopSFE.setPreferenceStore(getPreferenceStore());
58 public void init(IWorkbench workbench) {
61 protected void performDefaults() {
62 xamppStartSFE.loadDefault();
63 xamppStopSFE.loadDefault();
64 super.performDefaults();
67 public boolean performOk() {
68 xamppStartSFE.store();
70 return super.performOk();