Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
e242f0da
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,发现更多精彩内容 >>
提交
e242f0da
编写于
4月 22, 2018
作者:
S
serge-rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Oracle 12+ driver version update (ojdbc8)
Former-commit-id:
68c85ec1
上级
010de6c5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
137 addition
and
63 deletion
+137
-63
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/core/DBeaverUI.java
...ss.dbeaver.core/src/org/jkiss/dbeaver/core/DBeaverUI.java
+46
-60
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/connection/PasswordChangeDialog.java
...s/dbeaver/ui/dialogs/connection/PasswordChangeDialog.java
+88
-0
plugins/org.jkiss.dbeaver.ext.oracle/plugin.xml
plugins/org.jkiss.dbeaver.ext.oracle/plugin.xml
+3
-3
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/core/DBeaverUI.java
浏览文件 @
e242f0da
...
...
@@ -16,13 +16,11 @@
*/
package
org.jkiss.dbeaver.core
;
import
org.eclipse.core.runtime.IProgressMonitor
;
import
org.eclipse.core.runtime.IStatus
;
import
org.eclipse.core.runtime.Status
;
import
org.eclipse.jface.dialogs.IDialogConstants
;
import
org.eclipse.jface.dialogs.ProgressMonitorDialog
;
import
org.eclipse.jface.operation.IRunnableContext
;
import
org.eclipse.jface.operation.IRunnableWithProgress
;
import
org.eclipse.swt.widgets.Display
;
import
org.eclipse.swt.widgets.Shell
;
import
org.eclipse.ui.*
;
...
...
@@ -36,15 +34,20 @@ import org.jkiss.dbeaver.model.DBPDataSource;
import
org.jkiss.dbeaver.model.DBPErrorAssistant
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.access.DBAAuthInfo
;
import
org.jkiss.dbeaver.model.access.DBAPasswordChangeInfo
;
import
org.jkiss.dbeaver.model.runtime.*
;
import
org.jkiss.dbeaver.runtime.DummyRunnableContext
;
import
org.jkiss.dbeaver.runtime.RunnableContextDelegate
;
import
org.jkiss.dbeaver.runtime.ui.DBPPlatformUI
;
import
org.jkiss.dbeaver.runtime.ui.DBUserInterface
;
import
org.jkiss.dbeaver.ui.*
;
import
org.jkiss.dbeaver.ui.AbstractUIJob
;
import
org.jkiss.dbeaver.ui.SharedTextColors
;
import
org.jkiss.dbeaver.ui.TrayIconHandler
;
import
org.jkiss.dbeaver.ui.UITask
;
import
org.jkiss.dbeaver.ui.actions.datasource.DataSourceInvalidateHandler
;
import
org.jkiss.dbeaver.ui.dialogs.StandardErrorDialog
;
import
org.jkiss.dbeaver.ui.dialogs.connection.BaseAuthDialog
;
import
org.jkiss.dbeaver.ui.dialogs.connection.PasswordChangeDialog
;
import
org.jkiss.dbeaver.ui.dialogs.driver.DriverEditDialog
;
import
org.jkiss.dbeaver.ui.views.process.ProcessPropertyTester
;
import
org.jkiss.dbeaver.ui.views.process.ShellProcessView
;
...
...
@@ -97,13 +100,8 @@ public class DBeaverUI implements DBPPlatformUI {
boolean
cancelable
,
final
DBRRunnableWithProgress
runnableWithProgress
)
throws
InvocationTargetException
,
InterruptedException
{
runnableContext
.
run
(
fork
,
cancelable
,
new
IRunnableWithProgress
()
{
@Override
public
void
run
(
IProgressMonitor
monitor
)
throws
InvocationTargetException
,
InterruptedException
{
runnableWithProgress
.
run
(
RuntimeUtils
.
makeMonitor
(
monitor
));
}
});
runnableContext
.
run
(
fork
,
cancelable
,
monitor
->
runnableWithProgress
.
run
(
RuntimeUtils
.
makeMonitor
(
monitor
)));
}
private
void
dispose
()
{
...
...
@@ -226,12 +224,7 @@ public class DBeaverUI implements DBPPlatformUI {
if
(
workbench
!=
null
&&
workbench
.
getActiveWorkbenchWindow
()
!=
null
)
{
return
new
RunnableContextDelegate
(
workbench
.
getActiveWorkbenchWindow
());
}
else
{
return
new
DBRRunnableContext
()
{
@Override
public
void
run
(
boolean
fork
,
boolean
cancelable
,
DBRRunnableWithProgress
runnable
)
throws
InvocationTargetException
,
InterruptedException
{
runnable
.
run
(
new
VoidProgressMonitor
());
}
};
return
(
fork
,
cancelable
,
runnable
)
->
runnable
.
run
(
new
VoidProgressMonitor
());
}
}
...
...
@@ -241,13 +234,7 @@ public class DBeaverUI implements DBPPlatformUI {
*/
public
static
void
runInProgressService
(
final
DBRRunnableWithProgress
runnable
)
throws
InvocationTargetException
,
InterruptedException
{
getDefaultRunnableContext
().
run
(
true
,
true
,
new
DBRRunnableWithProgress
()
{
@Override
public
void
run
(
DBRProgressMonitor
monitor
)
throws
InvocationTargetException
,
InterruptedException
{
runnable
.
run
(
monitor
);
}
});
getDefaultRunnableContext
().
run
(
true
,
true
,
runnable:
:
run
);
}
/**
...
...
@@ -264,13 +251,7 @@ public class DBeaverUI implements DBPPlatformUI {
}
else
{
runnableContext
=
workbench
.
getProgressService
();
}
runnableContext
.
run
(
true
,
true
,
new
IRunnableWithProgress
()
{
@Override
public
void
run
(
IProgressMonitor
monitor
)
throws
InvocationTargetException
,
InterruptedException
{
runnable
.
run
(
RuntimeUtils
.
makeMonitor
(
monitor
));
}
});
runnableContext
.
run
(
true
,
true
,
monitor
->
runnable
.
run
(
RuntimeUtils
.
makeMonitor
(
monitor
)));
}
catch
(
InterruptedException
e
)
{
// do nothing
}
...
...
@@ -278,13 +259,8 @@ public class DBeaverUI implements DBPPlatformUI {
public
static
void
runInUI
(
IRunnableContext
context
,
final
DBRRunnableWithProgress
runnable
)
{
try
{
PlatformUI
.
getWorkbench
().
getProgressService
().
runInUI
(
context
,
new
IRunnableWithProgress
()
{
@Override
public
void
run
(
IProgressMonitor
monitor
)
throws
InvocationTargetException
,
InterruptedException
{
runnable
.
run
(
RuntimeUtils
.
makeMonitor
(
monitor
));
}
},
DBeaverActivator
.
getWorkspace
().
getRoot
());
PlatformUI
.
getWorkbench
().
getProgressService
().
runInUI
(
context
,
monitor
->
runnable
.
run
(
RuntimeUtils
.
makeMonitor
(
monitor
)),
DBeaverActivator
.
getWorkspace
().
getRoot
());
}
catch
(
InvocationTargetException
e
)
{
DBUserInterface
.
getInstance
().
showError
(
null
,
null
,
e
.
getTargetException
());
}
catch
(
InterruptedException
e
)
{
...
...
@@ -351,15 +327,11 @@ public class DBeaverUI implements DBPPlatformUI {
}
}
// log.debug(message);
Runnable
runnable
=
new
Runnable
()
{
@Override
public
void
run
()
{
// Display the dialog
StandardErrorDialog
dialog
=
new
StandardErrorDialog
(
DBeaverUI
.
getActiveWorkbenchShell
(),
title
,
message
,
RuntimeUtils
.
stripStack
(
status
),
IStatus
.
ERROR
);
dialog
.
open
();
}
Runnable
runnable
=
()
->
{
// Display the dialog
StandardErrorDialog
dialog
=
new
StandardErrorDialog
(
DBeaverUI
.
getActiveWorkbenchShell
(),
title
,
message
,
RuntimeUtils
.
stripStack
(
status
),
IStatus
.
ERROR
);
dialog
.
open
();
};
DBeaverUI
.
syncExec
(
runnable
);
return
UserResponse
.
OK
;
...
...
@@ -419,6 +391,23 @@ public class DBeaverUI implements DBPPlatformUI {
}.
execute
();
}
@Override
public
DBAPasswordChangeInfo
promptUserPasswordChange
(
String
prompt
,
String
userName
,
String
oldPassword
)
{
// Ask user
return
new
UITask
<
DBAPasswordChangeInfo
>()
{
@Override
public
DBAPasswordChangeInfo
runTask
()
{
final
Shell
shell
=
DBeaverUI
.
getActiveWorkbenchShell
();
final
PasswordChangeDialog
passwordChangeDialog
=
new
PasswordChangeDialog
(
shell
,
prompt
,
userName
,
oldPassword
);
if
(
passwordChangeDialog
.
open
()
==
IDialogConstants
.
OK_ID
)
{
return
passwordChangeDialog
.
getPasswordInfo
();
}
else
{
return
null
;
}
}
}.
execute
();
}
@Override
public
void
executeProcess
(
final
DBRProcessDescriptor
processDescriptor
)
{
processDescriptor
.
setProcessListener
(
new
DBRProcessListener
()
{
...
...
@@ -439,20 +428,17 @@ public class DBeaverUI implements DBPPlatformUI {
showError
(
"Execute process"
,
processDescriptor
.
getName
(),
e
);
}
if
(
processDescriptor
.
getCommand
().
isShowProcessPanel
())
{
asyncExec
(
new
Runnable
()
{
@Override
public
void
run
()
{
try
{
final
ShellProcessView
processView
=
(
ShellProcessView
)
DBeaverUI
.
getActiveWorkbenchWindow
().
getActivePage
().
showView
(
ShellProcessView
.
VIEW_ID
,
ShellProcessView
.
getNextId
(),
IWorkbenchPage
.
VIEW_VISIBLE
);
processView
.
initProcess
(
processDescriptor
);
}
catch
(
PartInitException
e
)
{
log
.
error
(
e
);
}
asyncExec
(()
->
{
try
{
final
ShellProcessView
processView
=
(
ShellProcessView
)
DBeaverUI
.
getActiveWorkbenchWindow
().
getActivePage
().
showView
(
ShellProcessView
.
VIEW_ID
,
ShellProcessView
.
getNextId
(),
IWorkbenchPage
.
VIEW_VISIBLE
);
processView
.
initProcess
(
processDescriptor
);
}
catch
(
PartInitException
e
)
{
log
.
error
(
e
);
}
});
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/connection/PasswordChangeDialog.java
0 → 100644
浏览文件 @
e242f0da
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.jkiss.dbeaver.ui.dialogs.connection
;
import
org.eclipse.jface.dialogs.IDialogConstants
;
import
org.eclipse.swt.SWT
;
import
org.eclipse.swt.custom.CLabel
;
import
org.eclipse.swt.events.ModifyEvent
;
import
org.eclipse.swt.events.ModifyListener
;
import
org.eclipse.swt.layout.GridData
;
import
org.eclipse.swt.layout.GridLayout
;
import
org.eclipse.swt.widgets.*
;
import
org.jkiss.dbeaver.core.CoreMessages
;
import
org.jkiss.dbeaver.model.DBIcon
;
import
org.jkiss.dbeaver.model.access.DBAPasswordChangeInfo
;
import
org.jkiss.dbeaver.ui.UIUtils
;
import
org.jkiss.dbeaver.ui.dialogs.BaseDialog
;
import
org.jkiss.utils.CommonUtils
;
/**
* Password change dialog
*/
public
class
PasswordChangeDialog
extends
BaseDialog
{
private
DBAPasswordChangeInfo
passwordInfo
;
private
String
verifyText
;
public
PasswordChangeDialog
(
Shell
parentShell
,
String
title
,
String
userName
,
String
oldPassword
)
{
super
(
parentShell
,
title
,
DBIcon
.
TREE_USER
);
this
.
passwordInfo
=
new
DBAPasswordChangeInfo
(
userName
,
oldPassword
);
}
public
DBAPasswordChangeInfo
getPasswordInfo
()
{
return
passwordInfo
;
}
@Override
protected
Composite
createDialogArea
(
Composite
parent
)
{
Composite
credGroup
=
super
.
createDialogArea
(
parent
);
((
GridLayout
)
credGroup
.
getLayout
()).
numColumns
=
2
;
CLabel
infoLabel
=
UIUtils
.
createInfoLabel
(
credGroup
,
getTitle
());
GridData
gd
=
new
GridData
(
GridData
.
FILL_HORIZONTAL
);
gd
.
horizontalSpan
=
2
;
infoLabel
.
setLayoutData
(
gd
);
Text
userNameText
=
UIUtils
.
createLabelText
(
credGroup
,
"User Name"
,
passwordInfo
.
getUserName
(),
SWT
.
BORDER
);
userNameText
.
addModifyListener
(
e
->
passwordInfo
.
setUserName
(
userNameText
.
getText
()));
Text
oldPasswordText
=
UIUtils
.
createLabelText
(
credGroup
,
"Old Password"
,
passwordInfo
.
getOldPassword
(),
SWT
.
BORDER
|
SWT
.
PASSWORD
);
oldPasswordText
.
addModifyListener
(
e
->
passwordInfo
.
setOldPassword
(
oldPasswordText
.
getText
()));
Text
newPasswordText
=
UIUtils
.
createLabelText
(
credGroup
,
"New Password"
,
""
,
SWT
.
BORDER
|
SWT
.
PASSWORD
);
newPasswordText
.
addModifyListener
(
e
->
{
passwordInfo
.
setNewPassword
(
newPasswordText
.
getText
());
updateButtons
();
});
Text
verifyPasswordText
=
UIUtils
.
createLabelText
(
credGroup
,
"Verify Password"
,
""
,
SWT
.
BORDER
|
SWT
.
PASSWORD
);
verifyPasswordText
.
addModifyListener
(
e
->
{
verifyText
=
verifyPasswordText
.
getText
();
updateButtons
();
});
return
credGroup
;
}
private
void
updateButtons
()
{
getButton
(
IDialogConstants
.
OK_ID
).
setEnabled
(
!
CommonUtils
.
isEmpty
(
passwordInfo
.
getUserName
())
&&
CommonUtils
.
equalObjects
(
passwordInfo
.
getNewPassword
(),
verifyText
));
}
}
plugins/org.jkiss.dbeaver.ext.oracle/plugin.xml
浏览文件 @
e242f0da
...
...
@@ -290,7 +290,7 @@
<file
name=
"xdb6.jar"
optional=
"true"
description=
"SQLXML support"
/>
</fileSource>
<fileSource
url=
"http://www.oracle.com/technetwork/database/features/jdbc/default-2280470.html"
name=
"Oracle 12c drivers"
>
<file
name=
"ojdbc
7
.jar"
description=
"JDBC driver"
/>
<file
name=
"ojdbc
8
.jar"
description=
"JDBC driver"
/>
<file
name=
"orai18n.jar"
optional=
"true"
description=
"NLS classes"
/>
<file
name=
"xdb6.jar"
optional=
"true"
description=
"SQLXML support"
/>
</fileSource>
...
...
@@ -299,9 +299,9 @@
</fileSource>
<file
type=
"license"
path=
"drivers/oracle/LICENSE.txt"
bundle=
"drivers.oracle"
/>
<file
type=
"jar"
path=
"drivers/oracle/ojdbc
6
.jar"
bundle=
"drivers.oracle"
/>
<file
type=
"jar"
path=
"drivers/oracle/ojdbc
8
.jar"
bundle=
"drivers.oracle"
/>
<file
type=
"jar"
path=
"drivers/oracle/orai18n.jar"
bundle=
"drivers.oracle"
/>
<file
type=
"jar"
path=
"drivers/oracle/xdb.jar"
bundle=
"drivers.oracle"
/>
<file
type=
"jar"
path=
"drivers/oracle/xdb
6
.jar"
bundle=
"drivers.oracle"
/>
<file
type=
"jar"
path=
"drivers/oracle/xmlparserv2.jar"
bundle=
"drivers.oracle"
/>
</driver>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录