make compile in 3.2 by removing internal dependency
[phpeclipse.git] / net.sourceforge.phpeclipse.externaltools / src / net / sourceforge / phpdt / externaltools / preferences / PHPExternalToolsPreferencePage.java
index 63179ef..7e4df13 100644 (file)
@@ -30,15 +30,19 @@ public class PHPExternalToolsPreferencePage extends PreferencePage implements IW
   StringFieldEditor apacheRestartSFE;
 
   StringFieldEditor mySQLCommandSFE;
-  
+
   StringFieldEditor externalParserSFE;
-  
+
   FileFieldEditor apacheRunFFE;
 
   FileFieldEditor mysqlRunFFE;
 
   FileFieldEditor phpRunFFE;
 
+  FileFieldEditor httpdConfFFE;
+
+  FileFieldEditor etcHostsFFE;
+
   BooleanFieldEditor apacheStartBFE;
 
   BooleanFieldEditor apacheStopBFE;
@@ -67,6 +71,8 @@ public class PHPExternalToolsPreferencePage extends PreferencePage implements IW
     externalParserSFE.loadDefault();
     phpRunFFE.loadDefault();
     apacheRunFFE.loadDefault();
+    httpdConfFFE.loadDefault();
+    etcHostsFFE.loadDefault();
     mysqlRunFFE.loadDefault();
     apacheStartBFE.loadDefault();
     apacheStopBFE.loadDefault();
@@ -76,7 +82,7 @@ public class PHPExternalToolsPreferencePage extends PreferencePage implements IW
   }
 
   public boolean performOk() {
-//    PHPFileUtil.setExtensions(null); 
+//    PHPFileUtil.setExtensions(null);
 //    phpParserExtensionsSFE.store();
     xamppStartSFE.store();
     xamppStopSFE.store();
@@ -87,6 +93,8 @@ public class PHPExternalToolsPreferencePage extends PreferencePage implements IW
     externalParserSFE.store();
     phpRunFFE.store();
     apacheRunFFE.store();
+    httpdConfFFE.store();
+    etcHostsFFE.store();
     mysqlRunFFE.store();
 
     apacheStartBFE.store();
@@ -112,24 +120,24 @@ public class PHPExternalToolsPreferencePage extends PreferencePage implements IW
     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.setPreferencePage(this);
+    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.setPreferencePage(this);
+    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.setPreferencePage(this);
+    apacheStartBFE.setPage(this);
     apacheStartBFE.setPreferenceStore(getPreferenceStore());
     apacheStartBFE.load();
 
@@ -137,48 +145,60 @@ public class PHPExternalToolsPreferencePage extends PreferencePage implements IW
     new Label(apacheSettingsGroup, SWT.NONE);
     apacheStartSFE = new StringFieldEditor(ExternalToolsPlugin.APACHE_START_PREF, PHPPreferencesMessages
         .getString("PHPBasePreferencePage.apacheGroup.start"), apacheSettingsGroup);
-    apacheStartSFE.setPreferencePage(this);
+    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.setPreferencePage(this);
+    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.setPreferencePage(this);
+    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.setPreferencePage(this);
+    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.setPreferencePage(this);
+    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.setPreferencePage(this);
+    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.setPreferencePage(this);
+    phpRunFFE.setPage(this);
     phpRunFFE.setPreferenceStore(getPreferenceStore());
     phpRunFFE.load();
 
@@ -194,7 +214,7 @@ public class PHPExternalToolsPreferencePage extends PreferencePage implements IW
 
     mysqlStartBFE = new BooleanFieldEditor(ExternalToolsPlugin.MYSQL_START_BACKGROUND, PHPPreferencesMessages
         .getString("PHPBasePreferencePage.mySQLGroup.start_background"), mySQLSettingsGroup);
-    mysqlStartBFE.setPreferencePage(this);
+    mysqlStartBFE.setPage(this);
     mysqlStartBFE.setPreferenceStore(getPreferenceStore());
     mysqlStartBFE.load();
     new Label(mySQLSettingsGroup, SWT.NONE);
@@ -202,36 +222,36 @@ public class PHPExternalToolsPreferencePage extends PreferencePage implements IW
 
     mySQLCommandSFE = new StringFieldEditor(ExternalToolsPlugin.MYSQL_PREF, PHPPreferencesMessages
         .getString("PHPBasePreferencePage.mySQLGroup.command"), mySQLSettingsGroup);
-    mySQLCommandSFE.setPreferencePage(this);
+    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.setPreferencePage(this);
+    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.setPreferencePage(this);
+    externalParserSFE.setPage(this);
     externalParserSFE.setPreferenceStore(getPreferenceStore());
     externalParserSFE.load();
-    
+
     return composite;
   }
 }
\ No newline at end of file