These two files can be modified to create new virtual hosts in the web server.
-_php_run_pref=/opt/lamp/php/php
-_external_parser=/opt/lamp/php/php -l -f {0}
+_php_run_pref=/opt/lampp/php/php
+_external_parser=/opt/lampp/php/php -l -f {0}
_mysql_run_pref=/opt/lampp/lampp startmysql
_apache_run_pref=/opt/lampp/lampp
_xampp_start_pref=/opt/lampp/lampp start
_mysql_start_background=true
_apache_start_background=true
_apache_stop_background=true
-_apache_restart_background=true
\ No newline at end of file
+_apache_restart_background=true
+__httpd_conf_path=/opt/lampp/apache/conf/httpd.conf
+__etc_hosts_path=/etc/hosts
\ No newline at end of file
-_php_run_pref=/opt/lamp/php/php
-_external_parser=/opt/lamp/php/php -l -f {0}
+_php_run_pref=/opt/lampp/php/php
+_external_parser=/opt/lampp/php/php -l -f {0}
_mysql_run_pref=/opt/lampp/lampp startmysql
_apache_run_pref=/opt/lampp/lampp
_xampp_start_pref=/opt/lampp/lampp start
_mysql_start_background=true
_apache_start_background=true
_apache_stop_background=true
-_apache_restart_background=true
\ No newline at end of file
+_apache_restart_background=true
+__httpd_conf_path=/opt/lampp/apache/conf/httpd.conf
+__etc_hosts_path=/etc/hosts
\ No newline at end of file
_mysql_start_background=true
_apache_start_background=true
_apache_stop_background=true
-_apache_restart_background=true
\ No newline at end of file
+_apache_restart_background=true
+__httpd_conf_path=c:\\xampp\\apache\\conf\\httpd.conf
+__etc_hosts_path=c:\\windows\\system32\\drivers\\etc\\hosts
\ No newline at end of file
public static final String APACHE_RESTART_BACKGROUND = "_apache_restart_background";
public static final String APACHE_RESTART_PREF = "__apache_restart";
+
+ public static final String HTTPD_CONF_PATH_PREF = "__httpd_conf_path";
+
+ public static final String ETC_HOSTS_PATH_PREF = "__etc_hosts_path";
public static final String SHOW_OUTPUT_IN_CONSOLE = "_show_output_in_console";
public class PHPEclipseBasePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
StringFieldEditor phpParserExtensionsSFE;
- StringFieldEditor xamppStartSFE;
- StringFieldEditor xamppStopSFE;
+ FileFieldEditor xamppStartSFE;
+ FileFieldEditor xamppStopSFE;
StringFieldEditor apacheStartSFE;
StringFieldEditor apacheStopSFE;
FileFieldEditor apacheRunFFE;
+ FileFieldEditor httpdConfFFE;
+
+ FileFieldEditor etcHostsFFE;
+
FileFieldEditor mysqlRunFFE;
FileFieldEditor phpRunFFE;
mySQLCommandSFE.loadDefault();
phpRunFFE.loadDefault();
apacheRunFFE.loadDefault();
+ httpdConfFFE.loadDefault();
+ etcHostsFFE.loadDefault();
mysqlRunFFE.loadDefault();
apacheStartBFE.loadDefault();
apacheStopBFE.loadDefault();
mySQLCommandSFE.store();
phpRunFFE.store();
apacheRunFFE.store();
+ httpdConfFFE.store();
+ etcHostsFFE.store();
mysqlRunFFE.store();
apacheStartBFE.store();
apacheSettingsGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
apacheSettingsGroup.setLayout(new GridLayout());
-
- xamppStartSFE = new StringFieldEditor(IPreferenceConstants.XAMPP_START_PREF, PHPPreferencesMessages
+ xamppStartSFE = new FileFieldEditor(IPreferenceConstants.XAMPP_START_PREF, PHPPreferencesMessages
.getString("PHPBasePreferencePage.apacheGroup.xampp_start"), apacheSettingsGroup);
xamppStartSFE.setPreferencePage(this);
xamppStartSFE.setPreferenceStore(getPreferenceStore());
xamppStartSFE.load();
- new Label(apacheSettingsGroup, SWT.NONE);
- xamppStopSFE = new StringFieldEditor(IPreferenceConstants.XAMPP_STOP_PREF, PHPPreferencesMessages
+ xamppStopSFE = new FileFieldEditor(IPreferenceConstants.XAMPP_STOP_PREF, PHPPreferencesMessages
.getString("PHPBasePreferencePage.apacheGroup.xampp_stop"), apacheSettingsGroup);
xamppStopSFE.setPreferencePage(this);
xamppStopSFE.setPreferenceStore(getPreferenceStore());
xamppStopSFE.load();
- new Label(apacheSettingsGroup, SWT.NONE);
apacheStartBFE = new BooleanFieldEditor(PHPeclipsePlugin.APACHE_START_BACKGROUND, PHPPreferencesMessages
.getString("PHPBasePreferencePage.apacheGroup.start_background"), apacheSettingsGroup);
apacheRunFFE.setPreferenceStore(getPreferenceStore());
apacheRunFFE.load();
+ httpdConfFFE = new FileFieldEditor(IPreferenceConstants.HTTPD_CONF_PATH_PREF, PHPPreferencesMessages
+ .getString("PHPBasePreferencePage.apacheGroup.httpdconf"), apacheSettingsGroup);
+ httpdConfFFE.setPreferencePage(this);
+ httpdConfFFE.setPreferenceStore(getPreferenceStore());
+ httpdConfFFE.load();
+
+ etcHostsFFE = new FileFieldEditor(IPreferenceConstants.ETC_HOSTS_PATH_PREF, PHPPreferencesMessages
+ .getString("PHPBasePreferencePage.apacheGroup.etchosts"), apacheSettingsGroup);
+ etcHostsFFE.setPreferencePage(this);
+ etcHostsFFE.setPreferenceStore(getPreferenceStore());
+ etcHostsFFE.load();
+
phpRunFFE = new FileFieldEditor(IPreferenceConstants.PHP_RUN_PREF, PHPPreferencesMessages
.getString("PHPBasePreferencePage.console.php"), apacheSettingsGroup);
phpRunFFE.setPreferencePage(this);
String operatingSystem = Platform.getOS();
// maxosx, linux, solaris, win32,...
try {
- InputStream is = getDefault().openStream(new Path("prefs/default_" + operatingSystem + ".properties"));
+ InputStream is = getDefault().openStream(
+ new Path("prefs/default_" + operatingSystem + ".properties"));
PropertyResourceBundle resourceBundle = new PropertyResourceBundle(is);
Enumeration enum = resourceBundle.getKeys();
String key;
key = (String)enum.nextElement();
store.setDefault(key, resourceBundle.getString( key ));
}
-// store.setDefault(PHP_RUN_PREF, resourceBundle.getString(PHP_RUN_PREF));
-// store.setDefault(EXTERNAL_PARSER_PREF, resourceBundle.getString(EXTERNAL_PARSER_PREF));
-// store.setDefault(MYSQL_RUN_PREF, resourceBundle.getString(MYSQL_RUN_PREF));
-// store.setDefault(APACHE_RUN_PREF, resourceBundle.getString(APACHE_RUN_PREF));
-//
-// store.setDefault(MYSQL_PREF, resourceBundle.getString(MYSQL_PREF));
-// store.setDefault(APACHE_START_PREF, resourceBundle.getString(APACHE_START_PREF));
-// store.setDefault(APACHE_STOP_PREF, resourceBundle.getString(APACHE_STOP_PREF));
-// store.setDefault(APACHE_RESTART_PREF, resourceBundle.getString(APACHE_RESTART_PREF));
-// store.setDefault(MYSQL_START_BACKGROUND, resourceBundle.getString(MYSQL_START_BACKGROUND));
-// store.setDefault(APACHE_START_BACKGROUND, resourceBundle.getString(APACHE_START_BACKGROUND));
-// store.setDefault(APACHE_STOP_BACKGROUND, resourceBundle.getString(APACHE_STOP_BACKGROUND));
-// store.setDefault(APACHE_RESTART_BACKGROUND, resourceBundle.getString(APACHE_RESTART_BACKGROUND));
} catch (Exception e) {
// no default properties found
if (operatingSystem.equals(Platform.OS_WIN32)) {
store.setDefault(APACHE_RUN_PREF, "c:\\apache\\apache.exe");
store.setDefault(XAMPP_START_PREF, "c:\\xampp\\xampp_start.exe");
store.setDefault(XAMPP_STOP_PREF, "c:\\xampp\\xampp_stop.exe");
+ store.setDefault(
+ ETC_HOSTS_PATH_PREF, "c:\\windows\\system32\\drivers\\etc\\hosts");
} else {
store.setDefault(PHP_RUN_PREF, "/apache/php/php");
store.setDefault(EXTERNAL_PARSER_PREF, "/apache/php/php -l -f {0}");
PHPBasePreferencePage.apacheGroup.xampp_start=XAMPP Start
PHPBasePreferencePage.apacheGroup.xampp_stop=XAMPP Stop
PHPBasePreferencePage.apacheGroup.run=Apache
+PHPBasePreferencePage.apacheGroup.httpdconf=httpd.conf
+PHPBasePreferencePage.apacheGroup.etchosts=etc/hosts
PHPBasePreferencePage.apacheGroup.start=Start Apache
PHPBasePreferencePage.apacheGroup.start_background=Run in background mode
PHPBasePreferencePage.apacheGroup.stop=Stop Apache