Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
a757d621
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,发现更多精彩内容 >>
提交
a757d621
编写于
12月 29, 2018
作者:
S
Serge Rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Navigator prop tester refactoring
上级
fde73191
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
48 addition
and
45 deletion
+48
-45
plugins/org.jkiss.dbeaver.core/plugin.xml
plugins/org.jkiss.dbeaver.core/plugin.xml
+4
-25
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/AddBookmarkHandler.java
.../src/org/jkiss/dbeaver/ui/actions/AddBookmarkHandler.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/ExecuteToolHandler.java
.../src/org/jkiss/dbeaver/ui/actions/ExecuteToolHandler.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/DataSourceCreateHandler.java
...beaver/ui/actions/datasource/DataSourceCreateHandler.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/DataSourceMigrateHandler.java
...eaver/ui/actions/datasource/DataSourceMigrateHandler.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/DataSourceToolsContributor.java
...ver/ui/actions/datasource/DataSourceToolsContributor.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/DriverManagerDialogHandler.java
...ver/ui/actions/datasource/DriverManagerDialogHandler.java
+2
-2
plugins/org.jkiss.dbeaver.ui.navigator/plugin.xml
plugins/org.jkiss.dbeaver.ui.navigator/plugin.xml
+33
-9
未找到文件。
plugins/org.jkiss.dbeaver.core/plugin.xml
浏览文件 @
a757d621
...
...
@@ -320,11 +320,6 @@
</extension>
<extension
point=
"org.eclipse.core.expressions.definitions"
>
<definition
id=
"org.jkiss.dbeaver.core.ui.navigator.control"
>
<with
variable=
"activeFocusControlId"
>
<equals
value=
"org.jkiss.dbeaver.ui.navigator"
/>
</with>
</definition>
<definition
id=
"org.jkiss.dbeaver.core.ui.querylog.control"
>
<with
variable=
"activeFocusControlId"
>
<equals
value=
"org.jkiss.dbeaver.ui.qm.log"
/>
...
...
@@ -351,17 +346,6 @@
<instanceof
value=
"org.jkiss.dbeaver.ui.views.qm.QueryManagerView"
/>
</with>
</definition>
<definition
id=
"org.jkiss.dbeaver.core.ui.navigator.part"
>
<with
variable=
"activePart"
>
<!--<instanceof value="org.jkiss.dbeaver.ui.navigator.INavigatorModelView"/>-->
<test
property=
"org.jkiss.dbeaver.core.navigator.active"
forcePluginActivation=
"true"
/>
</with>
</definition>
<definition
id=
"org.jkiss.dbeaver.core.ui.navigator.part.active"
>
<with
variable=
"activePart"
>
<test
property=
"org.jkiss.dbeaver.core.navigator.focused"
forcePluginActivation=
"true"
/>
</with>
</definition>
<definition
id=
"org.jkiss.dbeaver.core.ui.datasource.part"
>
<with
variable=
"activePart"
>
<instanceof
value=
"org.jkiss.dbeaver.model.DBPContextProvider"
/>
...
...
@@ -372,11 +356,6 @@
<instanceof
value=
"org.jkiss.dbeaver.model.DBPContextProvider"
/>
</with>
</definition>
<definition
id=
"org.jkiss.dbeaver.core.ui.folder.editor"
>
<with
variable=
"activeEditor"
>
<instanceof
value=
"org.jkiss.dbeaver.ui.editors.entity.FolderEditor"
/>
</with>
</definition>
<definition
id=
"org.jkiss.dbeaver.core.ui.sql.editor.base"
>
<with
variable=
"activeEditor"
>
<instanceof
value=
"org.jkiss.dbeaver.ui.editors.sql.SQLEditorBase"
/>
...
...
@@ -533,15 +512,15 @@
</enabledWhen>
</handler>
<handler
commandId=
"org.jkiss.dbeaver.core.driver.manager"
class=
"org.jkiss.dbeaver.ui.actions.
NavigatorHandlerDriverManag
er"
/>
<handler
commandId=
"org.jkiss.dbeaver.core.new.connection"
class=
"org.jkiss.dbeaver.ui.actions.
NavigatorHandlerConnectionCreate
"
>
<handler
commandId=
"org.jkiss.dbeaver.core.driver.manager"
class=
"org.jkiss.dbeaver.ui.actions.
datasource.DriverManagerDialogHandl
er"
/>
<handler
commandId=
"org.jkiss.dbeaver.core.new.connection"
class=
"org.jkiss.dbeaver.ui.actions.
datasource.DataSourceCreateHandler
"
>
<enabledWhen>
<with
variable=
"activePart"
>
<test
property=
"org.jkiss.dbeaver.core.global.hasActiveProject"
/>
</with>
</enabledWhen>
</handler>
<handler
commandId=
"org.jkiss.dbeaver.core.migrate.connection"
class=
"org.jkiss.dbeaver.ui.actions.
NavigatorHandlerConnectionMigrate
"
/>
<handler
commandId=
"org.jkiss.dbeaver.core.migrate.connection"
class=
"org.jkiss.dbeaver.ui.actions.
datasource.DataSourceMigrateHandler
"
/>
<handler
commandId=
"org.jkiss.dbeaver.core.new.folder"
class=
"org.jkiss.dbeaver.ui.navigator.actions.NavigatorHandlerLocalFolderCreate"
>
<enabledWhen>
<with
variable=
"selection"
>
...
...
@@ -589,7 +568,7 @@
</with>
</enabledWhen>
</handler>
<handler
commandId=
"org.jkiss.dbeaver.core.navigator.bookmark.add"
class=
"org.jkiss.dbeaver.ui.actions.
NavigatorHandlerAddBookmark
"
>
<handler
commandId=
"org.jkiss.dbeaver.core.navigator.bookmark.add"
class=
"org.jkiss.dbeaver.ui.actions.
AddBookmarkHandler
"
>
<enabledWhen>
<with
variable=
"selection"
>
<count
value=
"1"
/>
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/
NavigatorHandlerAddBookmark
.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/
AddBookmarkHandler
.java
浏览文件 @
a757d621
...
...
@@ -42,7 +42,7 @@ import org.jkiss.dbeaver.ui.navigator.actions.NavigatorHandlerObjectBase;
import
org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree
;
import
org.jkiss.dbeaver.ui.resources.bookmarks.BookmarksHandlerImpl
;
public
class
NavigatorHandlerAddBookmark
extends
NavigatorHandlerObjectBase
{
public
class
AddBookmarkHandler
extends
NavigatorHandlerObjectBase
{
private
IFolder
targetFolder
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/
NavigatorActionExecuteTool
.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/
ExecuteToolHandler
.java
浏览文件 @
a757d621
...
...
@@ -31,13 +31,13 @@ import org.jkiss.dbeaver.ui.navigator.NavigatorUtils;
import
java.util.Collection
;
import
java.util.List
;
public
class
NavigatorActionExecuteTool
implements
IActionDelegate
public
class
ExecuteToolHandler
implements
IActionDelegate
{
private
IWorkbenchWindow
window
;
private
ToolDescriptor
tool
;
private
ISelection
selection
;
public
NavigatorActionExecuteTool
(
IWorkbenchWindow
window
,
ToolDescriptor
tool
)
public
ExecuteToolHandler
(
IWorkbenchWindow
window
,
ToolDescriptor
tool
)
{
this
.
window
=
window
;
this
.
tool
=
tool
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/
NavigatorHandlerConnectionCreate
.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/
datasource/DataSourceCreateHandler
.java
浏览文件 @
a757d621
...
...
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.jkiss.dbeaver.ui.actions
;
package
org.jkiss.dbeaver.ui.actions
.datasource
;
import
org.eclipse.core.commands.AbstractHandler
;
import
org.eclipse.core.commands.ExecutionEvent
;
...
...
@@ -24,7 +24,7 @@ import org.eclipse.ui.handlers.HandlerUtil;
import
org.jkiss.dbeaver.ui.dialogs.connection.CreateConnectionDialog
;
import
org.jkiss.dbeaver.ui.dialogs.connection.NewConnectionWizard
;
public
class
NavigatorHandlerConnectionCreate
extends
AbstractHandler
{
public
class
DataSourceCreateHandler
extends
AbstractHandler
{
@Override
public
Object
execute
(
ExecutionEvent
event
)
throws
ExecutionException
{
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/
NavigatorHandlerConnectionMigrate
.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/
datasource/DataSourceMigrateHandler
.java
浏览文件 @
a757d621
...
...
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.jkiss.dbeaver.ui.actions
;
package
org.jkiss.dbeaver.ui.actions
.datasource
;
import
org.eclipse.core.commands.AbstractHandler
;
import
org.eclipse.core.commands.ExecutionEvent
;
...
...
@@ -27,7 +27,7 @@ import org.jkiss.dbeaver.runtime.DBWorkbench;
import
org.jkiss.dbeaver.ui.dialogs.ActiveWizardDialog
;
import
org.jkiss.dbeaver.ui.dialogs.connection.MigrateConnectionWizard
;
public
class
NavigatorHandlerConnectionMigrate
extends
AbstractHandler
{
public
class
DataSourceMigrateHandler
extends
AbstractHandler
{
@Override
public
Object
execute
(
ExecutionEvent
event
)
throws
ExecutionException
{
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/DataSourceToolsContributor.java
浏览文件 @
a757d621
...
...
@@ -34,7 +34,7 @@ import org.jkiss.dbeaver.ui.ActionUtils;
import
org.jkiss.dbeaver.ui.DBeaverIcons
;
import
org.jkiss.dbeaver.ui.UIUtils
;
import
org.jkiss.dbeaver.ui.actions.common.EmptyListAction
;
import
org.jkiss.dbeaver.ui.actions.
NavigatorActionExecuteTool
;
import
org.jkiss.dbeaver.ui.actions.
ExecuteToolHandler
;
import
org.jkiss.dbeaver.ui.editors.DatabaseEditorInput
;
import
org.jkiss.dbeaver.ui.editors.IDatabaseEditorInput
;
import
org.jkiss.dbeaver.ui.navigator.NavigatorUtils
;
...
...
@@ -141,7 +141,7 @@ public class DataSourceToolsContributor extends DataSourceMenuContributor
}
IAction
action
=
ActionUtils
.
makeAction
(
new
NavigatorActionExecuteTool
(
workbenchWindow
,
tool
),
new
ExecuteToolHandler
(
workbenchWindow
,
tool
),
activePart
.
getSite
(),
selection
,
tool
.
getLabel
(),
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/
NavigatorHandlerDriverManag
er.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/
datasource/DriverManagerDialogHandl
er.java
浏览文件 @
a757d621
...
...
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.jkiss.dbeaver.ui.actions
;
package
org.jkiss.dbeaver.ui.actions
.datasource
;
import
org.eclipse.core.commands.AbstractHandler
;
import
org.eclipse.core.commands.ExecutionEvent
;
...
...
@@ -22,7 +22,7 @@ import org.eclipse.core.commands.ExecutionException;
import
org.eclipse.ui.handlers.HandlerUtil
;
import
org.jkiss.dbeaver.ui.dialogs.driver.DriverManagerDialog
;
public
class
NavigatorHandlerDriverManag
er
extends
AbstractHandler
{
public
class
DriverManagerDialogHandl
er
extends
AbstractHandler
{
@Override
public
Object
execute
(
ExecutionEvent
event
)
throws
ExecutionException
{
...
...
plugins/org.jkiss.dbeaver.ui.navigator/plugin.xml
浏览文件 @
a757d621
...
...
@@ -5,15 +5,6 @@
<extension-point
id=
"org.jkiss.dbeaver.databaseEditor"
name=
"%extension-point.org.jkiss.dbeaver.databaseEditor.name"
schema=
"schema/org.jkiss.dbeaver.databaseEditor.exsd"
/>
<extension
point=
"org.eclipse.core.expressions.propertyTesters"
>
<propertyTester
class=
"org.jkiss.dbeaver.ui.navigator.NavigatorPropertyTester"
id=
"org.jkiss.dbeaver.ui.navigator.NavigatorPropertyTester"
namespace=
"org.jkiss.dbeaver.core.navigator"
properties=
"active,focused"
type=
"org.eclipse.ui.IWorkbenchPart"
/>
</extension>
<extension
point=
"org.eclipse.core.runtime.adapters"
>
<factory
adaptableType=
"org.jkiss.dbeaver.model.DBPObject"
class=
"org.jkiss.dbeaver.ui.navigator.NavigatorAdapterFactory"
>
<adapter
type=
"org.jkiss.dbeaver.model.DBPNamedObject"
/>
...
...
@@ -132,4 +123,37 @@
</editor>
</extension>
<extension
point=
"org.eclipse.core.expressions.propertyTesters"
>
<propertyTester
class=
"org.jkiss.dbeaver.ui.navigator.NavigatorPropertyTester"
id=
"org.jkiss.dbeaver.ui.navigator.NavigatorPropertyTester"
namespace=
"org.jkiss.dbeaver.core.navigator"
properties=
"active,focused"
type=
"org.eclipse.ui.IWorkbenchPart"
/>
</extension>
<extension
point=
"org.eclipse.core.expressions.definitions"
>
<definition
id=
"org.jkiss.dbeaver.core.ui.navigator.control"
>
<with
variable=
"activeFocusControlId"
>
<equals
value=
"org.jkiss.dbeaver.ui.navigator"
/>
</with>
</definition>
<definition
id=
"org.jkiss.dbeaver.core.ui.navigator.part"
>
<with
variable=
"activePart"
>
<!--<instanceof value="org.jkiss.dbeaver.ui.navigator.INavigatorModelView"/>-->
<test
property=
"org.jkiss.dbeaver.core.navigator.active"
forcePluginActivation=
"true"
/>
</with>
</definition>
<definition
id=
"org.jkiss.dbeaver.core.ui.navigator.part.active"
>
<with
variable=
"activePart"
>
<test
property=
"org.jkiss.dbeaver.core.navigator.focused"
forcePluginActivation=
"true"
/>
</with>
</definition>
<definition
id=
"org.jkiss.dbeaver.core.ui.folder.editor"
>
<with
variable=
"activeEditor"
>
<instanceof
value=
"org.jkiss.dbeaver.ui.editors.entity.FolderEditor"
/>
</with>
</definition>
</extension>
</plugin>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录