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 net.sourceforge.phpeclipse.webbrowser.internal.WebBrowser;
13 import net.sourceforge.phpeclipse.webbrowser.internal.WebBrowserUIPlugin;
14 import net.sourceforge.phpeclipse.webbrowser.internal.WebBrowserUtil;
16 import org.eclipse.swt.SWT;
17 import org.eclipse.swt.browser.Browser;
18 import org.eclipse.swt.widgets.Composite;
19 import org.eclipse.ui.part.ViewPart;
21 * <code>BrowserView</code> is a simple demonstration of the SWT Browser
22 * widget. It consists of a workbench view and tab folder where each tab in the
23 * folder allows the user to interact with a control.
27 public class BrowserView extends ViewPart {
28 public final static String ID_BROWSER = "net.sourceforge.phpeclipse.views.browser";
29 WebBrowser instance = null;
33 * @see ViewPart#createPartControl
35 public void createPartControl(Composite frame) {
37 if (WebBrowserUtil.canUseInternalWebBrowser() ) {
38 instance = new WebBrowser(frame, true, true);
40 } catch(Exception e) {
45 * Called when we must grab focus.
47 * @see org.eclipse.ui.part.ViewPart#setFocus
49 public void setFocus() {
55 * Called when the View is to be disposed
57 public void dispose() {
64 public void setUrl(String url) {
69 public void refresh() {