From ddf304c406c4f59e7acc7889ac1eac4cdbe4cad0 Mon Sep 17 00:00:00 2001 From: scorphus Date: Tue, 29 Jan 2008 23:02:41 +0000 Subject: [PATCH] Truly prevents the location update and the display of the "location not found" dialog box --- .../phpeclipse/phpmanual/views/PHPManualView.java | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net.sourceforge.phpeclipse.phpmanual/src/net/sourceforge/phpeclipse/phpmanual/views/PHPManualView.java b/net.sourceforge.phpeclipse.phpmanual/src/net/sourceforge/phpeclipse/phpmanual/views/PHPManualView.java index 2d637c7..ed0ef3e 100644 --- a/net.sourceforge.phpeclipse.phpmanual/src/net/sourceforge/phpeclipse/phpmanual/views/PHPManualView.java +++ b/net.sourceforge.phpeclipse.phpmanual/src/net/sourceforge/phpeclipse/phpmanual/views/PHPManualView.java @@ -98,16 +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(){ + browser.addLocationListener(new LocationAdapter() { public void changing(LocationEvent event) { String loc = event.location.toString(); - if(!loc.equalsIgnoreCase("about:blank") && !loc.startsWith("jar:")){ + 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]; showLinkReference(func); + event.doit = false; } } else if (loc.startsWith("jar:")) { // TODO find a better way of not showing the location error page. This is a cheap trick @@ -115,7 +116,6 @@ public class PHPManualView extends ViewPart implements INullSelectionListener, I // ed_mann browser.setText(""); } - event.doit = false; } }); parent.pack(); -- 1.7.1