|
Lines 54-59
Link Here
|
| 54 |
import org.eclipse.datatools.connectivity.ProfileManager; |
54 |
import org.eclipse.datatools.connectivity.ProfileManager; |
| 55 |
import org.eclipse.datatools.connectivity.drivers.DriverInstance; |
55 |
import org.eclipse.datatools.connectivity.drivers.DriverInstance; |
| 56 |
import org.eclipse.datatools.connectivity.drivers.DriverManager; |
56 |
import org.eclipse.datatools.connectivity.drivers.DriverManager; |
|
|
57 |
import org.eclipse.datatools.connectivity.drivers.DriverValidator; |
| 57 |
import org.eclipse.datatools.connectivity.internal.repository.IConnectionProfileRepository; |
58 |
import org.eclipse.datatools.connectivity.internal.repository.IConnectionProfileRepository; |
| 58 |
import org.osgi.framework.Bundle; |
59 |
import org.osgi.framework.Bundle; |
| 59 |
import org.osgi.framework.BundleException; |
60 |
import org.osgi.framework.BundleException; |
|
Lines 1317-1331
Link Here
|
| 1317 |
|
1318 |
|
| 1318 |
String defName = inName; |
1319 |
String defName = inName; |
| 1319 |
|
1320 |
|
| 1320 |
DriverInstance driverInstance = DriverManager.getInstance().getDriverInstanceByID(driverTemplateID); |
1321 |
DriverInstance[] dilist = DriverManager.getInstance().getDriverInstancesByTemplate(driverTemplateID); |
| 1321 |
if (driverInstance != null) { |
1322 |
if (dilist != null && dilist.length > 0 ) { |
| 1322 |
// jarList is not required, so it can be null, which isn't going to match any jarList coming back from a DriverInstance |
1323 |
DriverInstance driverInstance = dilist[0]; |
| 1323 |
if ((jarList == null) || (driverInstance.getJarList().equals(jarList))) { |
1324 |
if (driverInstance != null) { |
| 1324 |
return driverInstance; |
1325 |
// jarList is not required, so it can be null, which isn't going to match any jarList coming back from a DriverInstance |
|
|
1326 |
if ((jarList == null) || (driverInstance.getJarList().equals(jarList))) { |
| 1327 |
DriverValidator validator = new DriverValidator(driverInstance); |
| 1328 |
if (validator.isValid()) { |
| 1329 |
if (driverInstance.getName().equals(inName)) { |
| 1330 |
return driverInstance; |
| 1331 |
} |
| 1332 |
} |
| 1333 |
} |
| 1334 |
defName = determineUniqueDriverName(defName); |
| 1335 |
|
| 1325 |
} |
1336 |
} |
| 1326 |
|
|
|
| 1327 |
defName = determineUniqueDriverName(defName); |
| 1328 |
|
| 1329 |
} |
1337 |
} |
| 1330 |
return DriverManager.getInstance() |
1338 |
return DriverManager.getInstance() |
| 1331 |
.createNewDriverInstance( |
1339 |
.createNewDriverInstance( |