X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/externaltools/variable/UrlExpander.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/externaltools/variable/UrlExpander.java index 737d557..17cbdf5 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/externaltools/variable/UrlExpander.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/externaltools/variable/UrlExpander.java @@ -1,12 +1,13 @@ package net.sourceforge.phpdt.externaltools.variable; import net.sourceforge.phpeclipse.PHPeclipsePlugin; +import net.sourceforge.phpeclipse.ui.WebUI; import org.eclipse.core.runtime.IPath; import org.eclipse.jface.preference.IPreferenceStore; /** - * Expands a variable into the last opened PHP file + * Expands a variable into a localhost/documentRoot URL string *
* This class is not intended to be extended by clients. *
@@ -21,7 +22,7 @@ public class UrlExpander extends ResourceExpander { //implements IVariableTextEx } /** - * Returns a string representation of the path to a file or directory + * Returns a string representation to a localhost/documentRoot URL * for the given variable tag and value ornull
.
*
* @see IVariableTextExpander#getText(String, String, ExpandVariableContext)
@@ -32,16 +33,13 @@ public class UrlExpander extends ResourceExpander { //implements IVariableTextEx
IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
String localhostURL = path.toString();
String lowerCaseFileName = localhostURL.toLowerCase();
- // fileName = "http://localhost"+fileName.replaceAll("c:", "");
- String documentRoot = store.getString(PHPeclipsePlugin.DOCUMENTROOT_PREF);
+ String documentRoot = store.getString(WebUI.PHP_DOCUMENTROOT_PREF);
documentRoot = documentRoot.replace('\\', '/');
documentRoot = documentRoot.toLowerCase();
if (lowerCaseFileName.startsWith(documentRoot)) {
localhostURL = localhostURL.substring(documentRoot.length());
- localhostURL = store.getString(PHPeclipsePlugin.LOCALHOST_PREF)+ localhostURL;
- System.out.println(localhostURL);
- // localhostURL = store.getString(PHPeclipsePlugin.LOCALHOST_PREF)+ localhostURL;// + localhostURL.replaceAll(documentRoot, "");
+ localhostURL = store.getString(WebUI.PHP_LOCALHOST_PREF)+ localhostURL;
}
return localhostURL;
}