/** * Returns an IControlConnection object which is used for all shared usage to that particular database. * * @param databaseIdentifier uniquely identifies a database * @return an IControlConnection object which is used for all shared usage to that particular database. */ public IControlConnection createControlConnection(DatabaseIdentifier databaseIdentifier) throws SQLException { return new AbstractControlConnection(EditorCorePlugin.getControlConnectionManager(), databaseIdentifier); }
/** * Returns a connection from the connection layer * * @param profileName * @param dbName * @return jdbc connection * @see #createConnection(IConnectionProfile, String) */ public static Connection createConnection(String profileName, String dbName) { try { Connection conn = createConnection(getProfile(profileName), dbName); return conn; } catch (NoSuchProfileException e) { EditorCorePlugin.getDefault().log(e); return null; } }
/** * This method is called upon plug-in activation */ public void start(BundleContext context) throws Exception { super.start(context); EditorCorePlugin.addConfigurationRegistryListener(new IConfigurationRegistryListener(){ public void configurationLoaded() { register(); } }); }
/** * Logs error message. * * @param message Error message. */ public void log(String message) { log(createErrorStatus(message)); }
private LaunchConfigurationParamsHistoryListener() { _configDir = EditorCorePlugin.getDefault().getStateLocation().append("params_config").toOSString(); File dir = new File(_configDir); if (!dir.exists()) { dir.mkdir(); } }
if (EditorCorePlugin.getDefault() == null) EditorCorePlugin.getDefault().log(e); if (EditorCorePlugin.getDefault() == null) EditorCorePlugin.getControlConnectionManager().fireDispose(profile.getName()); IControlConnection[] cs = EditorCorePlugin.getControlConnectionManager().getControlConnections(profile.getName()); if (cs != null && cs.length > 0)
public static synchronized IControlConnectionManager getControlConnectionManager() { if (getDefault()._controlConnectionManager == null) { ControlConnectionManager controlConnectionManager = new ControlConnectionManager(); getDefault()._controlConnectionManager = controlConnectionManager; RefreshManager.getInstance().AddListener(null, controlConnectionManager); } return getDefault()._controlConnectionManager; }
public IStatus createErrorStatus(String message) { return new Status(IStatus.ERROR, getBundle().getSymbolicName(), INTERNAL_ERROR, message, null); }
/** * Gets database factory registry that manages all database contributions * * @return */ private static SQLDevToolsConfigRegistry getRegistry() { return EditorCorePlugin.getDatabaseFactoryRegistry(); }
/** * Logs runtime status. * * @param status Runtime status. */ public void log(IStatus status) { getLog().log(status); }
EditorCorePlugin.getControlConnectionManager() .getOrCreateControlConnection(databaseIdentifier); EditorCorePlugin.getDefault().log(ce);
/** * Logs and exception. * * @param e Exception. */ public void log(Throwable e) { log(createErrorStatus(e)); }
public IStatus createErrorStatus(Throwable e) { return new Status(IStatus.ERROR, getBundle().getSymbolicName(), INTERNAL_ERROR, Messages.plugin_internal_error, e); }
public static void addConfigurationRegistryListener(IConfigurationRegistryListener listener) { getDatabaseFactoryRegistry().addConfigurationRegistryListener(listener); }
if (text == null || "".equals(text.trim())) IControlConnection controlconnection = EditorCorePlugin.getControlConnectionManager() .getOrCreateControlConnection(procid.getDatabaseIdentifier()); text = controlconnection.getProcSource(procid);
public static int getConnectionId(DatabaseIdentifier databaseIdentifier, Connection conn) { if (databaseIdentifier == null || conn == null) { return 0; } try { if (conn.isClosed()) { return 0; } } catch (SQLException e) { EditorCorePlugin.getDefault().log(e); } ConnectionService service = getConnectionService(databaseIdentifier); return service.getConnectionId(databaseIdentifier, conn); }
/** * Logs an error message with an exception. * * @param e Exception. */ public void log(String message, Throwable e) { log(createErrorStatus(message, e)); }
public IStatus createErrorStatus(String message, Throwable e) { return new Status(IStatus.ERROR, getBundle().getSymbolicName(), INTERNAL_ERROR, message, e); }
con = EditorCorePlugin.getControlConnectionManager().getOrCreateControlConnection(databaseIdentifier); con = EditorCorePlugin.getControlConnectionManager().getControlConnection(databaseIdentifier);
EditorCorePlugin.getDefault().log(e); return null;