Package org.eclipse.datatools.connectivity.drivers.models

Examples of org.eclipse.datatools.connectivity.drivers.models.TemplateDescriptor


      // Prompt for new driver instance
      if (driverInstance == null) {

        TemplateDescriptor[] templates = TemplateDescriptor.getDriverTemplateDescriptors();
        TemplateDescriptor driverTemplate = null;

        if (templates != null) {
          for (TemplateDescriptor temp : templates) {
            String templateID = temp.getId();
            if (templateID.contains(descriptor.getDriverTemplateIdentifier())) {
              driverTemplate = temp;
              break;
            }
          }
        }

        if (driverTemplate != null) {
          IPropertySet properties = new PropertySetImpl(descriptor.getDriverName(), driverTemplate.getName());
          Properties props = new Properties();
          props.setProperty(IDriverMgmtConstants.PROP_DEFN_JARLIST, Messages.DataToolsTunnelAction_PROP_REPLACE);

          props.setProperty(IDriverMgmtConstants.PROP_DEFN_TYPE, driverTemplate.getId());

          // Must set the properties as the driver dialogue
          // throws exceptions if all properties are not set with
          // values
          // Properties get set again later regardless if a driver
          // instance
          // was created or not
          setProperties(props, tunnelDescriptor);

          properties.setBaseProperties(props);

          Shell shell = PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
          if (shell != null) {
            DriverDialog jdbcDriverDialog = new DriverDialog(shell, driverTemplate.getParentCategory());

            jdbcDriverDialog.setPropertySet(properties);
            jdbcDriverDialog.setEditMode(true);
            jdbcDriverDialog.setIsEditable(true);
View Full Code Here

TOP

Related Classes of org.eclipse.datatools.connectivity.drivers.models.TemplateDescriptor

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.