Modified: 1764120 - Variables View doesn't show global vars in class context
[phpeclipse.git] / net.sourceforge.phpeclipse.webbrowser / src / net / sourceforge / phpeclipse / webbrowser / views / BrowserView.java
index 52f6ab4..852b24d 100644 (file)
  *******************************************************************************/
 package net.sourceforge.phpeclipse.webbrowser.views;
 
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.nio.charset.Charset;
+
 import net.sourceforge.phpeclipse.webbrowser.internal.WebBrowser;
 import net.sourceforge.phpeclipse.webbrowser.internal.WebBrowserUtil;
 
@@ -124,8 +128,16 @@ public class BrowserView extends ViewPart implements IShowInTarget {
                                setUrl(url);
                        } else {
                                Browser browser = fInstance.getBrowser();
-                               if (browser != null && !browser.getUrl().equals(url)) {
-                                       setUrl(url);
+                               if (browser != null) {
+                                       String browserUrl = browser.getUrl();
+                                       try {
+                                               browserUrl = URLDecoder.decode(browserUrl, Charset.defaultCharset().name());
+                                       } catch (UnsupportedEncodingException e) {
+                                               // e.printStackTrace();
+                                       }
+                                       if (!url.equals(browserUrl)) {
+                                               setUrl(url);
+                                       }
                                }
                        }
                }