/** * Get the ActionService by profile name. Clients need to check whether the profile exists before calling this method. * * @param profileName profile name * @return the UIComponentService */ public static ActionService getActionService(String profileName) { SQLDevToolsConfiguration conf = SQLToolsFacade.getConfigurationByProfileName(profileName); return conf.getActionService(); }
SQLDevToolsConfiguration config = SQLToolsFacade.getConfigurationByProfileName(profile); if (config != null)
/** * Returns all the connection profiles belonging to the database category. * @return connection profile name array */ public static String[] getSupportedDatabaseProfiles() { IConnectionProfile[] profiles = ProfileManager.getInstance().getProfiles(); ArrayList DBProfileNames = new ArrayList(); for (int i = 0; i < profiles.length; i++) { if (isDatabaseProfile(profiles[i])) { SQLDevToolsConfiguration conf = SQLToolsFacade.getConfigurationByProfileName(profiles[i].getName()); if (conf != null && !conf.equals(SQLDevToolsConfiguration.getDefaultInstance())) { DBProfileNames.add(profiles[i].getName()); } } } return (String[])DBProfileNames.toArray(new String[DBProfileNames.size()]); }
public static ProcIdentifier decode(String encoded) throws ParseException { Map map = decodeMap(encoded); String profile = (String)map.remove(PROP_PROFILE); String dbname = (String) map.remove(PROP_DBNAME); String typestr = (String) map.remove(PROP_TYPE); if (profile == null || dbname == null || typestr == null) { throw new ParseException(Messages.ProcIdentifierImpl_invalid_identifier_string, -1); } try { int type = Integer.parseInt(typestr); SQLDevToolsConfiguration config = SQLToolsFacade.getConfigurationByProfileName(profile); if (config != null) { DBHelper h = config.getDBHelper(); return h.getProcIdentifier(new DatabaseIdentifier(profile, dbname), type, map); } return new ProcIdentifierImpl(type, new DatabaseIdentifier(profile, dbname), map); } catch(NumberFormatException ex) { throw new ParseException(Messages.ProcIdentifierImpl_invalid_identifier_string, -1); } }
SQLDevToolsConfiguration config = SQLToolsFacade.getConfigurationByProfileName(proc.getDatabaseIdentifier().getProfileName()); buffer.append(config.getExecutionService().getDirectInvocationPrefix(proc.getType()));
SQLDevToolsConfiguration conf = SQLToolsFacade.getConfigurationByProfileName(_databaseIdentifier .getProfileName()); IDataServerLaunchPreferenceSection accessor = (IDataServerLaunchPreferenceSection) _sections.get(conf
buffer.append("{?="); int type = proc == null ? ProcIdentifier.TYPE_SP : proc.getType(); SQLDevToolsConfiguration config = SQLToolsFacade.getConfigurationByProfileName(proc.getDatabaseIdentifier().getProfileName()); buffer.append(config.getExecutionService().getCallableStatementPrefix(proc.getType())); String procName = null;
public void initializeFrom(ILaunchConfiguration configuration) { initUI(configuration); disableOptionTabIfNecessary(); if (_databaseIdentifier.getProfileName() != null && !_databaseIdentifier.getProfileName().trim().equals("")) //$NON-NLS-1$ { SQLDevToolsConfiguration conf = SQLToolsFacade.getConfigurationByProfileName(_databaseIdentifier .getProfileName()); IDataServerLaunchPreferenceSection accessor = (IDataServerLaunchPreferenceSection) _sections.get(conf .getDatabaseVendorDefinitionId().toString()); if (accessor == null) { return; } IPreferenceStore store = RoutineEditorActivator.getDefault().getPreferenceStore(); accessor.launchConfigurationInitialize(configuration, store); } }
public void widgetSelected(SelectionEvent event) { SQLDevToolsConfiguration conf = SQLToolsFacade.getConfigurationByProfileName(_databaseIdentifier .getProfileName()); IDataServerLaunchPreferenceSection accessor = (IDataServerLaunchPreferenceSection) _sections.get(conf .getDatabaseVendorDefinitionId().toString()); if (accessor != null) { accessor.getSectionComposite().getParent().setVisible(true); _noPageAvailableComp.setVisible(false); } else { _noPageAvailableComp.setVisible(true); } Iterator iter = _sections.values().iterator(); while (iter.hasNext()) { IDataServerLaunchPreferenceSection acc = (IDataServerLaunchPreferenceSection) iter.next(); if (acc != accessor) { acc.getSectionComposite().getParent().setVisible(false); } } ConnectionLevelOptionsTab.this.updateLaunchConfigurationDialog(); } });
/** * Checks the validity of the unquoted identifier and unquotes content if necessary. * * @param id original identifier * @return */ public static String unquoteWhenNecessary(String id, DatabaseIdentifier databaseIdentifier) { if (id == null || id.equals("") || databaseIdentifier == null) { return id; } String newId = SQLUtil.unquote(id); SQLDevToolsConfiguration conf = SQLToolsFacade.getConfigurationByProfileName(databaseIdentifier.getProfileName()); IIdentifierValidator validator = conf.getSQLService().getIdentifierValidator(); if (validator != null) { ValidatorMessage msg = validator.isValid(newId, IIdentifierValidator.IDENTIFIER_TYPE_UNKNOW, databaseIdentifier); if (msg == null || !ValidatorMessage.hasError(msg, ValidatorMessage.ERROR)) { return newId; } } return id; }
SQLDevToolsConfiguration conf = SQLToolsFacade.getConfigurationByProfileName(_databaseIdentifier .getProfileName()); IDataServerLaunchPreferenceSection accessor = (IDataServerLaunchPreferenceSection) _sections.get(conf
/** * Gets the <code>SQLDevToolsConfiguration</code> object. This is a utility method for * getConfigurationByProfileName(String profileName) and getDBFactoryByDBName(String dbName). It will try to use the * first parameter then the second. * * @param databaseIdentifier <code>DatabaseIdentifier</code> which contains connection profile name, can be null * @param id <code>DatabaseVendorDefinitionId</code> object represented by product name and version, can be null * @return <code>SQLDevToolsConfiguration</code> object */ public static SQLDevToolsConfiguration getConfiguration(DatabaseIdentifier databaseIdentifier, DatabaseVendorDefinitionId vendorId) { SQLDevToolsConfiguration f = null; if (databaseIdentifier != null) { // get DatabaseVendorDefinitionId from profile, then call getConfigurationByVendorIdentifier // this is to make sure we are using the REAL version f = getConfigurationByProfileName(databaseIdentifier.getProfileName()); } if (f == null && vendorId != null) { vendorId = getCanonicalDatabaseVendorDefinitionId(vendorId); f = getRegistry().getConfigurationByVendorIdentifier(vendorId); } if (f == null) { f = getDefaultConfiguration(); } return f; }
SQLDevToolsConfiguration conf = SQLToolsFacade.getConfigurationByProfileName(databaseIdentifier.getProfileName()); IIdentifierValidator validator = conf.getSQLService().getIdentifierValidator(); if (validator != null)
SQLDevToolsConfiguration config = SQLToolsFacade.getConfigurationByProfileName(proc.getDatabaseIdentifier().getProfileName()); buffer.append(config.getExecutionService().getCallableStatementPrefix(proc.getType())); String LINESEPARATOR = System.getProperty("line.separator");
SQLDevToolsConfiguration f = SQLToolsFacade.getConfigurationByProfileName(_databaseIdentifier .getProfileName()); ConnectionService conService = f.getConnectionService();
public Connection createConnection(String[] connId) throws SQLException, CoreException, NoSuchProfileException { // using connection pool for debugging may produce unexpected results SQLDevToolsConfiguration f = SQLToolsFacade .getConfigurationByProfileName(getDatabaseIdentifier() .getProfileName()); ConnectionService conService = f.getConnectionService(); Connection con = conService.createConnection(getDatabaseIdentifier() .getProfileName(), getDatabaseIdentifier().getDBname()); if (connId != null && connId.length == 1) { connId[0] = "0"; } return con; }
SQLDevToolsConfiguration conf = SQLToolsFacade.getConfigurationByProfileName(_comboProfile.getText()); UIComponentService componentService = conf.getUIComponentService(); if (componentService.supportsDMLDialog())
SQLDevToolsConfiguration configuration = SQLToolsFacade.getConfigurationByProfileName(_editor .getDatabaseIdentifier().getProfileName()); SQLTemplate template = configuration.getTemplateService().getIntelligenceTemplate(
SQLDevToolsConfiguration f = SQLToolsFacade.getConfigurationByProfileName(databaseIdentifier.getProfileName());
.getConfigurationByProfileName(databaseIdentifier .getProfileName()); DBHelper h = null;