import com.quantum.adapters.AdapterFactory;
import com.quantum.adapters.DriverInfo;
import com.quantum.model.Bookmark;
+import com.quantum.model.BookmarkCollection;
+import com.quantum.model.JDBCDriver;
import com.quantum.view.bookmark.TreeNode;
import org.eclipse.swt.SWT;
int index = this.type.getSelectionIndex();
bookmark.setType(this.adapters[index].getDriverType());
bookmark.setConnect(this.jdbcURL.getText());
- bookmark.setDriver(this.driverName.getText());
- bookmark.setDriverFile(this.driverPath.getText());
+ JDBCDriver jdbcDriver = BookmarkCollection.getInstance().findDriver(
+ this.driverName.getText(), this.driverPath.getText());
+ bookmark.setJDBCDriver(jdbcDriver);
if (this.autoCommit.getSelectionIndex() >= 0)
bookmark.setAutoCommitPreference(this.autoCommit.getItem(this.autoCommit.getSelectionIndex()));
return super.performOk();
else if (bookmark.getAutoCommitPreference().equals(IQuantumConstants.autoCommitSaved))
this.autoCommit.select(2);
- this.driverName.setText(bookmark.getDriver());
+ this.driverName.setText(bookmark.getJDBCDriver().getClassName());
this.jdbcURL.setText(bookmark.getConnect());
- this.driverPath.setText(bookmark.getDriverFile());
+ this.driverPath.setText(bookmark.getJDBCDriver().getJarFileName());
}
}