X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/views/browser/BrowserView.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/views/browser/BrowserView.java index a5171dc..7363fd9 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/views/browser/BrowserView.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/views/browser/BrowserView.java @@ -9,6 +9,12 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ package net.sourceforge.phpeclipse.views.browser; +import net.sourceforge.phpeclipse.webbrowser.internal.WebBrowser; +import net.sourceforge.phpeclipse.webbrowser.internal.WebBrowserUIPlugin; +import net.sourceforge.phpeclipse.webbrowser.internal.WebBrowserUtil; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.browser.Browser; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.part.ViewPart; /** @@ -20,7 +26,7 @@ import org.eclipse.ui.part.ViewPart; */ public class BrowserView extends ViewPart { public final static String ID_BROWSER = "net.sourceforge.phpeclipse.views.browser"; - PHPBrowser instance = null; + WebBrowser instance = null; /** * Create the example * @@ -28,9 +34,8 @@ public class BrowserView extends ViewPart { */ public void createPartControl(Composite frame) { try { - instance = new PHPBrowser(frame); - if (instance.browser==null) { - instance = null; + if (WebBrowserUtil.canUseInternalWebBrowser() ) { + instance = new WebBrowser(frame, true, true); } } catch(Exception e) { instance = null; @@ -58,12 +63,12 @@ public class BrowserView extends ViewPart { } public void setUrl(String url) { if (instance!=null) { - instance.browser.setUrl(url); + instance.setURL(url); } } public void refresh() { if (instance!=null) { - instance.browser.refresh(); + instance.refresh(); } } }