Examples of IWorkbenchBrowserSupport


Examples of org.eclipse.ui.browser.IWorkbenchBrowserSupport

    BusyIndicator.showWhile(null, new Runnable() {
      public void run() {
        URL helpSystemUrl = PlatformUI.getWorkbench().getHelpSystem()
            .resolve(url.toExternalForm(), true);
        try {
          IWorkbenchBrowserSupport browserSupport = PlatformUI
              .getWorkbench().getBrowserSupport();
          IWebBrowser browser;
          if (useExternalBrowser)
            browser = browserSupport.getExternalBrowser();
          else
            browser = browserSupport.createBrowser(null);
          browser.openURL(helpSystemUrl);
        } catch (PartInitException ex) {
          // XXX: show dialog?
          //                    PHPUiPlugin.logErrorStatus("Opening Javadoc failed", ex.getStatus());
        }
View Full Code Here

Examples of org.eclipse.ui.browser.IWorkbenchBrowserSupport

    link
        .setText(Messages.OldDebuggerWarningDialog_4);
    link.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        try {
          IWorkbenchBrowserSupport browserSupport = PlatformUI
              .getWorkbench().getBrowserSupport();
          IWebBrowser browser = browserSupport.getExternalBrowser();
          browser
              .openURL(new URL(
                  "http://www.zend.com/en/products/studio/downloads")); //$NON-NLS-1$
        } catch (Exception e) {
        }
      }
    });
    link = new Link(composite, SWT.NONE);
    link.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    link
        .setText(Messages.OldDebuggerWarningDialog_6);
    link.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        try {
          IWorkbenchBrowserSupport browserSupport = PlatformUI
              .getWorkbench().getBrowserSupport();
          IWebBrowser browser = browserSupport.getExternalBrowser();
          browser.openURL(new URL(
              "http://www.zend.com/app-server/downloads")); //$NON-NLS-1$
        } catch (Exception e) {
        }
      }
View Full Code Here

Examples of org.eclipse.ui.browser.IWorkbenchBrowserSupport

  public void openUrl( String url ) {
    if( url == null ) {
      throw new NullPointerException( "url is null" );
    }
    IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
    try {
      IWebBrowser browser = support.createBrowser( BROWSER_STYLE, url, null, null );
      browser.openURL( new URL( url ) );
    } catch( MalformedURLException exception ) {
      throw new IllegalArgumentException( "Invalid URL: " + url );
    } catch( PartInitException exception ) {
      StatusManager.getManager().handle( exception.getStatus(), StatusManager.LOG );
View Full Code Here

Examples of org.eclipse.ui.browser.IWorkbenchBrowserSupport

      /* String */
      else if (object instanceof String)
        link = new URI(URIUtils.fastEncode((String) object));

      if (link != null && link.isAbsolute()) {
        IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
        try {
          IWebBrowser browser = browserSupport.createBrowser(WebBrowserView.EDITOR_ID);

          /* Our own Web Browser Support is used */
          if (browser instanceof EmbeddedWebBrowser) {
            if (fContext != null)
              ((EmbeddedWebBrowser) browser).setContext(fContext);
View Full Code Here

Examples of org.eclipse.ui.browser.IWorkbenchBrowserSupport

  private void showURL(final String user, final String url) {
    Display.getDefault().asyncExec(new Runnable() {
      public void run() {

        if (MessageDialog.openQuestion(null, Messages.URLShare_RECEIVED_URL_TITLE, NLS.bind(Messages.URLShare_RECEIVED_URL_MESSAGE, user, url))) {
          final IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
          IWebBrowser browser;
          try {
            browser = support.createBrowser(null);
            browser.openURL(new URL(url));
          } catch (final Exception e) {
            logError(Messages.URLShare_EXCEPTION_LOG_BROWSER, e);
          }
        }
View Full Code Here

Examples of org.eclipse.ui.browser.IWorkbenchBrowserSupport

    // get service
    final IServiceInfo serviceInfo = DiscoveryHandlerUtil.getActiveIServiceInfoChecked(event);
    final URI location = serviceInfo.getLocation();
   
    // open browser view or reuse existing if already open
    final IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
    try {
      final URL url = location.toURL();
      support.createBrowser(url.toExternalForm()).openURL(url);
    } catch (PartInitException e) {
      throw new ExecutionException(e.getMessage(), e);
    } catch (MalformedURLException e) {
      throw new ExecutionException(e.getMessage(), e);
    }
View Full Code Here

Examples of org.eclipse.ui.browser.IWorkbenchBrowserSupport

  public void activated(ID[] others) {
    if (!getContext().isGroupManager()) {
      Display.getDefault().asyncExec(new Runnable() {
        public void run() {
          IWorkbenchBrowserSupport support = PlatformUI
              .getWorkbench().getBrowserSupport();
          IWebBrowser browser;
          try {
            browser = support.createBrowser(null);
            browser.openURL(new URL(url));
          } catch (Exception e) {
            MessageDialog.openError(null, Messages.ShowURLSharedObject_MSGBOX_OPENURL_ERROR_TITLE, NLS
                .bind(Messages.ShowURLSharedObject_MSGBOX_OPENURL_ERROR_TEXT, e.getLocalizedMessage()));
            ClientPlugin.getDefault().getLog().log(
View Full Code Here

Examples of org.eclipse.ui.browser.IWorkbenchBrowserSupport

      }
    });
  }

  private void showURL(String string) {
    IWorkbenchBrowserSupport support = PlatformUI.getWorkbench()
        .getBrowserSupport();
    IWebBrowser browser;
    try {
      browser = support.createBrowser(null);
      browser.openURL(new URL(string));
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of org.eclipse.ui.browser.IWorkbenchBrowserSupport

    }
  }

  private static void openUrlInExternalBrowser(URL url) {
    try {
      IWorkbenchBrowserSupport support = PlatformUI.getWorkbench()
          .getBrowserSupport();
      support.getExternalBrowser().openURL(url);
    }
    catch (Exception e) {
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.