split external tools preferences into multiple pages
authorbananeweizen <bananeweizen>
Sun, 5 Feb 2006 21:07:11 +0000 (21:07 +0000)
committerbananeweizen <bananeweizen>
Sun, 5 Feb 2006 21:07:11 +0000 (21:07 +0000)
net.sourceforge.phpeclipse.externaltools/plugin.xml
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/preferences/ApachePrefencePage.java [new file with mode: 0644]
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/preferences/MySQLPreferencePage.java [new file with mode: 0644]
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/preferences/PHPExternalToolsPreferencePage.java
net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/preferences/XamppPrefencePage.java [new file with mode: 0644]

index 2c2704e..6f78814 100644 (file)
@@ -8,22 +8,22 @@
    class="net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin">
 
    <runtime>
-      <library name="externaltools.jar">
-         <export name="*"/>
-      </library>
+         <library name="externaltools.jar">
+                <export name="*"/>
+         </library>
    </runtime>
 
    <requires>
-      <import plugin="org.eclipse.ui"/>
-      <import plugin="org.eclipse.ui.console"/>
-      <import plugin="org.eclipse.ui.ide"/>
-      <import plugin="org.eclipse.ui.editors"/>
-      <import plugin="org.eclipse.core.resources"/>
-      <import plugin="org.eclipse.core.runtime"/>
-      <import plugin="org.eclipse.debug.core"/>
-      <import plugin="org.eclipse.debug.ui"/>
-      <import plugin="org.eclipse.ui.externaltools"/>
-      <import plugin="net.sourceforge.phpeclipse.ui"/>
+         <import plugin="org.eclipse.ui"/>
+         <import plugin="org.eclipse.ui.console"/>
+         <import plugin="org.eclipse.ui.ide"/>
+         <import plugin="org.eclipse.ui.editors"/>
+         <import plugin="org.eclipse.core.resources"/>
+         <import plugin="org.eclipse.core.runtime"/>
+         <import plugin="org.eclipse.debug.core"/>
+         <import plugin="org.eclipse.debug.ui"/>
+         <import plugin="org.eclipse.ui.externaltools"/>
+         <import plugin="net.sourceforge.phpeclipse.ui"/>
    </requires>
 
 
@@ -35,7 +35,7 @@
        <extension-point id="directoryVariables" name="%ExtPoint.directoryVariables"/>
        <extension-point id="fileVariables" name="%ExtPoint.fileVariables"/>
        <extension-point id="refreshVariables" name="%ExtPoint.refreshVariables"/>
-       
+
 <!-- Extensions -->
 <!--
        <extension point="org.eclipse.ui.actionSets">
                        id="net.sourceforge.phpdt.externaltools.ExternalToolsSet"
                        label="%ActionSet.externalTools"
                        visible="true">
-                       <menu id="org.eclipse.ui.run" 
-                               label="%Menu.run" 
-                               path="additions"> 
-                               <separator name="ExternalToolsGroup"/> 
-                       </menu> 
+                       <menu id="org.eclipse.ui.run"
+                               label="%Menu.run"
+                               path="additions">
+                               <separator name="ExternalToolsGroup"/>
+                       </menu>
                        <action
                                id="net.sourceforge.phpdt.externaltools.ExternalToolMenuDelegateMenu"
                                label="%Action.externalTools"
@@ -57,7 +57,7 @@
                                hoverIcon="icons/full/ctool16/external_tools.gif"
                                pulldown="true"
                                class="net.sourceforge.phpdt.externaltools.internal.menu.ExternalToolMenuDelegate">
-                       </action> 
+                       </action>
                        <action
                                id="net.sourceforge.phpdt.externaltools.ExternalToolMenuDelegateToolbar"
                                label="%Action.externalTools"
                                tooltip="%Action.externalToolsTip"
                                pulldown="true"
                                class="net.sourceforge.phpdt.externaltools.internal.menu.ExternalToolMenuDelegate">
-                       </action> 
+                       </action>
                </actionSet>
        </extension>
 -->
 
-    <!-- Launch Configuration Extensions -->
-    <extension point="org.eclipse.debug.core.launchConfigurationTypes">
-       <launchConfigurationType
-               id = "net.sourceforge.phpeclipse.externaltools.ProgramLaunchConfigurationType"
-               name = "%Program.externalTools"
-               delegate = "net.sourceforge.phpdt.externaltools.internal.program.launchConfigurations.ProgramLaunchDelegate"
-               modes = "run"
-               category = "org.eclipse.ui.externaltools">
-       </launchConfigurationType> 
-       <launchConfigurationType
-               id = "net.sourceforge.phpeclipse.externaltools.ProgramBuilderLaunchConfigurationType"
-               name = "%Program.externalTools"
-               delegate = "net.sourceforge.phpdt.externaltools.internal.program.launchConfigurations.ProgramLaunchDelegate"
-               modes = "run"
-               category = "org.eclipse.ui.externaltools.builder">
-       </launchConfigurationType>
-    </extension>
-    
-    <extension point = "net.sourceforge.phpeclipse.externaltools.configurationDuplicationMaps">
-       <configurationMap
-               sourceType="net.sourceforge.phpeclipse.externaltools.ProgramLaunchConfigurationType"
-               builderType="net.sourceforge.phpeclipse.externaltools.ProgramBuilderLaunchConfigurationType">
-       </configurationMap>
-    </extension>
-    
-    <extension point = "org.eclipse.debug.ui.launchConfigurationTabGroups">
+       <!-- Launch Configuration Extensions -->
+       <extension point="org.eclipse.debug.core.launchConfigurationTypes">
+               <launchConfigurationType
+                       id = "net.sourceforge.phpeclipse.externaltools.ProgramLaunchConfigurationType"
+                       name = "%Program.externalTools"
+                       delegate = "net.sourceforge.phpdt.externaltools.internal.program.launchConfigurations.ProgramLaunchDelegate"
+                       modes = "run"
+                       category = "org.eclipse.ui.externaltools">
+               </launchConfigurationType>
+               <launchConfigurationType
+                       id = "net.sourceforge.phpeclipse.externaltools.ProgramBuilderLaunchConfigurationType"
+                       name = "%Program.externalTools"
+                       delegate = "net.sourceforge.phpdt.externaltools.internal.program.launchConfigurations.ProgramLaunchDelegate"
+                       modes = "run"
+                       category = "org.eclipse.ui.externaltools.builder">
+               </launchConfigurationType>
+       </extension>
+
+       <extension point = "net.sourceforge.phpeclipse.externaltools.configurationDuplicationMaps">
+               <configurationMap
+                       sourceType="net.sourceforge.phpeclipse.externaltools.ProgramLaunchConfigurationType"
+                       builderType="net.sourceforge.phpeclipse.externaltools.ProgramBuilderLaunchConfigurationType">
+               </configurationMap>
+       </extension>
+
+       <extension point = "org.eclipse.debug.ui.launchConfigurationTabGroups">
                <launchConfigurationTabGroup
                        id="net.sourceforge.phpdt.externaltools.launchConfigurationTabGroup.program"
                        type ="net.sourceforge.phpeclipse.externaltools.ProgramLaunchConfigurationType"
                        class="net.sourceforge.phpdt.externaltools.internal.program.launchConfigurations.ProgramBuilderTabGroup">
                </launchConfigurationTabGroup>
        </extension>
-       
+
        <extension point="org.eclipse.debug.ui.launchConfigurationTypeImages">
                <launchConfigurationTypeImage
                        id="net.sourceforge.phpdt.externaltools.launchConfigurationTypeImage.program"
                        configTypeID="net.sourceforge.phpeclipse.externaltools.ProgramLaunchConfigurationType"
                        icon="icons/full/obj16/external_tools.gif">
-               </launchConfigurationTypeImage> 
+               </launchConfigurationTypeImage>
                <launchConfigurationTypeImage
                        id="net.sourceforge.phpdt.externaltools.launchConfigurationTypeImage.program.builder"
                        configTypeID="net.sourceforge.phpeclipse.externaltools.ProgramBuilderLaunchConfigurationType"
                        icon="icons/full/obj16/external_tools.gif">
-               </launchConfigurationTypeImage> 
+               </launchConfigurationTypeImage>
        </extension>
-       <!-- Variable Extensions --> 
+
+       <!-- Variable Extensions -->
        <extension point="net.sourceforge.phpeclipse.externaltools.fileVariables">
                <variable
                        tag="workspace_loc"
                        expanderClass="net.sourceforge.phpdt.externaltools.variable.ResourceExpander">
                </variable>
        </extension>
-       
+
        <extension point="net.sourceforge.phpeclipse.externaltools.argumentVariables">
                <variable
                        tag="workspace_loc"
                        expanderClass="net.sourceforge.phpdt.externaltools.variable.ResourceExpander">
                </variable>
        </extension>
+
        <extension point="net.sourceforge.phpeclipse.externaltools.refreshVariables">
                <variable
                        tag="workspace"
                </variable>
        </extension>
        <extension
-         point="org.eclipse.ui.preferencePages">
-      <page
-            name="PHP External Tools"
-            category="net.sourceforge.phpeclipse.ui.preferencePage"
-            class="net.sourceforge.phpdt.externaltools.preferences.PHPExternalToolsPreferencePage"
-            id="net.sourceforge.phpdt.externaltools.preferences.PHPExternalToolsPreferencePage">
-      </page>
-    </extension>
-    
-    <extension
-         point="org.eclipse.ui.perspectiveExtensions">
-      <perspectiveExtension
-            targetID="net.sourceforge.phpeclipse.PHPPerspective">
-         <actionSet id="net.sourceforge.phpeclipse.PHPActionSet"/>
-      </perspectiveExtension>
+                point="org.eclipse.ui.preferencePages">
+         <page
+                       name="PHP External Tools"
+                       category="net.sourceforge.phpeclipse.ui.preferencePage"
+                       class="net.sourceforge.phpdt.externaltools.preferences.PHPExternalToolsPreferencePage"
+                       id="net.sourceforge.phpdt.externaltools.preferences">
+         </page>
+         <page
+                       category="net.sourceforge.phpdt.externaltools.preferences"
+                       class="net.sourceforge.phpdt.externaltools.preferences.XamppPrefencePage"
+                       id="net.sourceforge.phpeclipse.externaltools.xampp.preferences"
+                       name="XAMPP"/>
+         <page
+                       category="net.sourceforge.phpdt.externaltools.preferences"
+                       class="net.sourceforge.phpdt.externaltools.preferences.MySQLPreferencePage"
+                       id="net.sourceforge.phpeclipse.externaltools.mysql.preferences"
+                       name="MySQL"/>
+         <page
+                       category="net.sourceforge.phpdt.externaltools.preferences"
+                       class="net.sourceforge.phpdt.externaltools.preferences.ApachePrefencePage"
+                       id="net.sourceforge.phpeclipse.externaltools.apache.preferences"
+                       name="Apache"/>
+       </extension>
+
+       <extension
+                point="org.eclipse.ui.perspectiveExtensions">
          <perspectiveExtension
-           targetID="net.sourceforge.phpeclipse.PHPPerspective">
-                 <actionSet id="net.sf.eclipsetidy.ActionSet"/>
-         </perspectiveExtension> 
+                       targetID="net.sourceforge.phpeclipse.PHPPerspective">
+                <actionSet id="net.sourceforge.phpeclipse.PHPActionSet"/>
+         </perspectiveExtension>
+         <perspectiveExtension
+                  targetID="net.sourceforge.phpeclipse.PHPPerspective">
+                         <actionSet id="net.sf.eclipsetidy.ActionSet"/>
+                 </perspectiveExtension>
    </extension>
-   
+
    <extension
-         point="org.eclipse.ui.actionSets">
-      <actionSet
-            label="PHP/Apache"
-            visible="false"
-            id="net.sourceforge.phpeclipse.PHPActionSet">
-         <menu
-               label="PHP/Apache"
-               id="net.sourceforge.phpeclipse.PHPMenu">
-            <separator
-                  name="phpeclipse">
-            </separator>
-         </menu>
-         <action
-               label="Restart Apache"
-               icon="icons/obj16/apache_restart.gif"
-               tooltip="Restart Apache"
-               class="net.sourceforge.phpdt.externaltools.actions.PHPRestartApacheAction"
-               menubarPath="net.sourceforge.phpeclipse.PHPMenu/phpeclipse"
-               toolbarPath="Normal"
-               id="net.sourceforge.phpdt.externaltools.actions.PHPRestartApacheAction">
-         </action>
-         <action
-               label="Stop Apache"
-               icon="icons/obj16/apache_stop.gif"
-               tooltip="Stop Apache"
-               class="net.sourceforge.phpdt.externaltools.actions.PHPStopApacheAction"
-               menubarPath="net.sourceforge.phpeclipse.PHPMenu/phpeclipse"
-               toolbarPath="Normal"
-               id="net.sourceforge.phpdt.externaltools.actions.PHPStopApacheAction">
-         </action>
-         <action
-               label="Start Apache"
-               icon="icons/obj16/apache.gif"
-               tooltip="Start Apache"
-               class="net.sourceforge.phpdt.externaltools.actions.PHPStartApacheAction"
-               menubarPath="net.sourceforge.phpeclipse.PHPMenu/phpeclipse"
-               toolbarPath="Normal"
-               id="net.sourceforge.phpdt.externaltools.actions.PHPStartApacheAction">
-         </action>
-         <action
-               label="Start MySQL"
-               icon="icons/obj16/sql.gif"
-               tooltip="Start MySQL"
-               class="net.sourceforge.phpdt.externaltools.actions.PHPStartMySQLAction"
-               menubarPath="net.sourceforge.phpeclipse.PHPMenu/phpeclipse"
-               toolbarPath="Normal"
-               id="net.sourceforge.phpdt.externaltools.actions.PHPStartMySQLAction">
-         </action>
-         <action
-               label="Stop XAMPP"
-               icon="icons/obj16/xampp_stop.gif"
-               tooltip="Stop XAMPP"
-               class="net.sourceforge.phpdt.externaltools.actions.PHPStopXAMPPAction"
-               menubarPath="net.sourceforge.phpeclipse.PHPMenu/phpeclipse"
-               toolbarPath="Normal"
-               id="net.sourceforge.phpdt.externaltools.actions.PHPStopXAMPPAction">
-         </action>
-         <action
-               label="Start XAMPP"
-               icon="icons/obj16/xampp_start.gif"
-               tooltip="Start XAMPP"
-               class="net.sourceforge.phpdt.externaltools.actions.PHPStartXAMPPAction"
-               menubarPath="net.sourceforge.phpeclipse.PHPMenu/phpeclipse"
-               toolbarPath="Normal"
-               id="net.sourceforge.phpdt.externaltools.actions.PHPStartXAMPPAction">
-         </action>
-      </actionSet>  
-    </extension>
-    
-    <extension
-         point="org.eclipse.ui.popupMenus">
-      <objectContribution
-            objectClass="org.eclipse.core.resources.IFile"
-            nameFilter="*.php"
-            id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
-         <action
-               label="Run External PHP Parser"
-               class="net.sourceforge.phpdt.externaltools.actions.PHPExternalParserAction"
-               menubarPath="additions"
-               id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
-         </action>
-      </objectContribution>
-      <objectContribution
-            objectClass="org.eclipse.core.resources.IFile"
-            nameFilter="*.php3"
-            id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
-         <action
-               label="Run External PHP Parser"
-               class="net.sourceforge.phpdt.externaltools.actions.PHPExternalParserAction"
-               menubarPath="additions"
-               id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
-         </action>
-      </objectContribution>
-      <objectContribution
-            objectClass="org.eclipse.core.resources.IFile"
-            nameFilter="*.php4"
-            id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
-         <action
-               label="Run External PHP Parser"
-               class="net.sourceforge.phpdt.externaltools.actions.PHPExternalParserAction"
-               menubarPath="additions"
-               id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
-         </action>
-      </objectContribution>
-      <objectContribution
-            objectClass="org.eclipse.core.resources.IFile"
-            nameFilter="*.php5"
-            id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
-         <action
-               label="Run External PHP Parser"
-               class="net.sourceforge.phpdt.externaltools.actions.PHPExternalParserAction"
-               menubarPath="additions"
-               id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
-         </action>
-      </objectContribution>
-      <objectContribution
-            objectClass="org.eclipse.core.resources.IFile"
-            nameFilter="*.module"
-            id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
-         <action
-               label="Run External PHP Parser"
-               class="net.sourceforge.phpdt.externaltools.actions.PHPExternalParserAction"
-               menubarPath="additions"
-               id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
-         </action>
-      </objectContribution>
-      <objectContribution
-            objectClass="org.eclipse.core.resources.IFile"
-            nameFilter="*.inc"
-            id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
-         <action
-               label="Run External PHP Parser"
-               class="net.sourceforge.phpdt.externaltools.actions.PHPExternalParserAction"
-               menubarPath="additions"
-               id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
-         </action>
-      </objectContribution>
-    </extension>
+                point="org.eclipse.ui.actionSets">
+         <actionSet
+                       label="PHP/Apache"
+                       visible="false"
+                       id="net.sourceforge.phpeclipse.PHPActionSet">
+                <menu
+                          label="PHP/Apache"
+                          id="net.sourceforge.phpeclipse.PHPMenu">
+                       <separator
+                                 name="phpeclipse">
+                       </separator>
+                </menu>
+                <action
+                          label="Restart Apache"
+                          icon="icons/obj16/apache_restart.gif"
+                          tooltip="Restart Apache"
+                          class="net.sourceforge.phpdt.externaltools.actions.PHPRestartApacheAction"
+                          menubarPath="net.sourceforge.phpeclipse.PHPMenu/phpeclipse"
+                          toolbarPath="Normal"
+                          id="net.sourceforge.phpdt.externaltools.actions.PHPRestartApacheAction">
+                </action>
+                <action
+                          label="Stop Apache"
+                          icon="icons/obj16/apache_stop.gif"
+                          tooltip="Stop Apache"
+                          class="net.sourceforge.phpdt.externaltools.actions.PHPStopApacheAction"
+                          menubarPath="net.sourceforge.phpeclipse.PHPMenu/phpeclipse"
+                          toolbarPath="Normal"
+                          id="net.sourceforge.phpdt.externaltools.actions.PHPStopApacheAction">
+                </action>
+                <action
+                          label="Start Apache"
+                          icon="icons/obj16/apache.gif"
+                          tooltip="Start Apache"
+                          class="net.sourceforge.phpdt.externaltools.actions.PHPStartApacheAction"
+                          menubarPath="net.sourceforge.phpeclipse.PHPMenu/phpeclipse"
+                          toolbarPath="Normal"
+                          id="net.sourceforge.phpdt.externaltools.actions.PHPStartApacheAction">
+                </action>
+                <action
+                          label="Start MySQL"
+                          icon="icons/obj16/sql.gif"
+                          tooltip="Start MySQL"
+                          class="net.sourceforge.phpdt.externaltools.actions.PHPStartMySQLAction"
+                          menubarPath="net.sourceforge.phpeclipse.PHPMenu/phpeclipse"
+                          toolbarPath="Normal"
+                          id="net.sourceforge.phpdt.externaltools.actions.PHPStartMySQLAction">
+                </action>
+                <action
+                          label="Stop XAMPP"
+                          icon="icons/obj16/xampp_stop.gif"
+                          tooltip="Stop XAMPP"
+                          class="net.sourceforge.phpdt.externaltools.actions.PHPStopXAMPPAction"
+                          menubarPath="net.sourceforge.phpeclipse.PHPMenu/phpeclipse"
+                          toolbarPath="Normal"
+                          id="net.sourceforge.phpdt.externaltools.actions.PHPStopXAMPPAction">
+                </action>
+                <action
+                          label="Start XAMPP"
+                          icon="icons/obj16/xampp_start.gif"
+                          tooltip="Start XAMPP"
+                          class="net.sourceforge.phpdt.externaltools.actions.PHPStartXAMPPAction"
+                          menubarPath="net.sourceforge.phpeclipse.PHPMenu/phpeclipse"
+                          toolbarPath="Normal"
+                          id="net.sourceforge.phpdt.externaltools.actions.PHPStartXAMPPAction">
+                </action>
+         </actionSet>
+       </extension>
+
+       <extension
+                point="org.eclipse.ui.popupMenus">
+         <objectContribution
+                       objectClass="org.eclipse.core.resources.IFile"
+                       nameFilter="*.php"
+                       id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
+                <action
+                          label="Run External PHP Parser"
+                          class="net.sourceforge.phpdt.externaltools.actions.PHPExternalParserAction"
+                          menubarPath="additions"
+                          id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
+                </action>
+         </objectContribution>
+         <objectContribution
+                       objectClass="org.eclipse.core.resources.IFile"
+                       nameFilter="*.php3"
+                       id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
+                <action
+                          label="Run External PHP Parser"
+                          class="net.sourceforge.phpdt.externaltools.actions.PHPExternalParserAction"
+                          menubarPath="additions"
+                          id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
+                </action>
+         </objectContribution>
+         <objectContribution
+                       objectClass="org.eclipse.core.resources.IFile"
+                       nameFilter="*.php4"
+                       id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
+                <action
+                          label="Run External PHP Parser"
+                          class="net.sourceforge.phpdt.externaltools.actions.PHPExternalParserAction"
+                          menubarPath="additions"
+                          id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
+                </action>
+         </objectContribution>
+         <objectContribution
+                       objectClass="org.eclipse.core.resources.IFile"
+                       nameFilter="*.php5"
+                       id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
+                <action
+                          label="Run External PHP Parser"
+                          class="net.sourceforge.phpdt.externaltools.actions.PHPExternalParserAction"
+                          menubarPath="additions"
+                          id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
+                </action>
+         </objectContribution>
+         <objectContribution
+                       objectClass="org.eclipse.core.resources.IFile"
+                       nameFilter="*.module"
+                       id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
+                <action
+                          label="Run External PHP Parser"
+                          class="net.sourceforge.phpdt.externaltools.actions.PHPExternalParserAction"
+                          menubarPath="additions"
+                          id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
+                </action>
+         </objectContribution>
+         <objectContribution
+                       objectClass="org.eclipse.core.resources.IFile"
+                       nameFilter="*.inc"
+                       id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
+                <action
+                          label="Run External PHP Parser"
+                          class="net.sourceforge.phpdt.externaltools.actions.PHPExternalParserAction"
+                          menubarPath="additions"
+                          id="net.sourceforge.phpdt.externaltools.actions.externalParserAction">
+                </action>
+         </objectContribution>
+       </extension>
 </plugin>
diff --git a/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/preferences/ApachePrefencePage.java b/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/preferences/ApachePrefencePage.java
new file mode 100644 (file)
index 0000000..1f410f3
--- /dev/null
@@ -0,0 +1,169 @@
+package net.sourceforge.phpdt.externaltools.preferences;
+
+import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FileFieldEditor;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.swt.SWT;
+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.Label;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class ApachePrefencePage extends PreferencePage implements
+               IWorkbenchPreferencePage {
+
+       StringFieldEditor apacheStartSFE;
+
+       StringFieldEditor apacheStopSFE;
+
+       StringFieldEditor apacheRestartSFE;
+
+       FileFieldEditor apacheRunFFE;
+
+       FileFieldEditor httpdConfFFE;
+
+       FileFieldEditor etcHostsFFE;
+
+       BooleanFieldEditor apacheStartBFE;
+
+       BooleanFieldEditor apacheStopBFE;
+
+       BooleanFieldEditor apacheRestartBFE;
+
+       public ApachePrefencePage() {
+               super();
+               setPreferenceStore(ExternalToolsPlugin.getDefault()
+                               .getPreferenceStore());
+       }
+
+       protected Control createContents(Composite parent) {
+               initializeDialogUnits(parent);
+               Composite composite = new Composite(parent, SWT.LEFT);
+               composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+               composite.setLayout(new GridLayout());
+
+               apacheStartSFE = new StringFieldEditor(
+                               ExternalToolsPlugin.APACHE_START_PREF, PHPPreferencesMessages
+                                               .getString("PHPBasePreferencePage.apacheGroup.start"),
+                                               composite);
+               apacheStartSFE.setPage(this);
+               apacheStartSFE.setPreferenceStore(getPreferenceStore());
+               apacheStartSFE.load();
+               new Label(composite, SWT.NONE);
+
+               new Label(composite, SWT.NONE);
+               apacheStartBFE = new BooleanFieldEditor(
+                               ExternalToolsPlugin.APACHE_START_BACKGROUND,
+                               PHPPreferencesMessages
+                                               .getString("PHPBasePreferencePage.apacheGroup.start_background"),
+                                               composite);
+               apacheStartBFE.setPage(this);
+               apacheStartBFE.setPreferenceStore(getPreferenceStore());
+               apacheStartBFE.load();
+               new Label(composite, SWT.NONE);
+
+
+               apacheStopSFE = new StringFieldEditor(
+                               ExternalToolsPlugin.APACHE_STOP_PREF, PHPPreferencesMessages
+                                               .getString("PHPBasePreferencePage.apacheGroup.stop"),
+                                               composite);
+               apacheStopSFE.setPage(this);
+               apacheStopSFE.setPreferenceStore(getPreferenceStore());
+               apacheStopSFE.load();
+               new Label(composite, SWT.NONE);
+
+               new Label(composite, SWT.NONE);
+               apacheStopBFE = new BooleanFieldEditor(
+                               ExternalToolsPlugin.APACHE_STOP_BACKGROUND,
+                               PHPPreferencesMessages
+                                               .getString("PHPBasePreferencePage.apacheGroup.stop_background"),
+                                               composite);
+               apacheStopBFE.setPage(this);
+               apacheStopBFE.setPreferenceStore(getPreferenceStore());
+               apacheStopBFE.load();
+               new Label(composite, SWT.NONE);
+
+
+               apacheRestartSFE = new StringFieldEditor(
+                               ExternalToolsPlugin.APACHE_RESTART_PREF,
+                               PHPPreferencesMessages
+                                               .getString("PHPBasePreferencePage.apacheGroup.restart"),
+                                               composite);
+               apacheRestartSFE.setPage(this);
+               apacheRestartSFE.setPreferenceStore(getPreferenceStore());
+               apacheRestartSFE.load();
+               new Label(composite, SWT.NONE);
+
+               new Label(composite, SWT.NONE);
+               apacheRestartBFE = new BooleanFieldEditor(
+                               ExternalToolsPlugin.APACHE_RESTART_BACKGROUND,
+                               PHPPreferencesMessages
+                                               .getString("PHPBasePreferencePage.apacheGroup.restart_background"),
+                                               composite);
+               apacheRestartBFE.setPage(this);
+               apacheRestartBFE.setPreferenceStore(getPreferenceStore());
+               apacheRestartBFE.load();
+               new Label(composite, SWT.NONE);
+
+
+               apacheRunFFE = new FileFieldEditor(ExternalToolsPlugin.APACHE_RUN_PREF,
+                               PHPPreferencesMessages
+                                               .getString("PHPBasePreferencePage.apacheGroup.run"),
+                                               composite);
+               apacheRunFFE.setPage(this);
+               apacheRunFFE.setPreferenceStore(getPreferenceStore());
+               apacheRunFFE.load();
+
+               httpdConfFFE = new FileFieldEditor(
+                               ExternalToolsPlugin.HTTPD_CONF_PATH_PREF,
+                               "Path to httpd.conf:", composite);
+               httpdConfFFE.setPage(this);
+               httpdConfFFE.setPreferenceStore(getPreferenceStore());
+               httpdConfFFE.load();
+
+               etcHostsFFE = new FileFieldEditor(
+                               ExternalToolsPlugin.ETC_HOSTS_PATH_PREF, "Path to etc/hosts:",
+                               composite);
+               etcHostsFFE.setPage(this);
+               etcHostsFFE.setPreferenceStore(getPreferenceStore());
+               etcHostsFFE.load();
+
+               return composite;
+       }
+
+       public void init(IWorkbench workbench) {
+       }
+
+       protected void performDefaults() {
+               apacheStartSFE.loadDefault();
+               apacheStopSFE.loadDefault();
+               apacheRestartSFE.loadDefault();
+               apacheRunFFE.loadDefault();
+               httpdConfFFE.loadDefault();
+               etcHostsFFE.loadDefault();
+               apacheStartBFE.loadDefault();
+               apacheStopBFE.loadDefault();
+               apacheRestartBFE.loadDefault();
+               super.performDefaults();
+       }
+
+       public boolean performOk() {
+               apacheStartSFE.store();
+               apacheStopSFE.store();
+               apacheRestartSFE.store();
+               apacheRunFFE.store();
+               httpdConfFFE.store();
+               etcHostsFFE.store();
+               apacheStartBFE.store();
+               apacheStopBFE.store();
+               apacheRestartBFE.store();
+               return super.performOk();
+       }
+
+}
diff --git a/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/preferences/MySQLPreferencePage.java b/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/preferences/MySQLPreferencePage.java
new file mode 100644 (file)
index 0000000..11875a3
--- /dev/null
@@ -0,0 +1,87 @@
+package net.sourceforge.phpdt.externaltools.preferences;
+
+import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FileFieldEditor;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.swt.SWT;
+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.Label;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class MySQLPreferencePage extends PreferencePage implements
+               IWorkbenchPreferencePage {
+
+       StringFieldEditor mySQLCommandSFE;
+
+       FileFieldEditor mysqlRunFFE;
+
+       BooleanFieldEditor mysqlStartBFE;
+
+       public MySQLPreferencePage() {
+               super();
+               setPreferenceStore(ExternalToolsPlugin.getDefault()
+                               .getPreferenceStore());
+       }
+
+       protected Control createContents(Composite parent) {
+               initializeDialogUnits(parent);
+               Composite composite = new Composite(parent, SWT.LEFT);
+               composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+               composite.setLayout(new GridLayout());
+
+               mysqlStartBFE = new BooleanFieldEditor(
+                               ExternalToolsPlugin.MYSQL_START_BACKGROUND,
+                               PHPPreferencesMessages
+                                               .getString("PHPBasePreferencePage.mySQLGroup.start_background"),
+                                               composite);
+               mysqlStartBFE.setPage(this);
+               mysqlStartBFE.setPreferenceStore(getPreferenceStore());
+               mysqlStartBFE.load();
+               new Label(composite, SWT.NONE);
+               new Label(composite, SWT.NONE);
+
+               mySQLCommandSFE = new StringFieldEditor(ExternalToolsPlugin.MYSQL_PREF,
+                               PHPPreferencesMessages
+                                               .getString("PHPBasePreferencePage.mySQLGroup.command"),
+                                               composite);
+               mySQLCommandSFE.setPage(this);
+               mySQLCommandSFE.setPreferenceStore(getPreferenceStore());
+               mySQLCommandSFE.load();
+               new Label(composite, SWT.NONE);
+
+               mysqlRunFFE = new FileFieldEditor(ExternalToolsPlugin.MYSQL_RUN_PREF,
+                               PHPPreferencesMessages
+                                               .getString("PHPBasePreferencePage.mySQLGroup.run"),
+                                               composite);
+               mysqlRunFFE.setPage(this);
+               mysqlRunFFE.setPreferenceStore(getPreferenceStore());
+               mysqlRunFFE.load();
+
+               return composite;
+       }
+
+       public void init(IWorkbench workbench) {
+       }
+
+       protected void performDefaults() {
+               mySQLCommandSFE.loadDefault();
+               mysqlRunFFE.loadDefault();
+               mysqlStartBFE.loadDefault();
+               super.performDefaults();
+       }
+
+       public boolean performOk() {
+               mySQLCommandSFE.store();
+               mysqlRunFFE.store();
+               mysqlStartBFE.store();
+               return super.performOk();
+       }
+
+}
index 7e4df13..f730439 100644 (file)
@@ -1,11 +1,8 @@
 package net.sourceforge.phpdt.externaltools.preferences;
 
-
 import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
 
-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;
@@ -13,245 +10,62 @@ 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 PHPExternalToolsPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
-//  StringFieldEditor phpParserExtensionsSFE;
-  StringFieldEditor xamppStartSFE;
-  StringFieldEditor xamppStopSFE;
-  StringFieldEditor apacheStartSFE;
-
-  StringFieldEditor apacheStopSFE;
-
-  StringFieldEditor apacheRestartSFE;
-
-  StringFieldEditor mySQLCommandSFE;
-
-  StringFieldEditor externalParserSFE;
-
-  FileFieldEditor apacheRunFFE;
-
-  FileFieldEditor mysqlRunFFE;
-
-  FileFieldEditor phpRunFFE;
-
-  FileFieldEditor httpdConfFFE;
-
-  FileFieldEditor etcHostsFFE;
-
-  BooleanFieldEditor apacheStartBFE;
-
-  BooleanFieldEditor apacheStopBFE;
-
-  BooleanFieldEditor apacheRestartBFE;
-
-  BooleanFieldEditor mysqlStartBFE;
-
-  public PHPExternalToolsPreferencePage() {
-    super();
-    setPreferenceStore(ExternalToolsPlugin.getDefault().getPreferenceStore());
-    setDescription(PHPPreferencesMessages.getString("PHPBasePreferencePage.description")); //$NON-NLS-1$
-  }
-
-  public void init(IWorkbench workbench) {
-  }
-
-  protected void performDefaults() {
-//    phpParserExtensionsSFE.loadDefault();
-    xamppStartSFE.loadDefault();
-    xamppStopSFE.loadDefault();
-    apacheStartSFE.loadDefault();
-    apacheStopSFE.loadDefault();
-    apacheRestartSFE.loadDefault();
-    mySQLCommandSFE.loadDefault();
-    externalParserSFE.loadDefault();
-    phpRunFFE.loadDefault();
-    apacheRunFFE.loadDefault();
-    httpdConfFFE.loadDefault();
-    etcHostsFFE.loadDefault();
-    mysqlRunFFE.loadDefault();
-    apacheStartBFE.loadDefault();
-    apacheStopBFE.loadDefault();
-    apacheRestartBFE.loadDefault();
-    mysqlStartBFE.loadDefault();
-    super.performDefaults();
-  }
-
-  public boolean performOk() {
-//    PHPFileUtil.setExtensions(null);
-//    phpParserExtensionsSFE.store();
-    xamppStartSFE.store();
-    xamppStopSFE.store();
-    apacheStartSFE.store();
-    apacheStopSFE.store();
-    apacheRestartSFE.store();
-    mySQLCommandSFE.store();
-    externalParserSFE.store();
-    phpRunFFE.store();
-    apacheRunFFE.store();
-    httpdConfFFE.store();
-    etcHostsFFE.store();
-    mysqlRunFFE.store();
-
-    apacheStartBFE.store();
-    apacheStopBFE.store();
-    apacheRestartBFE.store();
-    mysqlStartBFE.store();
-    return super.performOk();
-  }
-
-  protected Control createContents(Composite parent) {
-    initializeDialogUnits(parent);
-    final IPreferenceStore store = ExternalToolsPlugin.getDefault().getPreferenceStore();
-    Composite composite = new Composite(parent, SWT.LEFT);
-    composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-    composite.setLayout(new GridLayout());
-
-    //Create apache
-    Composite apacheSettingsComposite = new Composite(composite, SWT.NULL);
-    apacheSettingsComposite.setLayout(new GridLayout());
-    apacheSettingsComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-    Group apacheSettingsGroup = new Group(apacheSettingsComposite, SWT.NONE);
-    apacheSettingsGroup.setText(PHPPreferencesMessages.getString("PHPBasePreferencePage.apacheGroup"));
-    apacheSettingsGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-    apacheSettingsGroup.setLayout(new GridLayout());
-
-
-    xamppStartSFE = new StringFieldEditor(ExternalToolsPlugin.XAMPP_START_PREF, PHPPreferencesMessages
-        .getString("PHPBasePreferencePage.apacheGroup.xampp_start"), apacheSettingsGroup);
-    xamppStartSFE.setPage(this);
-    xamppStartSFE.setPreferenceStore(getPreferenceStore());
-    xamppStartSFE.load();
-    new Label(apacheSettingsGroup, SWT.NONE);
-
-    xamppStopSFE = new StringFieldEditor(ExternalToolsPlugin.XAMPP_STOP_PREF, PHPPreferencesMessages
-        .getString("PHPBasePreferencePage.apacheGroup.xampp_stop"), apacheSettingsGroup);
-    xamppStopSFE.setPage(this);
-    xamppStopSFE.setPreferenceStore(getPreferenceStore());
-    xamppStopSFE.load();
-    new Label(apacheSettingsGroup, SWT.NONE);
-
-    apacheStartBFE = new BooleanFieldEditor(ExternalToolsPlugin.APACHE_START_BACKGROUND, PHPPreferencesMessages
-        .getString("PHPBasePreferencePage.apacheGroup.start_background"), apacheSettingsGroup);
-    apacheStartBFE.setPage(this);
-    apacheStartBFE.setPreferenceStore(getPreferenceStore());
-    apacheStartBFE.load();
-
-    new Label(apacheSettingsGroup, SWT.NONE);
-    new Label(apacheSettingsGroup, SWT.NONE);
-    apacheStartSFE = new StringFieldEditor(ExternalToolsPlugin.APACHE_START_PREF, PHPPreferencesMessages
-        .getString("PHPBasePreferencePage.apacheGroup.start"), apacheSettingsGroup);
-    apacheStartSFE.setPage(this);
-    apacheStartSFE.setPreferenceStore(getPreferenceStore());
-    apacheStartSFE.load();
-    new Label(apacheSettingsGroup, SWT.NONE);
-
-    apacheStopBFE = new BooleanFieldEditor(ExternalToolsPlugin.APACHE_STOP_BACKGROUND, PHPPreferencesMessages
-        .getString("PHPBasePreferencePage.apacheGroup.stop_background"), apacheSettingsGroup);
-    apacheStopBFE.setPage(this);
-    apacheStopBFE.setPreferenceStore(getPreferenceStore());
-    apacheStopBFE.load();
-    new Label(apacheSettingsGroup, SWT.NONE);
-    new Label(apacheSettingsGroup, SWT.NONE);
-    apacheStopSFE = new StringFieldEditor(ExternalToolsPlugin.APACHE_STOP_PREF, PHPPreferencesMessages
-        .getString("PHPBasePreferencePage.apacheGroup.stop"), apacheSettingsGroup);
-    apacheStopSFE.setPage(this);
-    apacheStopSFE.setPreferenceStore(getPreferenceStore());
-    apacheStopSFE.load();
-    new Label(apacheSettingsGroup, SWT.NONE);
-
-    apacheRestartBFE = new BooleanFieldEditor(ExternalToolsPlugin.APACHE_RESTART_BACKGROUND, PHPPreferencesMessages
-        .getString("PHPBasePreferencePage.apacheGroup.restart_background"), apacheSettingsGroup);
-    apacheRestartBFE.setPage(this);
-    apacheRestartBFE.setPreferenceStore(getPreferenceStore());
-    apacheRestartBFE.load();
-    new Label(apacheSettingsGroup, SWT.NONE);
-    new Label(apacheSettingsGroup, SWT.NONE);
-    apacheRestartSFE = new StringFieldEditor(ExternalToolsPlugin.APACHE_RESTART_PREF, PHPPreferencesMessages
-        .getString("PHPBasePreferencePage.apacheGroup.restart"), apacheSettingsGroup);
-    apacheRestartSFE.setPage(this);
-    apacheRestartSFE.setPreferenceStore(getPreferenceStore());
-    apacheRestartSFE.load();
-    new Label(apacheSettingsGroup, SWT.NONE);
-
-    apacheRunFFE = new FileFieldEditor(ExternalToolsPlugin.APACHE_RUN_PREF, PHPPreferencesMessages
-        .getString("PHPBasePreferencePage.apacheGroup.run"), apacheSettingsGroup);
-    apacheRunFFE.setPage(this);
-    apacheRunFFE.setPreferenceStore(getPreferenceStore());
-    apacheRunFFE.load();
-
-    httpdConfFFE = new FileFieldEditor(ExternalToolsPlugin.HTTPD_CONF_PATH_PREF,
-               "Path to httpd.conf:", apacheSettingsGroup);
-    httpdConfFFE.setPage(this);
-    httpdConfFFE.setPreferenceStore(getPreferenceStore());
-    httpdConfFFE.load();
-
-    etcHostsFFE = new FileFieldEditor(ExternalToolsPlugin.ETC_HOSTS_PATH_PREF,
-               "Path to etc/hosts:", apacheSettingsGroup);
-    etcHostsFFE.setPage(this);
-    etcHostsFFE.setPreferenceStore(getPreferenceStore());
-    etcHostsFFE.load();
-
-    phpRunFFE = new FileFieldEditor(ExternalToolsPlugin.PHP_RUN_PREF, PHPPreferencesMessages
-        .getString("PHPBasePreferencePage.console.php"), apacheSettingsGroup);
-    phpRunFFE.setPage(this);
-    phpRunFFE.setPreferenceStore(getPreferenceStore());
-    phpRunFFE.load();
-
-    //Create mySQL
-    Composite mySQLSettingsComposite = new Composite(composite, SWT.NULL);
-    mySQLSettingsComposite.setLayout(new GridLayout());
-    mySQLSettingsComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-    Group mySQLSettingsGroup = new Group(mySQLSettingsComposite, SWT.NONE);
-    mySQLSettingsGroup.setText(PHPPreferencesMessages.getString("PHPBasePreferencePage.mySQLGroup"));
-    mySQLSettingsGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-    mySQLSettingsGroup.setLayout(new GridLayout());
-
-    mysqlStartBFE = new BooleanFieldEditor(ExternalToolsPlugin.MYSQL_START_BACKGROUND, PHPPreferencesMessages
-        .getString("PHPBasePreferencePage.mySQLGroup.start_background"), mySQLSettingsGroup);
-    mysqlStartBFE.setPage(this);
-    mysqlStartBFE.setPreferenceStore(getPreferenceStore());
-    mysqlStartBFE.load();
-    new Label(mySQLSettingsGroup, SWT.NONE);
-    new Label(mySQLSettingsGroup, SWT.NONE);
-
-    mySQLCommandSFE = new StringFieldEditor(ExternalToolsPlugin.MYSQL_PREF, PHPPreferencesMessages
-        .getString("PHPBasePreferencePage.mySQLGroup.command"), mySQLSettingsGroup);
-    mySQLCommandSFE.setPage(this);
-    mySQLCommandSFE.setPreferenceStore(getPreferenceStore());
-    mySQLCommandSFE.load();
-    new Label(mySQLSettingsGroup, SWT.NONE);
-
-    mysqlRunFFE = new FileFieldEditor(ExternalToolsPlugin.MYSQL_RUN_PREF, PHPPreferencesMessages
-        .getString("PHPBasePreferencePage.mySQLGroup.run"), mySQLSettingsGroup);
-    mysqlRunFFE.setPage(this);
-    mysqlRunFFE.setPreferenceStore(getPreferenceStore());
-    mysqlRunFFE.load();
-
-    Composite parserSettingsComposite = new Composite(composite, SWT.NULL);
-    parserSettingsComposite.setLayout(new GridLayout());
-    parserSettingsComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-    Group parserSettingsGroup = new Group(parserSettingsComposite, SWT.NONE);
-    parserSettingsGroup.setText("External parser command");
-    parserSettingsGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-    parserSettingsGroup.setLayout(new GridLayout());
-
-    externalParserSFE =
-      new StringFieldEditor(
-        ExternalToolsPlugin.EXTERNAL_PARSER_PREF,
-        PHPPreferencesMessages.getString("PHPBasePreferencePage.parsers.extcommand"),
-        parserSettingsGroup
-    );
-    externalParserSFE.setPage(this);
-    externalParserSFE.setPreferenceStore(getPreferenceStore());
-    externalParserSFE.load();
-
-    return composite;
-  }
+public class PHPExternalToolsPreferencePage extends PreferencePage implements
+               IWorkbenchPreferencePage {
+
+       StringFieldEditor externalParserSFE;
+
+       FileFieldEditor phpRunFFE;
+
+       public PHPExternalToolsPreferencePage() {
+               super();
+               setPreferenceStore(ExternalToolsPlugin.getDefault()
+                               .getPreferenceStore());
+       }
+
+       public void init(IWorkbench workbench) {
+       }
+
+       protected void performDefaults() {
+               externalParserSFE.loadDefault();
+               phpRunFFE.loadDefault();
+               super.performDefaults();
+       }
+
+       public boolean performOk() {
+               externalParserSFE.store();
+               phpRunFFE.store();
+               return super.performOk();
+       }
+
+       protected Control createContents(Composite parent) {
+               initializeDialogUnits(parent);
+               Composite composite = new Composite(parent, SWT.LEFT);
+               composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+               phpRunFFE = new FileFieldEditor(ExternalToolsPlugin.PHP_RUN_PREF,
+                               PHPPreferencesMessages
+                                               .getString("PHPBasePreferencePage.console.php"),
+                               composite);
+               phpRunFFE.setPage(this);
+               phpRunFFE.setPreferenceStore(getPreferenceStore());
+               phpRunFFE.load();
+
+               externalParserSFE = new StringFieldEditor(
+                               ExternalToolsPlugin.EXTERNAL_PARSER_PREF,
+                               PHPPreferencesMessages
+                                               .getString("PHPBasePreferencePage.parsers.extcommand"),
+                               composite);
+               externalParserSFE.setPage(this);
+               externalParserSFE.setPreferenceStore(getPreferenceStore());
+               externalParserSFE.load();
+               new Label(composite, SWT.NONE);
+
+               composite.setLayout(new GridLayout(3,false));
+               return composite;
+       }
 }
\ No newline at end of file
diff --git a/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/preferences/XamppPrefencePage.java b/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/preferences/XamppPrefencePage.java
new file mode 100644 (file)
index 0000000..a6c001f
--- /dev/null
@@ -0,0 +1,69 @@
+package net.sourceforge.phpdt.externaltools.preferences;
+
+import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
+
+import org.eclipse.jface.preference.FileFieldEditor;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+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.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class XamppPrefencePage extends PreferencePage implements
+               IWorkbenchPreferencePage {
+
+       FileFieldEditor xamppStartSFE;
+
+       FileFieldEditor xamppStopSFE;
+
+       public XamppPrefencePage() {
+               super();
+               setPreferenceStore(ExternalToolsPlugin.getDefault()
+                               .getPreferenceStore());
+       }
+
+       protected Control createContents(Composite parent) {
+               initializeDialogUnits(parent);
+               Composite composite = new Composite(parent, SWT.LEFT);
+               composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+               composite.setLayout(new GridLayout());
+
+               xamppStartSFE = new FileFieldEditor(
+                               ExternalToolsPlugin.XAMPP_START_PREF,
+                               PHPPreferencesMessages
+                                               .getString("PHPBasePreferencePage.apacheGroup.xampp_start"),
+                               composite);
+               xamppStartSFE.setPage(this);
+               xamppStartSFE.setPreferenceStore(getPreferenceStore());
+               xamppStartSFE.load();
+
+               xamppStopSFE = new FileFieldEditor(
+                               ExternalToolsPlugin.XAMPP_STOP_PREF,
+                               PHPPreferencesMessages
+                                               .getString("PHPBasePreferencePage.apacheGroup.xampp_stop"),
+                                               composite);
+               xamppStopSFE.setPage(this);
+               xamppStopSFE.setPreferenceStore(getPreferenceStore());
+               xamppStopSFE.load();
+               return composite;
+       }
+
+       public void init(IWorkbench workbench) {
+       }
+
+       protected void performDefaults() {
+               xamppStartSFE.loadDefault();
+               xamppStopSFE.loadDefault();
+               super.performDefaults();
+       }
+
+       public boolean performOk() {
+               xamppStartSFE.store();
+               xamppStopSFE.store();
+               return super.performOk();
+       }
+
+}