1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpeclipse.views.browser;
12 import org.eclipse.swt.SWT;
13 import org.eclipse.swt.browser.Browser;
14 import org.eclipse.swt.widgets.Composite;
15 import org.eclipse.ui.part.ViewPart;
16 import org.eclipse.webbrowser.internal.WebBrowser;
17 import org.eclipse.webbrowser.internal.WebBrowserUIPlugin;
18 import org.eclipse.webbrowser.internal.WebBrowserUtil;
20 * <code>BrowserView</code> is a simple demonstration of the SWT Browser
21 * widget. It consists of a workbench view and tab folder where each tab in the
22 * folder allows the user to interact with a control.
26 public class BrowserView extends ViewPart {
27 public final static String ID_BROWSER = "net.sourceforge.phpeclipse.views.browser";
28 WebBrowser instance = null;
32 * @see ViewPart#createPartControl
34 public void createPartControl(Composite frame) {
36 if (WebBrowserUtil.canUseInternalWebBrowser() ) {
37 instance = new WebBrowser(frame, true, true);
39 } catch(Exception e) {
44 * Called when we must grab focus.
46 * @see org.eclipse.ui.part.ViewPart#setFocus
48 public void setFocus() {
54 * Called when the View is to be disposed
56 public void dispose() {
63 public void setUrl(String url) {
68 public void refresh() {