提交 1088a5b8 编写于 作者: J jurgen

Maven local repository

上级 84fbe383
......@@ -18,7 +18,6 @@
package org.jkiss.dbeaver.registry.maven;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
......
......@@ -84,9 +84,7 @@ public class MavenRepository
if (!url.endsWith("/")) url += "/";
this.url = url;
this.local = local;
if (!local) {
loadCache();
}
loadCache();
}
public void flushCache() {
......
......@@ -23,7 +23,6 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.jkiss.dbeaver.core.DBeaverUI;
import org.jkiss.dbeaver.registry.DriverDescriptor;
import org.jkiss.dbeaver.registry.DriverFileDescriptor;
......@@ -42,9 +41,9 @@ public class DriverDownloadDialog extends WizardDialog
private boolean doDownload = false;
DriverDownloadDialog(Shell shell, DriverDescriptor driver, List<DriverFileDescriptor> files, boolean forceDownload)
DriverDownloadDialog(Shell shell, DriverDescriptor driver, List<DriverFileDescriptor> files, boolean updateVersion, boolean forceDownload)
{
super(shell, new DriverDownloadWizard(driver, files, forceDownload));
super(shell, new DriverDownloadWizard(driver, files, updateVersion, forceDownload));
getWizard().init(DBeaverUI.getActiveWorkbenchWindow().getWorkbench(), null);
}
......@@ -116,7 +115,14 @@ public class DriverDownloadDialog extends WizardDialog
}
public static boolean downloadDriverFiles(Shell shell, DriverDescriptor driver, List<DriverFileDescriptor> files, boolean forceDownload) {
DriverDownloadDialog dialog = new DriverDownloadDialog(shell, driver, files, forceDownload);
DriverDownloadDialog dialog = new DriverDownloadDialog(shell, driver, files, false, forceDownload);
dialog.setMinimumPageSize(100, 100);
dialog.open();
return dialog.doDownload;
}
public static boolean updateDriverFiles(Shell shell, DriverDescriptor driver, List<DriverFileDescriptor> files, boolean forceDownload) {
DriverDownloadDialog dialog = new DriverDownloadDialog(shell, driver, files, true, forceDownload);
dialog.setMinimumPageSize(100, 100);
dialog.open();
return dialog.doDownload;
......
......@@ -36,14 +36,16 @@ public class DriverDownloadWizard extends Wizard implements IExportWizard {
private DriverDescriptor driver;
private List<DriverFileDescriptor> files;
private boolean updateVersion;
private boolean forceDownload;
private DriverDownloadPage downloadPage;
public DriverDownloadWizard(@NotNull DriverDescriptor driver, List<DriverFileDescriptor> files, boolean forceDownload) {
public DriverDownloadWizard(@NotNull DriverDescriptor driver, List<DriverFileDescriptor> files, boolean updateVersion, boolean forceDownload) {
this.driver = driver;
this.files = files;
this.updateVersion = updateVersion;
this.forceDownload = forceDownload;
setWindowTitle("Setup driver files");
setWindowTitle(updateVersion ? "Update driver files" : "Setup driver files");
setNeedsProgressMonitor(hasPredefinedFiles());
loadSettings();
}
......
......@@ -479,10 +479,7 @@ public class DriverEditDialog extends HelpEnabledDialog
updateVersionButton = UIUtils.createToolButton(libsControlGroup, CoreMessages.dialog_edit_driver_button_update_version, new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
// driver.updateFiles();
// DriverDownloadDialog.downloadDriverFiles(getShell(), driver, Collections.singletonList(lib), true);
DriverFileDescriptor selectedLib = getSelectedLibrary();
updateArtifactVersion(selectedLib);
DriverDownloadDialog.updateDriverFiles(getShell(), driver, libList, true);
}
});
......@@ -541,10 +538,6 @@ public class DriverEditDialog extends HelpEnabledDialog
libsTab.setControl(libsGroup);
}
private void updateArtifactVersion(DriverFileDescriptor lib) {
DriverDownloadDialog.downloadDriverFiles(getShell(), driver, Collections.singletonList(lib), true);
}
private void createParametersTab(TabFolder group)
{
Composite paramsGroup = new Composite(group, SWT.NONE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册