Examples of IWebBrowser


Examples of org.eclipse.ui.browser.IWebBrowser

    try {           
      WGARuntime currentRuntime = TomcatUtils.getInstance().getCurrentRuntime();
      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

Examples of org.eclipse.ui.browser.IWebBrowser

  }
 
  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

Examples of org.eclipse.ui.browser.IWebBrowser

  }

  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

Examples of org.eclipse.ui.browser.IWebBrowser

        if (!TomcatUtils.getInstance().isRunning(_model.getWgaRuntime()) || !TomcatUtils.getInstance().acceptRequests()) {
          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

Examples of org.eclipse.ui.browser.IWebBrowser

 
  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

Examples of org.eclipse.ui.browser.IWebBrowser

 
  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

Examples of org.eclipse.ui.browser.IWebBrowser

   */
  public IWebBrowser createBrowser(final String browserId) {
    Assert.isNotNull(browserId);

    /* Create WebBrowser and return */
    return new IWebBrowser() {
      private IEditorPart fBrowserView;

      /*
       * @see org.eclipse.ui.browser.IWebBrowser#openURL(java.net.URL)
       */
 
View Full Code Here

Examples of org.eclipse.ui.browser.IWebBrowser

  @SuppressWarnings("unused")
  public IWebBrowser createBrowser(final String browserId) throws PartInitException {
    Assert.isNotNull(browserId);

    /* Create WebBrowser and return */
    return new IWebBrowser() {
      private IEditorPart fBrowserView;

      /*
       * @see org.eclipse.ui.browser.IWebBrowser#openURL(java.net.URL)
       */
 
View Full Code Here

Examples of org.eclipse.ui.browser.IWebBrowser

        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);
            else
              ((EmbeddedWebBrowser) browser).setContext(WebBrowserContext.createFrom(title));

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

          /* 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

Examples of org.eclipse.ui.browser.IWebBrowser

    }

    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));
                }
            }
        } 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.