* IBM Corporation - initial API and implementation
*******************************************************************************/
package net.sourceforge.phpeclipse.views.browser;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;
+import org.eclipse.webbrowser.internal.WebBrowser;
+import org.eclipse.webbrowser.internal.WebBrowserUIPlugin;
+import org.eclipse.webbrowser.internal.WebBrowserUtil;
/**
* <code>BrowserView</code> is a simple demonstration of the SWT Browser
* widget. It consists of a workbench view and tab folder where each tab in the
*/
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
*
*/
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;
}
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();
}
}
}