Package de.innovationgate.eclipse.wgadesigner.models

Examples of de.innovationgate.eclipse.wgadesigner.models.WebApplication


    }

    public void init(IWorkbench workbench, IStructuredSelection selection) {
        WGARuntime runtime = null;
        if (selection.getFirstElement() instanceof WebApplication) {
            WebApplication app = (WebApplication) selection.getFirstElement();
            runtime = app.getRuntime();
            _webApplication = app.getContentStore().getKey();
        } else {               
            runtime = WGARuntime.fromSelection(selection);
        }
       
        if (runtime != null) {
View Full Code Here


    WGAConfiguration config;
    try {
      config = _model.getWgaRuntime().retrieveWGAConfig(false);     
      if (config != null) {
        for (ContentStore cs : config.getContentStores()) {
          WebApplication webApplication = new WebApplication();
          webApplication.setRuntime(_model.getWgaRuntime());
          webApplication.setContentStore(cs);
          apps.add(webApplication);         
        }
      }
    }  catch (Exception e) {
      WGADesignerPlugin.getDefault().logError("Unable to create web application model.", e);
View Full Code Here

        // check if runtime is started
        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

  private void handleOpenInDesignEditor() {
   
   
    if (_tblWebApplications.getTable().getSelectionCount() > 0) {
      try {           
        WebApplication app = _webAppModel.getBeans().get(_tblWebApplications.getTable().getSelectionIndex());           
        Map<String, IContainer> connectedDesigns;
        try {
          connectedDesigns = _model.getWgaRuntime().getConnectedDesignContainers();
          IContainer design = connectedDesigns.get(app.getContentStore().getKey())
          if (design !=null && design.exists()){
            WGADesignStructureHelper helper = new WGADesignStructureHelper(design);
            WorkbenchUtils.openEditor(Plugin.getDefault().getWorkbench(), helper.getSyncInfo(), ExternalResourceIDs.EDITOR_WGA_DESIGN);
          }
          else {
            MessageDialog.openWarning(getSite().getShell(), "Unable to determine design", "Unable to determine design for application '" + app.getContentStore().getKey() + "'.");   
          }         
        } catch (IncompatibleWGAConfigVersion e1) {
          WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to determine design", "Unable to determine design for application '" + app.getContentStore().getKey() + "'. WGA configuration is incompatible.", e1);
        } catch (IOException e1) {
          WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to determine design", "Unable to determine design for application '" + app.getContentStore().getKey() + "'. Cannot read WGA configuration.", e1);
        }                   
      } catch (Exception e1) {
        WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to open Design Editor", e1);
      }
    } else {
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

  }
 
  private void handleExportWebApplication() {
      if (_tblWebApplications.getTable().getSelectionCount() > 0) {
            try {
                WebApplication app = _webAppModel.getBeans().get(_tblWebApplications.getTable().getSelectionIndex());
                IStructuredSelection selection = new SingleStructuredSelection(app);
                WorkbenchUtils.openWizard(WGADesignerPlugin.getDefault().getWorkbench(), ResourceIDs.WIZARD_EXPORT_WGAAPPLICATION, selection);             
            } catch (Exception e) {
                WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to open export wizard for web application", e);
            }
View Full Code Here

TOP

Related Classes of de.innovationgate.eclipse.wgadesigner.models.WebApplication

Copyright © 2018 www.massapicom. 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.