Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
e5e2485d
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,发现更多精彩内容 >>
提交
e5e2485d
编写于
8月 09, 2019
作者:
S
serge@jkiss.org
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor UI fixes.
Former-commit-id:
a09a6cfa
上级
5b367ca9
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
601 addition
and
592 deletion
+601
-592
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/connection/ConnectionPageGeneral.java
.../dbeaver/ui/dialogs/connection/ConnectionPageGeneral.java
+589
-588
plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/navigator/actions/NavigatorHandlerObjectRename.java
...er/ui/navigator/actions/NavigatorHandlerObjectRename.java
+7
-3
plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/navigator/database/DatabaseNavigatorTree.java
.../dbeaver/ui/navigator/database/DatabaseNavigatorTree.java
+5
-1
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/connection/ConnectionPageGeneral.java
浏览文件 @
e5e2485d
此差异已折叠。
点击以展开。
plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/navigator/actions/NavigatorHandlerObjectRename.java
浏览文件 @
e5e2485d
...
...
@@ -20,6 +20,7 @@ import org.eclipse.core.commands.ExecutionEvent;
import
org.eclipse.core.commands.ExecutionException
;
import
org.eclipse.jface.viewers.ISelection
;
import
org.eclipse.jface.viewers.IStructuredSelection
;
import
org.eclipse.swt.widgets.Shell
;
import
org.eclipse.ui.IWorkbenchWindow
;
import
org.eclipse.ui.handlers.HandlerUtil
;
import
org.jkiss.dbeaver.DBException
;
...
...
@@ -49,20 +50,23 @@ public class NavigatorHandlerObjectRename extends NavigatorHandlerObjectBase {
IStructuredSelection
structSelection
=
(
IStructuredSelection
)
selection
;
Object
element
=
structSelection
.
getFirstElement
();
if
(
element
instanceof
DBNNode
)
{
renameNode
(
HandlerUtil
.
getActiveWorkbenchWindow
(
event
),
(
DBNNode
)
element
,
null
);
renameNode
(
HandlerUtil
.
getActiveWorkbenchWindow
(
event
),
HandlerUtil
.
getActiveShell
(
event
),
(
DBNNode
)
element
,
null
);
}
}
return
null
;
}
public
static
boolean
renameNode
(
IWorkbenchWindow
workbenchWindow
,
final
DBNNode
node
,
String
newName
)
public
static
boolean
renameNode
(
IWorkbenchWindow
workbenchWindow
,
Shell
shell
,
final
DBNNode
node
,
String
newName
)
{
String
oldName
=
node
instanceof
DBNDatabaseNode
?
((
DBNDatabaseNode
)
node
).
getPlainNodeName
(
true
,
false
)
:
node
.
getNodeName
();
if
(
oldName
==
null
)
{
oldName
=
"?"
;
}
if
(
newName
==
null
)
{
newName
=
EnterNameDialog
.
chooseName
(
workbenchWindow
.
getShell
()
,
"Rename "
+
node
.
getNodeType
(),
oldName
);
newName
=
EnterNameDialog
.
chooseName
(
shell
,
"Rename "
+
node
.
getNodeType
(),
oldName
);
}
if
(
CommonUtils
.
isEmpty
(
newName
)
||
newName
.
equals
(
oldName
))
{
return
false
;
...
...
plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/navigator/database/DatabaseNavigatorTree.java
浏览文件 @
e5e2485d
...
...
@@ -469,7 +469,11 @@ public class DatabaseNavigatorTree extends Composite implements INavigatorListen
disposeOldEditor
();
treeViewer
.
getTree
().
setFocus
();
if
(!
CommonUtils
.
isEmpty
(
newName
)
&&
!
newName
.
equals
(
node
.
getNodeName
()))
{
NavigatorHandlerObjectRename
.
renameNode
(
UIUtils
.
getActiveWorkbenchWindow
(),
node
,
newName
);
NavigatorHandlerObjectRename
.
renameNode
(
UIUtils
.
getActiveWorkbenchWindow
(),
treeViewer
.
getControl
().
getShell
(),
node
,
newName
);
}
}
else
if
(
e
.
keyCode
==
SWT
.
ESC
)
{
disposeOldEditor
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录