From: axelcl Date: Thu, 13 Oct 2005 18:38:40 +0000 (+0000) Subject: fixed bug #1263858 X-Git-Url: http://secure.phpeclipse.com fixed bug #1263858 --- diff --git a/net.sourceforge.phpeclipse.externaltools/prefs/default_linux.properties b/net.sourceforge.phpeclipse.externaltools/prefs/default_linux.properties index 47e56e1..edb24ac 100644 --- a/net.sourceforge.phpeclipse.externaltools/prefs/default_linux.properties +++ b/net.sourceforge.phpeclipse.externaltools/prefs/default_linux.properties @@ -5,7 +5,7 @@ _apache_run_pref=/opt/lampp/lampp _xampp_start_pref=/opt/lampp/lampp start _xampp_stop_pref=/opt/lampp/lampp stop __mysql_start=startmysql -__apache_start=startapache -c \"DocumentRoot \"{0}\"\" +__apache_start=startapache -c \"DocumentRoot {0}\" __apache_stop=stop __apache_restart=restart _mysql_start_background=true diff --git a/net.sourceforge.phpeclipse.externaltools/prefs/default_macosx.properties b/net.sourceforge.phpeclipse.externaltools/prefs/default_macosx.properties index 47e56e1..edb24ac 100644 --- a/net.sourceforge.phpeclipse.externaltools/prefs/default_macosx.properties +++ b/net.sourceforge.phpeclipse.externaltools/prefs/default_macosx.properties @@ -5,7 +5,7 @@ _apache_run_pref=/opt/lampp/lampp _xampp_start_pref=/opt/lampp/lampp start _xampp_stop_pref=/opt/lampp/lampp stop __mysql_start=startmysql -__apache_start=startapache -c \"DocumentRoot \"{0}\"\" +__apache_start=startapache -c \"DocumentRoot {0}\" __apache_stop=stop __apache_restart=restart _mysql_start_background=true diff --git a/net.sourceforge.phpeclipse.externaltools/prefs/default_win32.properties b/net.sourceforge.phpeclipse.externaltools/prefs/default_win32.properties index 251b611..5d8bcfd 100644 --- a/net.sourceforge.phpeclipse.externaltools/prefs/default_win32.properties +++ b/net.sourceforge.phpeclipse.externaltools/prefs/default_win32.properties @@ -4,8 +4,8 @@ _mysql_run_pref=c:\\xampp\\mysql\\bin\\mysqld-nt.exe _apache_run_pref=c:\\xampp\\apache\\bin\\apache.exe _xampp_start_pref=c:\\xampp\\xampp_start.exe _xampp_stop_pref=c:\\xampp\\xampp_stop.exe -__mysql_start=--standalone -__apache_start=-c \"DocumentRoot \"{0}\"\" +__mysql_start=--standalone +__apache_start=-c \"DocumentRoot {0}\" __apache_stop=-k shutdown __apache_restart=-k restart _mysql_start_background=true diff --git a/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStartApacheAction.java b/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStartApacheAction.java index d9f0f8d..ebe3de7 100644 --- a/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStartApacheAction.java +++ b/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStartApacheAction.java @@ -2,7 +2,7 @@ * Copyright (c) 2000, 2002 IBM Corp. and others. All rights reserved. This program and the accompanying materials are made * available under the terms of the Common Public License v1.0 which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html - * + * * Contributors: IBM Corporation - Initial implementation www.phpeclipse.de **********************************************************************************************************************************/ package net.sourceforge.phpdt.externaltools.actions; @@ -23,8 +23,11 @@ public class PHPStartApacheAction implements IWorkbenchWindowActionDelegate { protected IWorkbenchWindow activeWindow = null; public void run(IAction action) { + final IPreferenceStore webUIStore = WebUI.getDefault().getPreferenceStore(); + + String documentRoot = webUIStore.getString(WebUI.PHP_DOCUMENTROOT_PREF); final IPreferenceStore store = ExternalToolsPlugin.getDefault().getPreferenceStore(); - String documentRoot = store.getString(WebUI.PHP_DOCUMENTROOT_PREF); + // replace backslash with slash in the DocumentRoot under Windows documentRoot = documentRoot.replace('\\', '/'); String[] arguments = { documentRoot }; @@ -35,7 +38,7 @@ public class PHPStartApacheAction implements IWorkbenchWindowActionDelegate { /** * Executes an external progam and saves the LaunchConfiguration under external tools - * + * * @param command * external tools command name * @param executable diff --git a/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/variable/LocalhostExpander.java b/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/variable/LocalhostExpander.java index 9cf0788..857168b 100644 --- a/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/variable/LocalhostExpander.java +++ b/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/variable/LocalhostExpander.java @@ -1,6 +1,5 @@ package net.sourceforge.phpdt.externaltools.variable; -import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin; import net.sourceforge.phpeclipse.ui.WebUI; import org.eclipse.jface.preference.IPreferenceStore; @@ -14,8 +13,8 @@ import org.eclipse.jface.preference.IPreferenceStore; public class LocalhostExpander implements IVariableTextExpander { public String getText(String varTag, String varValue, ExpandVariableContext context) { - IPreferenceStore store = ExternalToolsPlugin.getDefault().getPreferenceStore(); - return store.getString(WebUI.PHP_LOCALHOST_PREF); + final IPreferenceStore webUIStore = WebUI.getDefault().getPreferenceStore(); + return webUIStore.getString(WebUI.PHP_LOCALHOST_PREF); } } diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/IPreferenceConstants.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/IPreferenceConstants.java index b3c6d00..1e88ded 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/IPreferenceConstants.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/IPreferenceConstants.java @@ -3,7 +3,7 @@ package net.sourceforge.phpeclipse.ui; public interface IPreferenceConstants { - public static final String PHP_BOOKMARK_DEFAULT = "_php_bookmark_default"; +// public static final String PHP_BOOKMARK_DEFAULT = "_php_bookmark_default"; public static final String PHP_LOCALHOST_PREF = "_php_localhost"; public static final String PHP_DOCUMENTROOT_PREF = "_php_documentroot"; public static final String PHP_INCLUDE_PATHS = "_php_include_paths"; diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java index 6c922f8..76ccbd5 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java @@ -8,7 +8,7 @@ * Contributors: * Christopher Lenz - initial implementation * - * $Id: WebUI.java,v 1.5 2005-09-25 16:29:45 axelcl Exp $ + * $Id: WebUI.java,v 1.6 2005-10-13 18:38:19 axelcl Exp $ */ package net.sourceforge.phpeclipse.ui; @@ -155,7 +155,7 @@ public class WebUI extends AbstractUIPlugin implements IPreferenceConstants { protected void initializeDefaultPreferences(IPreferenceStore store) { store.setDefault(PHP_LOCALHOST_PREF, "http://localhost"); store.setDefault(PHP_DOCUMENTROOT_PREF, getWorkspace().getRoot().getLocation().toString()); - store.setDefault(PHP_BOOKMARK_DEFAULT, ""); +// store.setDefault(PHP_BOOKMARK_DEFAULT, ""); store.setDefault(PHP_AUTO_PREVIEW_DEFAULT, "true"); store.setDefault(PHP_BRING_TO_TOP_PREVIEW_DEFAULT, "true"); diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/preferences/PHPMiscProjectPreferences.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/preferences/PHPMiscProjectPreferences.java index 480245a..40d9136 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/preferences/PHPMiscProjectPreferences.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/preferences/PHPMiscProjectPreferences.java @@ -10,7 +10,7 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; /** - * + * * This page will be added to the project's property page dialog when the * "Properties..." popup menu item is selected */ @@ -25,36 +25,36 @@ public class PHPMiscProjectPreferences extends FieldEditorOverlayPage } /* * (non-Javadoc) - * + * * @see com.bdaum.overlayPages.FieldEditorOverlayPage#getPageId() */ protected String getPageId() { return PREF_ID; } - + protected void createFieldEditors() { Composite composite = getFieldEditorParent(); - + addField(new StringFieldEditor(IPreferenceConstants.PHP_LOCALHOST_PREF, PHPPreferencesMessages.getString("PHPMiscProjectPreferences.localhost"), composite)); - addField(new StringFieldEditor(IPreferenceConstants.PHP_BOOKMARK_DEFAULT, - PHPPreferencesMessages.getString("PHPMiscProjectPreferences.bookmark"), - composite)); +// addField(new StringFieldEditor(IPreferenceConstants.PHP_BOOKMARK_DEFAULT, +// PHPPreferencesMessages.getString("PHPMiscProjectPreferences.bookmark"), +// composite)); addField(new StringFieldEditor(IPreferenceConstants.PHP_DOCUMENTROOT_PREF, PHPPreferencesMessages.getString("PHPMiscProjectPreferences.documentroot"), - composite)); - + composite)); + PathEditor pe = new PathEditor(IPreferenceConstants.PHP_INCLUDE_PATHS, PHPPreferencesMessages.getString("PHPMiscProjectPreferences.include_paths"), "Choose Path...", composite); addField(pe); - - - + + + //if (!isPropertyPage)) { - // + // //} } /* (non-Javadoc)