Search in sources :

Example 11 with IWebBrowser

use of org.eclipse.ui.browser.IWebBrowser in project bndtools by bndtools.

the class OpenBrowserActionDelegate method run.

public void run(IAction action) {
    try {
        IWorkbenchBrowserSupport browserSupport = window.getWorkbench().getBrowserSupport();
        IWebBrowser browser = browserSupport.createBrowser(6, null, null, null);
        browser.openURL(null);
    } catch (Exception e) {
        logger.logError("Error opening browser", e);
    }
}
Also used : IWorkbenchBrowserSupport(org.eclipse.ui.browser.IWorkbenchBrowserSupport) IWebBrowser(org.eclipse.ui.browser.IWebBrowser)

Aggregations

IWebBrowser (org.eclipse.ui.browser.IWebBrowser)11 IWorkbenchBrowserSupport (org.eclipse.ui.browser.IWorkbenchBrowserSupport)11 URL (java.net.URL)10 PartInitException (org.eclipse.ui.PartInitException)8 MalformedURLException (java.net.MalformedURLException)6 GridData (org.eclipse.swt.layout.GridData)4 GridLayout (org.eclipse.swt.layout.GridLayout)4 SelectionEvent (org.eclipse.swt.events.SelectionEvent)3 Button (org.eclipse.swt.widgets.Button)3 Composite (org.eclipse.swt.widgets.Composite)3 Label (org.eclipse.swt.widgets.Label)3 Hyperlink (com.novocode.naf.swt.custom.Hyperlink)2 Browser (org.eclipse.swt.browser.Browser)2 MouseEvent (org.eclipse.swt.events.MouseEvent)2 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)2 HyperlinkEvent (org.eclipse.ui.forms.events.HyperlinkEvent)2 FormText (org.eclipse.ui.forms.widgets.FormText)2 ConfigElementLabelProvider (org.bndtools.core.ui.ConfigElementLabelProvider)1 CategorisedPrioritisedConfigurationElementTreeContentProvider (org.bndtools.utils.eclipse.CategorisedPrioritisedConfigurationElementTreeContentProvider)1 IConfigurationElement (org.eclipse.core.runtime.IConfigurationElement)1