Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
e5bcb928
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,发现更多精彩内容 >>
提交
e5bcb928
编写于
7月 16, 2019
作者:
S
serge@jkiss.org
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Network profiles init fix
Former-commit-id:
1bfcf97a
上级
cf0233cf
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
28 addition
and
10 deletion
+28
-10
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/connection/ConnectionPageNetworkHandler.java
...r/ui/dialogs/connection/ConnectionPageNetworkHandler.java
+9
-4
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/net/DBWHandlerConfiguration.java
.../org/jkiss/dbeaver/model/net/DBWHandlerConfiguration.java
+5
-1
plugins/org.jkiss.dbeaver.registry/src/org/jkiss/dbeaver/registry/DataSourceDescriptor.java
.../src/org/jkiss/dbeaver/registry/DataSourceDescriptor.java
+14
-5
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/connection/ConnectionPageNetworkHandler.java
浏览文件 @
e5bcb928
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
package
org.jkiss.dbeaver.ui.dialogs.connection
;
package
org.jkiss.dbeaver.ui.dialogs.connection
;
import
org.eclipse.jface.dialogs.ControlEnableState
;
import
org.eclipse.jface.dialogs.ControlEnableState
;
import
org.eclipse.jface.dialogs.IDialogConstants
;
import
org.eclipse.jface.preference.PreferenceDialog
;
import
org.eclipse.jface.preference.PreferenceDialog
;
import
org.eclipse.jface.util.IPropertyChangeListener
;
import
org.eclipse.jface.util.IPropertyChangeListener
;
import
org.eclipse.jface.util.PropertyChangeEvent
;
import
org.eclipse.jface.util.PropertyChangeEvent
;
...
@@ -135,7 +136,9 @@ public class ConnectionPageNetworkHandler extends ConnectionWizardPage implement
...
@@ -135,7 +136,9 @@ public class ConnectionPageNetworkHandler extends ConnectionWizardPage implement
null
,
null
,
null
);
null
);
if
(
preferenceDialog
!=
null
)
{
if
(
preferenceDialog
!=
null
)
{
preferenceDialog
.
open
();
if
(
preferenceDialog
.
open
()
==
IDialogConstants
.
OK_ID
)
{
setConnectionConfigProfile
(
profileCombo
.
getText
());
}
}
}
}
}
});
});
...
@@ -161,9 +164,6 @@ public class ConnectionPageNetworkHandler extends ConnectionWizardPage implement
...
@@ -161,9 +164,6 @@ public class ConnectionPageNetworkHandler extends ConnectionWizardPage implement
saveSettings
(
site
.
getActiveDataSource
());
saveSettings
(
site
.
getActiveDataSource
());
if
(
activeProfile
!=
null
)
{
if
(
activeProfile
!=
null
)
{
if
(
CommonUtils
.
equalObjects
(
oldProfileId
,
activeProfile
.
getProfileName
()))
{
return
;
}
cfg
.
setConfigProfile
(
activeProfile
);
cfg
.
setConfigProfile
(
activeProfile
);
handlerConfiguration
=
cfg
.
getHandler
(
handlerDescriptor
.
getId
());
handlerConfiguration
=
cfg
.
getHandler
(
handlerDescriptor
.
getId
());
if
(
handlerConfiguration
==
null
)
{
if
(
handlerConfiguration
==
null
)
{
...
@@ -194,6 +194,11 @@ public class ConnectionPageNetworkHandler extends ConnectionWizardPage implement
...
@@ -194,6 +194,11 @@ public class ConnectionPageNetworkHandler extends ConnectionWizardPage implement
}
}
}
}
// Update settings from profile
if
(
activeProfile
!=
null
)
{
}
// Update page controls
// Update page controls
handlerConfiguration
=
cfg
.
getHandler
(
handlerDescriptor
.
getId
());
handlerConfiguration
=
cfg
.
getHandler
(
handlerDescriptor
.
getId
());
if
(
handlerConfiguration
==
null
)
{
if
(
handlerConfiguration
==
null
)
{
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/net/DBWHandlerConfiguration.java
浏览文件 @
e5bcb928
...
@@ -33,7 +33,7 @@ public class DBWHandlerConfiguration {
...
@@ -33,7 +33,7 @@ public class DBWHandlerConfiguration {
@NotNull
@NotNull
private
final
DBWHandlerDescriptor
descriptor
;
private
final
DBWHandlerDescriptor
descriptor
;
private
final
DBPDriver
driver
;
private
DBPDriver
driver
;
private
boolean
enabled
;
private
boolean
enabled
;
private
String
userName
;
private
String
userName
;
private
String
password
;
private
String
password
;
...
@@ -73,6 +73,10 @@ public class DBWHandlerConfiguration {
...
@@ -73,6 +73,10 @@ public class DBWHandlerConfiguration {
return
driver
;
return
driver
;
}
}
public
void
setDriver
(
DBPDriver
driver
)
{
this
.
driver
=
driver
;
}
public
DBWHandlerType
getType
()
{
public
DBWHandlerType
getType
()
{
return
descriptor
.
getType
();
return
descriptor
.
getType
();
}
}
...
...
plugins/org.jkiss.dbeaver.registry/src/org/jkiss/dbeaver/registry/DataSourceDescriptor.java
浏览文件 @
e5bcb928
...
@@ -44,10 +44,7 @@ import org.jkiss.dbeaver.model.exec.DBCTransactionManager;
...
@@ -44,10 +44,7 @@ import org.jkiss.dbeaver.model.exec.DBCTransactionManager;
import
org.jkiss.dbeaver.model.exec.DBExecUtils
;
import
org.jkiss.dbeaver.model.exec.DBExecUtils
;
import
org.jkiss.dbeaver.model.impl.data.DefaultValueHandler
;
import
org.jkiss.dbeaver.model.impl.data.DefaultValueHandler
;
import
org.jkiss.dbeaver.model.meta.Property
;
import
org.jkiss.dbeaver.model.meta.Property
;
import
org.jkiss.dbeaver.model.net.DBWHandlerConfiguration
;
import
org.jkiss.dbeaver.model.net.*
;
import
org.jkiss.dbeaver.model.net.DBWHandlerType
;
import
org.jkiss.dbeaver.model.net.DBWNetworkHandler
;
import
org.jkiss.dbeaver.model.net.DBWTunnel
;
import
org.jkiss.dbeaver.model.preferences.DBPPropertySource
;
import
org.jkiss.dbeaver.model.preferences.DBPPropertySource
;
import
org.jkiss.dbeaver.model.runtime.AbstractJob
;
import
org.jkiss.dbeaver.model.runtime.AbstractJob
;
import
org.jkiss.dbeaver.model.runtime.DBRProcessDescriptor
;
import
org.jkiss.dbeaver.model.runtime.DBRProcessDescriptor
;
...
@@ -714,6 +711,10 @@ public class DataSourceDescriptor
...
@@ -714,6 +711,10 @@ public class DataSourceDescriptor
DBWHandlerConfiguration
tunnelConfiguration
=
null
,
proxyConfiguration
=
null
;
DBWHandlerConfiguration
tunnelConfiguration
=
null
,
proxyConfiguration
=
null
;
for
(
DBWHandlerConfiguration
handler
:
connectionInfo
.
getHandlers
())
{
for
(
DBWHandlerConfiguration
handler
:
connectionInfo
.
getHandlers
())
{
if
(
handler
.
isEnabled
())
{
if
(
handler
.
isEnabled
())
{
// Set driver explicitly.
// Handler config may have null driver if it was copied from profile config.
handler
.
setDriver
(
getDriver
());
if
(
handler
.
getType
()
==
DBWHandlerType
.
TUNNEL
)
{
if
(
handler
.
getType
()
==
DBWHandlerType
.
TUNNEL
)
{
tunnelConfiguration
=
handler
;
tunnelConfiguration
=
handler
;
}
else
if
(
handler
.
getType
()
==
DBWHandlerType
.
PROXY
)
{
}
else
if
(
handler
.
getType
()
==
DBWHandlerType
.
PROXY
)
{
...
@@ -784,7 +785,15 @@ public class DataSourceDescriptor
...
@@ -784,7 +785,15 @@ public class DataSourceDescriptor
this
.
resolvedConnectionInfo
.
resolveDynamicVariables
();
this
.
resolvedConnectionInfo
.
resolveDynamicVariables
();
}
}
if
(!
CommonUtils
.
isEmpty
(
connectionInfo
.
getConfigProfileName
()))
{
if
(!
CommonUtils
.
isEmpty
(
connectionInfo
.
getConfigProfileName
()))
{
// Update config from profile
DBWNetworkProfile
profile
=
registry
.
getNetworkProfile
(
connectionInfo
.
getConfigProfileName
());
if
(
profile
!=
null
)
{
for
(
DBWHandlerConfiguration
handlerCfg
:
profile
.
getConfigurations
())
{
if
(
handlerCfg
.
isEnabled
())
{
resolvedConnectionInfo
.
updateHandler
(
handlerCfg
);
}
}
}
}
}
if
(!
CommonUtils
.
isEmpty
(
connectionInfo
.
getUserProfileName
()))
{
if
(!
CommonUtils
.
isEmpty
(
connectionInfo
.
getUserProfileName
()))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录