private Properties getModelConnectionProperties(ModelResource mr) { try { if (ModelIdentifier.isRelationalSourceModel(mr)) { IConnectionInfoProvider provider = null; try { provider = getProvider(mr); } catch (Exception e) { // If provider throws exception its OK because some models may not have connection info. } if (provider != null) { Properties properties = provider.getProfileProperties(mr); // ConnectionProperties(mr); Properties p2 = provider.getConnectionProperties(mr); String translatorName = provider.getTranslatorName(mr); for (Object key : p2.keySet()) { properties.put(key, p2.get(key)); } if (translatorName != null) { properties.put(getString("translatorKey"), translatorName); // $NON-NLS-1$ } if (properties != null && !properties.isEmpty()) { return properties; } } } } catch (CoreException e) { DatatoolsUiConstants.UTIL.log(e); } return null; }
private static String getString(final String id, final Object value) { return DatatoolsUiConstants.UTIL.getString(I18N_PREFIX + id, value); }
private static String getString(final String id) { return DatatoolsUiConstants.UTIL.getString(I18N_PREFIX + id); }