* 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;
/**
*/
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();
}
}
}