Remove String#replaceAll() with StringUtil#replaceAll() for 1.3 compatibility
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / actions / PHPEclipseShowAction.java
index 18b7858..3fbcb11 100644 (file)
@@ -88,24 +88,6 @@ public class PHPEclipseShowAction implements IObjectActionDelegate {
             // single file:
             IFile file = (IFile) resource;
           String localhostURL;
-//            IPath path = file.getFullPath();
-//
-//            String localhostURL = file.getLocation().toString();
-//            String lowerCaseFileName = localhostURL.toLowerCase();
-//            //       fileName = "http://localhost"+fileName.replaceAll("c:", "");
-//            String documentRoot = store.getString(PHPeclipsePlugin.DOCUMENTROOT_PREF);
-//            documentRoot = documentRoot.replace('\\', '/');
-//            documentRoot = documentRoot.toLowerCase();
-//
-//            if (lowerCaseFileName.startsWith(documentRoot)) {
-//              localhostURL = localhostURL.substring(documentRoot.length());
-//            } else {
-//              MessageDialog.openInformation(shell, "Wrong DocumentRoot", "Adjust DocumentRoot: " + documentRoot);
-//              return;
-//            }
-//
-//            localhostURL = store.getString(PHPeclipsePlugin.LOCALHOST_PREF) + localhostURL.replaceAll(documentRoot, "");
-
             if ((localhostURL=getLocalhostURL(store, (IFile) resource)) == null) {
               MessageDialog.openInformation(shell, "Couldn't create localhost URL", "Please configure your localhost and documentRoot");
               return;
@@ -154,7 +136,6 @@ public class PHPEclipseShowAction implements IObjectActionDelegate {
 
     String localhostURL = file.getLocation().toString();
     String lowerCaseFileName = localhostURL.toLowerCase();
-    //       fileName = "http://localhost"+fileName.replaceAll("c:", "");
     String documentRoot = store.getString(PHPeclipsePlugin.DOCUMENTROOT_PREF);
     documentRoot = documentRoot.replace('\\', '/');
     documentRoot = documentRoot.toLowerCase();
@@ -165,7 +146,7 @@ public class PHPEclipseShowAction implements IObjectActionDelegate {
       return null;
     }
 
-    return store.getString(PHPeclipsePlugin.LOCALHOST_PREF) + localhostURL.replaceAll(documentRoot, "");
+    return store.getString(PHPeclipsePlugin.LOCALHOST_PREF) + localhostURL; 
 
   }