Package org.eclipse.ui.browser

Examples of org.eclipse.ui.browser.IWebBrowser.openURL()


      if (currentRuntime != null) {
        URL rootURL = currentRuntime.getRootURL();
        if (rootURL != null) {
          IWebBrowser browser = WGADesignerPlugin.getDefault().createBrowser(BROWSER_ID);
          URL url = WGADesignStructureHelper.generateHttpURL(rootURL, contentStore, module);
          browser.openURL(url);
        }
      }
    } catch (Exception e) {
      WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), Display.getCurrent().getActiveShell(), "Unable to open tml module", "Unable to open tml module '" + module.getLocation() + "' in browser.", e);
    }
View Full Code Here


 
  public static void call(WGARuntime runtime) {
     try {
       if (runtime != null) {
         IWebBrowser browser = WGADesignerPlugin.getDefault().createBrowser(BROWSER_ID);
         browser.openURL(runtime.getContentManagerURL());
       }
    } catch (PartInitException e) {
      WGADesignerPlugin.getDefault().logError("Unable to open admin page.", e);
    }
  }
View Full Code Here

  public static void call(WGARuntime runtime) {
    try {
       if (runtime != null) {
         IWebBrowser browser = WGADesignerPlugin.getDefault().createBrowser(BROWSER_ID);
         browser.openURL(runtime.getAdminPageURL());
       }
    } catch (PartInitException e) {
      WGADesignerPlugin.getDefault().logError("Unable to open admin page.", e);
    }
  }
View Full Code Here

          MessageDialog.openWarning(getSite().getShell(), "Warning", "The current runtime is not started.");
          return;
        }
        WebApplication app = _webAppModel.getBeans().get(_tblWebApplications.getTable().getSelectionIndex());
        IWebBrowser browser = WGADesignerPlugin.getDefault().createBrowser(WGADesignerPlugin.DEFAULT_BROWSER_ID);
        browser.openURL(_model.getWgaRuntime().getDefaultURL(app.getContentStore()));
      } catch (PartInitException e1) {
        WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to open web application", e1);
      }
    } else {
      MessageDialog.openInformation(getSite().getShell(), "Selection required", "Please select a web application for this action first.");
View Full Code Here

  private void handleOpenInContentManager() {
    if (_tblWebApplications.getTable().getSelectionCount() > 0) {
      try {
        WebApplication app = _webAppModel.getBeans().get(_tblWebApplications.getTable().getSelectionIndex());
        IWebBrowser browser = WGADesignerPlugin.getDefault().createBrowser(OpenContentManager.BROWSER_ID);
        browser.openURL(_model.getWgaRuntime().getContentManagerURL(app.getContentStore()));
      } catch (PartInitException e1) {
        WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to open Content Manager", e1);
      }
    } else {
      MessageDialog.openInformation(getSite().getShell(), "Selection required", "Please select a web application for this action first.");
View Full Code Here

  private void handleOpenInAdminClient() {
    if (_tblWebApplications.getTable().getSelectionCount() > 0) {
      try {
        WebApplication app = _webAppModel.getBeans().get(_tblWebApplications.getTable().getSelectionIndex());
        IWebBrowser browser = WGADesignerPlugin.getDefault().createBrowser(OpenContentManager.BROWSER_ID);
        browser.openURL(_model.getWgaRuntime().getAdminClientURL(app.getContentStore()));
      } catch (PartInitException e1) {
        WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to open Admin Client", e1);
      }
    } else {
      MessageDialog.openInformation(getSite().getShell(), "Selection required", "Please select a web application for this action first.");
View Full Code Here

              ((EmbeddedWebBrowser) browser).setContext(fContext);
            else
              ((EmbeddedWebBrowser) browser).setContext(WebBrowserContext.createFrom(title));

            try {
              browser.openURL(link.toURL());
            } catch (MalformedURLException e) { //see Bug 1441
              ((EmbeddedWebBrowser) browser).openURL(link);
            }
          }
View Full Code Here

            }
          }

          /* Any other Web Browser Support */
          else
            browser.openURL(link.toURL());
        } catch (PartInitException e) {
          Activator.getDefault().getLog().log(e.getStatus());
        } catch (MalformedURLException e) {
          Activator.getDefault().getLog().log(Activator.getDefault().createErrorStatus(e.getMessage(), e));
        }
View Full Code Here

    private static void handleUrlClick(final String urlStr) {
        try {
            IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
            IWebBrowser externalBrowser = support.getExternalBrowser();
            if(externalBrowser != null){
                externalBrowser.openURL(new URL(urlStr));
            } else {
                IWebBrowser browser = support.createBrowser(urlStr);
                if(browser != null){
                    browser.openURL(new URL(urlStr));
                }
View Full Code Here

            if(externalBrowser != null){
                externalBrowser.openURL(new URL(urlStr));
            } else {
                IWebBrowser browser = support.createBrowser(urlStr);
                if(browser != null){
                    browser.openURL(new URL(urlStr));
                }
            }
        } catch (PartInitException e) {
            BytecodeOutlinePlugin.error("Failed to open url " + urlStr, e);
        } catch (MalformedURLException 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.