提交 adc9723c 编写于 作者: J jurgen

Driver editor fix.

Former-commit-id: d57de522
上级 87be7075
......@@ -1112,8 +1112,14 @@ public class DriverDescriptor extends AbstractDescriptor implements DBPDriver
if (files != null) {
for (DriverFileInfo file : files) {
try (XMLBuilder.Element e2 = xml.startElement(RegistryConstants.TAG_FILE)) {
if (file.file == null) {
log.warn("File missing in " + file.id);
continue;
}
xml.addAttribute(RegistryConstants.ATTR_ID, file.id);
xml.addAttribute(RegistryConstants.ATTR_VERSION, file.version);
if (!CommonUtils.isEmpty(file.version)) {
xml.addAttribute(RegistryConstants.ATTR_VERSION, file.version);
}
xml.addAttribute(RegistryConstants.ATTR_PATH, file.file.getAbsolutePath());
}
}
......
......@@ -21,6 +21,9 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.*;
import org.jkiss.dbeaver.model.connection.DBPDriverDependencies;
......@@ -43,6 +46,7 @@ import java.util.List;
class DriverDownloadAutoPage extends DriverDownloadPage {
private Tree filesTree;
private Font boldFont;
DriverDownloadAutoPage() {
super("Automatic download", "Download driver files", null);
......@@ -85,6 +89,14 @@ class DriverDownloadAutoPage extends DriverDownloadPage {
createLinksPanel(composite);
boldFont = UIUtils.makeBoldFont(filesTree.getFont());
filesTree.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
UIUtils.dispose(boldFont);
}
});
setControl(composite);
}
......@@ -119,6 +131,7 @@ class DriverDownloadAutoPage extends DriverDownloadPage {
item.setText(0, library.getDisplayName());
item.setText(1, CommonUtils.notEmpty(library.getVersion()));
item.setText(2, CommonUtils.notEmpty(library.getDescription()));
item.setFont(1, boldFont);
totalItems++;
if (addDependencies(item, node)) {
item.setExpanded(true);
......
......@@ -632,7 +632,6 @@
<!-- Hadoop -->
<driver
id="gemfire_xd"
category="Hadoop"
label="Gemfire XD"
class="com.pivotal.gemfirexd.jdbc.ClientDriver"
sampleURL="jdbc:gemfirexd://{host}[:{port}]/"
......@@ -643,7 +642,6 @@
</driver>
<driver
id="apache_hive2"
category="Hadoop"
label="Apache Hive"
class="org.apache.hive.jdbc.HiveDriver"
sampleURL="jdbc:hive2://{host}[:{port}]/{database}"
......@@ -655,7 +653,6 @@
</driver>
<driver
id="apache_drill"
category="Hadoop"
label="Apache Drill"
class="org.apache.drill.jdbc.Driver"
sampleURL="jdbc:drill:zk={host}[;schema={database}]:{port}"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册