1) Added missing strings for italic, underline and strike through.
[phpeclipse.git] / net.sourceforge.phpeclipse.externaltools / src / net / sourceforge / phpdt / externaltools / preferences / XamppPrefencePage.java
1 package net.sourceforge.phpdt.externaltools.preferences;
2
3 import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
4 // import net.sourceforge.phpeclipse.xdebug.core.XDebugCorePlugin;
5
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;
16
17 public class XamppPrefencePage extends PreferencePage implements
18                 IWorkbenchPreferencePage {
19
20         FileFieldEditor xamppStartSFE;
21
22         FileFieldEditor xamppStopSFE;
23
24         public XamppPrefencePage() {
25                 super();
26                 
27         if (ExternalToolsPlugin.getDefault () != null) {
28             setPreferenceStore (ExternalToolsPlugin.getDefault().getPreferenceStore());
29         }
30         }
31
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());
37
38                 xamppStartSFE = new FileFieldEditor(
39                                 ExternalToolsPlugin.XAMPP_START_PREF,
40                                 PHPPreferencesMessages
41                                                 .getString("PHPBasePreferencePage.apacheGroup.xampp_start"),
42                                 composite);
43                 xamppStartSFE.setPage(this);
44                 xamppStartSFE.setPreferenceStore(getPreferenceStore());
45                 xamppStartSFE.load();
46
47                 xamppStopSFE = new FileFieldEditor(
48                                 ExternalToolsPlugin.XAMPP_STOP_PREF,
49                                 PHPPreferencesMessages
50                                                 .getString("PHPBasePreferencePage.apacheGroup.xampp_stop"),
51                                 composite);
52                 xamppStopSFE.setPage(this);
53                 xamppStopSFE.setPreferenceStore(getPreferenceStore());
54                 xamppStopSFE.load();
55                 return composite;
56         }
57
58         public void init(IWorkbench workbench) {
59         }
60
61         protected void performDefaults() {
62                 xamppStartSFE.loadDefault();
63                 xamppStopSFE.loadDefault();
64                 super.performDefaults();
65         }
66
67         public boolean performOk() {
68                 xamppStartSFE.store();
69                 xamppStopSFE.store();
70                 return super.performOk();
71         }
72
73 }