Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
bc00690f
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,发现更多精彩内容 >>
提交
bc00690f
编写于
10月 08, 2016
作者:
S
Serge Rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#769 Disconnect All command
Former-commit-id:
f00f2b75
上级
86c3556a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
43 addition
and
0 deletion
+43
-0
plugins/org.jkiss.dbeaver.core/plugin.properties
plugins/org.jkiss.dbeaver.core/plugin.properties
+2
-0
plugins/org.jkiss.dbeaver.core/plugin.xml
plugins/org.jkiss.dbeaver.core/plugin.xml
+3
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/DataSourceDisconnectAllHandler.java
...ui/actions/datasource/DataSourceDisconnectAllHandler.java
+38
-0
未找到文件。
plugins/org.jkiss.dbeaver.core/plugin.properties
浏览文件 @
bc00690f
...
...
@@ -66,6 +66,8 @@ command.org.jkiss.dbeaver.core.connect.name=Connect
command.org.jkiss.dbeaver.core.connect.description
=
Connect to database
command.org.jkiss.dbeaver.core.disconnect.name
=
Disconnect
command.org.jkiss.dbeaver.core.disconnect.description
=
Disconnect from database
command.org.jkiss.dbeaver.core.disconnect.all.name
=
Disconnect All
command.org.jkiss.dbeaver.core.disconnect.all.description
=
Close all open connections
command.org.jkiss.dbeaver.core.invalidate.name
=
Invalidate/Reconnect
command.org.jkiss.dbeaver.core.invalidate.description
=
Invalidate/reconnect database connection
command.org.jkiss.dbeaver.core.commit.name
=
Commit
...
...
plugins/org.jkiss.dbeaver.core/plugin.xml
浏览文件 @
bc00690f
...
...
@@ -202,6 +202,7 @@
<command
id=
"org.jkiss.dbeaver.core.connect"
name=
"%command.org.jkiss.dbeaver.core.connect.name"
description=
"%command.org.jkiss.dbeaver.core.connect.description"
categoryId=
"org.jkiss.dbeaver.core.database"
/>
<command
id=
"org.jkiss.dbeaver.core.disconnect"
name=
"%command.org.jkiss.dbeaver.core.disconnect.name"
description=
"%command.org.jkiss.dbeaver.core.disconnect.description"
categoryId=
"org.jkiss.dbeaver.core.database"
/>
<command
id=
"org.jkiss.dbeaver.core.invalidate"
name=
"%command.org.jkiss.dbeaver.core.invalidate.name"
description=
"%command.org.jkiss.dbeaver.core.invalidate.description"
categoryId=
"org.jkiss.dbeaver.core.database"
/>
<command
id=
"org.jkiss.dbeaver.core.disconnect.all"
name=
"%command.org.jkiss.dbeaver.core.disconnect.all.name"
description=
"%command.org.jkiss.dbeaver.core.disconnect.all.description"
categoryId=
"org.jkiss.dbeaver.core.database"
/>
<command
id=
"org.jkiss.dbeaver.core.commit"
name=
"%command.org.jkiss.dbeaver.core.commit.name"
description=
"%command.org.jkiss.dbeaver.core.commit.description"
categoryId=
"org.jkiss.dbeaver.core.database"
/>
<command
id=
"org.jkiss.dbeaver.core.rollback"
name=
"%command.org.jkiss.dbeaver.core.rollback.name"
description=
"%command.org.jkiss.dbeaver.core.rollback.description"
categoryId=
"org.jkiss.dbeaver.core.database"
/>
<command
id=
"org.jkiss.dbeaver.core.txn.autocommit"
name=
"%command.org.jkiss.dbeaver.core.txn.autocommit.name"
description=
"%command.org.jkiss.dbeaver.core.txn.autocommit.description"
categoryId=
"org.jkiss.dbeaver.core.database"
/>
...
...
@@ -635,6 +636,7 @@
</or>
</enabledWhen>
</handler>
<handler
commandId=
"org.jkiss.dbeaver.core.disconnect.all"
class=
"org.jkiss.dbeaver.ui.actions.datasource.DataSourceDisconnectAllHandler"
/>
<handler
commandId=
"org.jkiss.dbeaver.core.invalidate"
class=
"org.jkiss.dbeaver.ui.actions.datasource.DataSourceInvalidateHandler"
>
<enabledWhen>
<or>
...
...
@@ -1504,6 +1506,7 @@
<command
commandId=
"org.jkiss.dbeaver.core.connect"
/>
<command
commandId=
"org.jkiss.dbeaver.core.invalidate"
/>
<command
commandId=
"org.jkiss.dbeaver.core.disconnect"
/>
<command
commandId=
"org.jkiss.dbeaver.core.disconnect.all"
/>
<separator
name=
"session"
visible=
"true"
/>
<command
commandId=
"org.jkiss.dbeaver.core.commit"
/>
<command
commandId=
"org.jkiss.dbeaver.core.rollback"
/>
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/DataSourceDisconnectAllHandler.java
0 → 100644
浏览文件 @
bc00690f
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2016 Serge Rieder (serge@jkiss.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License (version 2)
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package
org.jkiss.dbeaver.ui.actions.datasource
;
import
org.eclipse.core.commands.ExecutionEvent
;
import
org.eclipse.core.commands.ExecutionException
;
import
org.jkiss.dbeaver.registry.DataSourceDescriptor
;
import
org.jkiss.dbeaver.ui.actions.AbstractDataSourceHandler
;
public
class
DataSourceDisconnectAllHandler
extends
AbstractDataSourceHandler
{
@Override
public
Object
execute
(
ExecutionEvent
event
)
throws
ExecutionException
{
for
(
final
DataSourceDescriptor
dataSourceContainer
:
DataSourceDescriptor
.
getAllDataSources
())
{
if
(
dataSourceContainer
.
isConnected
())
{
DataSourceHandler
.
disconnectDataSource
(
dataSourceContainer
,
null
);
}
}
return
null
;
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录