use of org.jkiss.dbeaver.registry.driver.RemoteNativeClientLocation in project dbeaver by dbeaver.
the class ClientHomesPanel method loadHomes.
public void loadHomes(DBPDriver driver) {
homesTable.removeAll();
this.driver = driver;
selectHome(null);
DBPNativeClientLocationManager clientManager = this.driver.getNativeClientManager();
if (clientManager == null) {
// $NON-NLS-1$ //$NON-NLS-2$
log.debug("Client manager is not supported by driver '" + driver.getName() + "'");
}
Set<DBPNativeClientLocation> providedHomes = new LinkedHashSet<>();
if (clientManager != null) {
providedHomes.addAll(clientManager.findLocalClientLocations());
}
Set<DBPNativeClientLocation> allHomes = new LinkedHashSet<>();
allHomes.addAll(driver.getNativeClientLocations());
allHomes.addAll(providedHomes);
for (DBPNativeClientLocation home : allHomes) {
TableItem item = createHomeItem(clientManager, home, home instanceof RemoteNativeClientLocation || providedHomes.contains(home));
if (item != null) {
HomeInfo homeInfo = (HomeInfo) item.getData();
if (homeInfo.isDefault) {
homesTable.setSelection(homesTable.indexOf(item));
selectHome(homeInfo);
}
}
}
}
use of org.jkiss.dbeaver.registry.driver.RemoteNativeClientLocation in project dbeaver by serge-rider.
the class ClientHomesPanel method loadHomes.
public void loadHomes(DBPDriver driver) {
homesTable.removeAll();
this.driver = driver;
selectHome(null);
DBPNativeClientLocationManager clientManager = this.driver.getNativeClientManager();
if (clientManager == null) {
// $NON-NLS-1$ //$NON-NLS-2$
log.debug("Client manager is not supported by driver '" + driver.getName() + "'");
}
Set<DBPNativeClientLocation> providedHomes = new LinkedHashSet<>();
if (clientManager != null) {
providedHomes.addAll(clientManager.findLocalClientLocations());
}
Set<DBPNativeClientLocation> allHomes = new LinkedHashSet<>();
allHomes.addAll(driver.getNativeClientLocations());
allHomes.addAll(providedHomes);
for (DBPNativeClientLocation home : allHomes) {
TableItem item = createHomeItem(clientManager, home, home instanceof RemoteNativeClientLocation || providedHomes.contains(home));
if (item != null) {
HomeInfo homeInfo = (HomeInfo) item.getData();
if (homeInfo.isDefault) {
homesTable.setSelection(homesTable.indexOf(item));
selectHome(homeInfo);
}
}
}
}
Aggregations