Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
4051370f
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dbeaver
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4051370f
编写于
10月 17, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Version change
Former-commit-id:
bbf82209
上级
b316e260
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
29 addition
and
13 deletion
+29
-13
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/driver/DriverDependencies.java
...org/jkiss/dbeaver/registry/driver/DriverDependencies.java
+13
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/driver/DriverLibraryAbstract.java
.../jkiss/dbeaver/registry/driver/DriverLibraryAbstract.java
+4
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/driver/DriverLibraryMavenArtifact.java
...s/dbeaver/registry/driver/DriverLibraryMavenArtifact.java
+4
-5
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverDownloadAutoPage.java
...iss/dbeaver/ui/dialogs/driver/DriverDownloadAutoPage.java
+5
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverDownloadWizard.java
...jkiss/dbeaver/ui/dialogs/driver/DriverDownloadWizard.java
+1
-0
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/connection/DBPDriverLibrary.java
.../org/jkiss/dbeaver/model/connection/DBPDriverLibrary.java
+2
-1
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/driver/DriverDependencies.java
浏览文件 @
4051370f
...
...
@@ -30,12 +30,12 @@ import java.util.*;
*/
public
class
DriverDependencies
implements
DBPDriverDependencies
{
final
List
<
?
extends
DBPDriverLibrary
>
rootLibraries
;
final
List
<
DBPDriverLibrary
>
rootLibraries
;
final
List
<
DependencyNode
>
rootNodes
=
new
ArrayList
<>();
final
List
<
DependencyNode
>
libraryList
=
new
ArrayList
<>();
public
DriverDependencies
(
List
<?
extends
DBPDriverLibrary
>
rootLibraries
)
{
this
.
rootLibraries
=
rootLibraries
;
this
.
rootLibraries
=
new
ArrayList
<>(
rootLibraries
)
;
}
@Override
...
...
@@ -69,11 +69,12 @@ public class DriverDependencies implements DBPDriverDependencies
sb.append(lib).append("\n");
}
System.out.println(sb.toString());
*/
System.out.println("---------------------------");
for (DependencyNode node : rootNodes) {
dumpNode(node, 0);
}
*/
}
}
catch
(
IOException
e
)
{
throw
new
DBException
(
"IO error while resolving dependencies"
,
e
);
...
...
@@ -126,4 +127,13 @@ public class DriverDependencies implements DBPDriverDependencies
return
rootNodes
;
}
public
void
changeLibrary
(
DBPDriverLibrary
oldLibrary
,
DBPDriverLibrary
newLibrary
)
{
int
index
=
rootLibraries
.
indexOf
(
oldLibrary
);
if
(
index
==
-
1
)
{
rootLibraries
.
add
(
newLibrary
);
}
else
{
rootLibraries
.
add
(
index
,
newLibrary
);
rootLibraries
.
remove
(
oldLibrary
);
}
}
}
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/driver/DriverLibraryAbstract.java
浏览文件 @
4051370f
...
...
@@ -44,7 +44,7 @@ public abstract class DriverLibraryAbstract implements DBPDriverLibrary
protected
final
DriverDescriptor
driver
;
protected
final
FileType
type
;
protected
final
OSDescriptor
system
;
protected
String
path
;
protected
final
String
path
;
protected
boolean
custom
;
protected
boolean
disabled
;
...
...
@@ -111,9 +111,10 @@ public abstract class DriverLibraryAbstract implements DBPDriverLibrary
return
Collections
.
emptyList
();
}
@NotNull
@Override
public
void
set
Version
(
DBRProgressMonitor
monitor
,
@NotNull
String
version
)
throws
IOException
{
throw
new
IOException
(
"V
a
ersions are not supported"
);
public
DBPDriverLibrary
create
Version
(
DBRProgressMonitor
monitor
,
@NotNull
String
version
)
throws
IOException
{
throw
new
IOException
(
"Versions are not supported"
);
}
@NotNull
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/driver/DriverLibraryMavenArtifact.java
浏览文件 @
4051370f
...
...
@@ -44,7 +44,7 @@ public class DriverLibraryMavenArtifact extends DriverLibraryAbstract
public
static
final
String
PATH_PREFIX
=
"maven:/"
;
private
MavenArtifactReference
reference
;
private
final
MavenArtifactReference
reference
;
protected
MavenArtifactVersion
localVersion
;
public
DriverLibraryMavenArtifact
(
DriverDescriptor
driver
,
FileType
type
,
String
path
)
{
...
...
@@ -85,8 +85,9 @@ public class DriverLibraryMavenArtifact extends DriverLibraryAbstract
return
Collections
.
emptyList
();
}
@NotNull
@Override
public
void
set
Version
(
DBRProgressMonitor
monitor
,
@NotNull
String
version
)
throws
IOException
{
public
DBPDriverLibrary
create
Version
(
DBRProgressMonitor
monitor
,
@NotNull
String
version
)
throws
IOException
{
MavenArtifactReference
newReference
=
new
MavenArtifactReference
(
this
.
reference
.
getGroupId
(),
this
.
reference
.
getArtifactId
(),
...
...
@@ -96,9 +97,7 @@ public class DriverLibraryMavenArtifact extends DriverLibraryAbstract
if
(
newVersion
==
null
)
{
throw
new
IOException
(
"Can't resolve artifact version "
+
newReference
);
}
this
.
reference
=
newReference
;
this
.
localVersion
=
newVersion
;
this
.
path
=
PATH_PREFIX
+
this
.
localVersion
.
toString
();
return
new
DriverLibraryMavenArtifact
(
getDriver
(),
getType
(),
PATH_PREFIX
+
newVersion
.
toString
());
}
@Override
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverDownloadAutoPage.java
浏览文件 @
4051370f
...
...
@@ -203,7 +203,11 @@ class DriverDownloadAutoPage extends DriverDownloadPage {
@Override
public
void
run
(
IProgressMonitor
monitor
)
throws
InvocationTargetException
,
InterruptedException
{
try
{
library
.
setVersion
(
new
DefaultProgressMonitor
(
monitor
),
version
);
DBPDriverLibrary
newVersion
=
library
.
createVersion
(
new
DefaultProgressMonitor
(
monitor
),
version
);
DriverDescriptor
driver
=
getWizard
().
getDriver
();
driver
.
removeDriverLibrary
(
library
);
driver
.
addDriverLibrary
(
newVersion
);
getWizard
().
getDependencies
().
changeLibrary
(
library
,
newVersion
);
}
catch
(
IOException
e
)
{
throw
new
InvocationTargetException
(
e
);
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverDownloadWizard.java
浏览文件 @
4051370f
...
...
@@ -23,6 +23,7 @@ import org.eclipse.jface.wizard.Wizard;
import
org.eclipse.ui.IExportWizard
;
import
org.eclipse.ui.IWorkbench
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.dbeaver.model.connection.DBPDriverLibrary
;
import
org.jkiss.dbeaver.registry.driver.DriverDependencies
;
import
org.jkiss.dbeaver.registry.driver.DriverDescriptor
;
import
org.jkiss.dbeaver.ui.UIUtils
;
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/connection/DBPDriverLibrary.java
浏览文件 @
4051370f
...
...
@@ -100,7 +100,8 @@ public interface DBPDriverLibrary
@NotNull
Collection
<
String
>
getAvailableVersions
(
DBRProgressMonitor
monitor
)
throws
IOException
;
void
setVersion
(
DBRProgressMonitor
monitor
,
@NotNull
String
version
)
@NotNull
DBPDriverLibrary
createVersion
(
DBRProgressMonitor
monitor
,
@NotNull
String
version
)
throws
IOException
;
void
resetVersion
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录