Search in sources :

Example 1 with DBGResolver

use of org.jkiss.dbeaver.debug.DBGResolver in project dbeaver by dbeaver.

the class DebugCore method resolveDatabaseContext.

public static Map<String, Object> resolveDatabaseContext(DBSObject databaseObject) {
    Map<String, Object> result = new HashMap<String, Object>();
    if (databaseObject == null) {
        return result;
    }
    DBPDataSource dataSource = databaseObject.getDataSource();
    if (dataSource == null) {
        return result;
    }
    DBGResolver finder = Adapters.adapt(dataSource.getContainer(), DBGResolver.class);
    if (finder == null) {
        return result;
    }
    Map<String, Object> context = finder.resolveContext(databaseObject);
    result.putAll(context);
    return result;
}
Also used : DBGResolver(org.jkiss.dbeaver.debug.DBGResolver) HashMap(java.util.HashMap) DBSObject(org.jkiss.dbeaver.model.struct.DBSObject) DBPDataSource(org.jkiss.dbeaver.model.DBPDataSource)

Aggregations

HashMap (java.util.HashMap)1 DBGResolver (org.jkiss.dbeaver.debug.DBGResolver)1 DBPDataSource (org.jkiss.dbeaver.model.DBPDataSource)1 DBSObject (org.jkiss.dbeaver.model.struct.DBSObject)1