//TODO 2. Support printing: waiting on eclipse bug 47937/44823.
package net.sourceforge.phpeclipse.webbrowser.internal;
-import java.util.*;
+import java.util.Iterator;
import net.sourceforge.phpeclipse.webbrowser.IURLMap;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.browser.CloseWindowListener;
+import org.eclipse.swt.browser.LocationEvent;
+import org.eclipse.swt.browser.LocationListener;
+import org.eclipse.swt.browser.OpenWindowListener;
+import org.eclipse.swt.browser.ProgressEvent;
+import org.eclipse.swt.browser.ProgressListener;
+import org.eclipse.swt.browser.StatusTextEvent;
+import org.eclipse.swt.browser.StatusTextListener;
+import org.eclipse.swt.browser.TitleEvent;
+import org.eclipse.swt.browser.TitleListener;
+import org.eclipse.swt.browser.WindowEvent;
import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.events.*;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.swt.browser.*;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.ProgressBar;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.ui.PlatformUI;
public class WebBrowser extends Composite {
protected Composite toolbarComp;
setLayout(layout);
setLayoutData(new GridData(GridData.FILL_BOTH));
clipboard = new Clipboard(parent.getDisplay());
- WorkbenchHelp.setHelp(this, ContextIds.WEB_BROWSER);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, ContextIds.WEB_BROWSER);
if (showToolbar) {
toolbarComp = new Composite(this, SWT.NONE);
}
});
combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- WorkbenchHelp.setHelp(combo, ContextIds.WEB_BROWSER_URL);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(combo, ContextIds.WEB_BROWSER_URL);
ToolBar toolbar = new ToolBar(top, SWT.FLAT);
fillToolBar(toolbar);
forward.setEnabled(browser.isForwardEnabled());
}
- WorkbenchHelp.setHelp(browser, ContextIds.WEB_BROWSER_WEB);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(browser, ContextIds.WEB_BROWSER_WEB);
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.verticalAlignment = GridData.FILL;
}
/**
- *
+ *
*/
protected void addBrowserListeners() {
if (showStatusbar) {
/**
* Return the underlying browser control.
- *
+ *
* @return org.eclipse.swt.browser.Browser
*/
public Browser getBrowser() {
}
/**
- *
+ *
*/
protected void forward() {
browser.forward();
}
/**
- *
+ *
*/
protected void back() {
browser.back();
}
/**
- *
+ *
*/
protected void stop() {
browser.stop();
}
/**
- *
+ *
*/
protected void navigate(String url) {
Trace.trace(Trace.FINER, "Navigate: " + url);
}
/**
- *
+ *
*/
public void dispose() {
super.dispose();
/**
* Populate the toolbar.
- *
+ *
* @param toolbar
* org.eclipse.swt.widgets.ToolBar
*/
/**
* Returns true if the homepage is currently being displayed.
- *
+ *
* @return boolean
*/
protected boolean isHome() {