removing nasty hack to keep the error page from displaying. Scorphus has applied...
[phpeclipse.git] / net.sourceforge.phpeclipse.phpmanual / src / net / sourceforge / phpeclipse / phpmanual / views / PHPManualView.java
index 8c8123a..984fcd8 100644 (file)
@@ -98,20 +98,17 @@ public class PHPManualView extends ViewPart implements INullSelectionListener, I
         */
        public void createPartControl(Composite parent) {
                browser = new Browser(parent, SWT.NONE);
-               browser.addLocationListener(new LocationAdapter(){
-                       public void changing(LocationEvent event){
+               browser.addLocationListener(new LocationAdapter() {
+                       public void changing(LocationEvent event) {
                                String loc = event.location.toString();
-                               if(!loc.equalsIgnoreCase("about:blank")){
-                                       String func = loc.replace("file:///", "");
+                               if(!loc.equalsIgnoreCase("about:blank") && !loc.startsWith("jar:")) {
+                                       String func = loc.replaceAll("file:///", "");
                                        func = func.replaceAll("#.+$", "");
                                        String[] afunc = loc.split("\\.");
                                        if(!afunc[1].equalsIgnoreCase(lastOccurrence)) {
                                                lastOccurrence = afunc[1];
-                                               // TODO find a better way of not showing the location error page. This is a cheap trick
-                                               // to keep the page from showing.
-                                               // ed_mann
-                                               browser.setText("<html></html>");
                                                showLinkReference(func);
+                                               event.doit = false;
                                        }
                                }
                        }