Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
7533f88f
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,发现更多精彩内容 >>
提交
7533f88f
编写于
10月 16, 2020
作者:
S
Serge Rider
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/devel' into devel
上级
1b117fdd
55e1918e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
9 deletion
+26
-9
plugins/org.jkiss.dbeaver.data.transfer.ui/src/org/jkiss/dbeaver/tools/transfer/ui/wizard/DataTransferWizard.java
.../dbeaver/tools/transfer/ui/wizard/DataTransferWizard.java
+2
-1
plugins/org.jkiss.dbeaver.data.transfer/src/org/jkiss/dbeaver/tools/transfer/DataTransferSettings.java
...rg/jkiss/dbeaver/tools/transfer/DataTransferSettings.java
+18
-8
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/task/DBTaskUtils.java
...r.model/src/org/jkiss/dbeaver/model/task/DBTaskUtils.java
+6
-0
未找到文件。
plugins/org.jkiss.dbeaver.data.transfer.ui/src/org/jkiss/dbeaver/tools/transfer/ui/wizard/DataTransferWizard.java
浏览文件 @
7533f88f
...
...
@@ -568,7 +568,8 @@ public class DataTransferWizard extends TaskConfigurationWizard<DataTransferSett
new
DialogSettingsMap
(
getWizardDialogSettings
()),
new
DataTransferState
(),
true
,
CommonUtils
.
isEmpty
(
consumers
));
CommonUtils
.
isEmpty
(
consumers
),
false
);
}
});
...
...
plugins/org.jkiss.dbeaver.data.transfer/src/org/jkiss/dbeaver/tools/transfer/DataTransferSettings.java
浏览文件 @
7533f88f
...
...
@@ -30,6 +30,7 @@ import org.jkiss.dbeaver.model.runtime.MonitorRunnableContext;
import
org.jkiss.dbeaver.model.struct.DBSObject
;
import
org.jkiss.dbeaver.model.task.DBTTask
;
import
org.jkiss.dbeaver.model.task.DBTTaskSettings
;
import
org.jkiss.dbeaver.model.task.DBTaskUtils
;
import
org.jkiss.dbeaver.runtime.DBWorkbench
;
import
org.jkiss.dbeaver.tools.transfer.internal.DTMessages
;
import
org.jkiss.dbeaver.tools.transfer.registry.DataTransferNodeDescriptor
;
...
...
@@ -76,6 +77,9 @@ public class DataTransferSettings implements DBTTaskSettings<DBPObject> {
// Hacky flag. Says that pipe selection is frozen.
// Makes sense for special case like multi-file import
private
boolean
pipeChangeRestricted
;
// Hacky flag too. Skip nodes (producer and consumer) update
// if it's not required -- e.g., when we're editing an exiting task
private
final
boolean
nodeUpdateRestricted
;
public
DataTransferSettings
(
@NotNull
DBRProgressMonitor
monitor
,
...
...
@@ -84,8 +88,10 @@ public class DataTransferSettings implements DBTTaskSettings<DBPObject> {
@NotNull
Map
<
String
,
Object
>
configuration
,
@NotNull
DataTransferState
state
,
boolean
selectDefaultNodes
,
boolean
isExport
)
{
boolean
isExport
,
boolean
isExitingTask
)
{
this
.
state
=
state
;
this
.
nodeUpdateRestricted
=
isExitingTask
;
initializePipes
(
producers
,
consumers
,
isExport
);
loadSettings
(
monitor
,
configuration
);
...
...
@@ -110,7 +116,8 @@ public class DataTransferSettings implements DBTTaskSettings<DBPObject> {
getTaskOrSavedSettings
(
task
,
configuration
),
state
,
!
task
.
getProperties
().
isEmpty
(),
isExportTask
(
task
)
isExportTask
(
task
),
DBTaskUtils
.
isTaskExists
(
task
)
);
}
...
...
@@ -592,12 +599,15 @@ public class DataTransferSettings implements DBTTaskSettings<DBPObject> {
this
.
consumerOptional
=
isExport
;
this
.
producerOptional
=
!
isExport
;
this
.
producer
=
null
;
this
.
consumer
=
null
;
if
(!
dataPipes
.
isEmpty
())
{
DataTransferPipe
pipe
=
dataPipes
.
get
(
0
);
this
.
producer
=
pipe
.
getProducer
()
==
null
?
null
:
registry
.
getNodeByType
(
pipe
.
getProducer
().
getClass
());
this
.
consumer
=
pipe
.
getConsumer
()
==
null
?
null
:
registry
.
getNodeByType
(
pipe
.
getConsumer
().
getClass
());
// Don't update producer and consumer if it's not required (#9687)
if
(!
nodeUpdateRestricted
)
{
this
.
producer
=
null
;
this
.
consumer
=
null
;
if
(!
dataPipes
.
isEmpty
())
{
DataTransferPipe
pipe
=
dataPipes
.
get
(
0
);
this
.
producer
=
pipe
.
getProducer
()
==
null
?
null
:
registry
.
getNodeByType
(
pipe
.
getProducer
().
getClass
());
this
.
consumer
=
pipe
.
getConsumer
()
==
null
?
null
:
registry
.
getNodeByType
(
pipe
.
getConsumer
().
getClass
());
}
}
DataTransferProcessorDescriptor
savedProcessor
=
this
.
processor
;
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/task/DBTaskUtils.java
浏览文件 @
7533f88f
...
...
@@ -136,4 +136,10 @@ public class DBTaskUtils {
}
}
public
static
boolean
isTaskExists
(
DBTTask
task
)
{
if
(
task
==
null
)
{
return
false
;
}
return
task
.
getProject
().
getTaskManager
().
getTaskById
(
task
.
getId
())
!=
null
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录