X-Git-Url: http://git.phpeclipse.com diff --git a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/httpquery/AbstractHTTPQueryAction.java b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/httpquery/AbstractHTTPQueryAction.java index 32e155c..db83d2c 100644 --- a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/httpquery/AbstractHTTPQueryAction.java +++ b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/actions/httpquery/AbstractHTTPQueryAction.java @@ -35,24 +35,25 @@ public abstract class AbstractHTTPQueryAction implements IEditorActionDelegate { public void run(IAction action) { String selection = findSelectedText(); - if (selection != null && selection.trim().length() > 0) { - URL url; - IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); - if (window != null) { - IWorkbenchPage page = window.getActivePage(); - try { - IViewPart part = page.findView(BrowserView.ID_BROWSER); - if (part == null) { - part = page.showView(BrowserView.ID_BROWSER); - } else { - page.bringToTop(part); - } - String urlStr = getUrl(selection); - if (urlStr != null && !urlStr.equals("")) { - ((BrowserView) part).setUrl(urlStr); - } - } catch (Exception e) { + if (selection == null || selection.trim().length() == 0) { + selection = ""; + } + URL url; + IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + if (window != null) { + IWorkbenchPage page = window.getActivePage(); + try { + IViewPart part = page.findView(BrowserView.ID_BROWSER); + if (part == null) { + part = page.showView(BrowserView.ID_BROWSER); + } else { + page.bringToTop(part); + } + String urlStr = getUrl(selection); + if (urlStr != null && !urlStr.equals("")) { + ((BrowserView) part).setUrl(urlStr); } + } catch (Exception e) { } } }