Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
2cf9beea
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,发现更多精彩内容 >>
提交
2cf9beea
编写于
12月 25, 2018
作者:
S
serge-rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#10 Navigator packages refactoring
上级
517c9633
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
26 addition
and
31 deletion
+26
-31
plugins/org.jkiss.dbeaver.core/plugin.xml
plugins/org.jkiss.dbeaver.core/plugin.xml
+4
-4
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/NavigatorActionExecuteTool.java
.../jkiss/dbeaver/ui/actions/NavigatorActionExecuteTool.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/NavigatorHandlerAddBookmark.java
...jkiss/dbeaver/ui/actions/NavigatorHandlerAddBookmark.java
+2
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/NavigatorHandlerConnectionCreate.java
.../dbeaver/ui/actions/NavigatorHandlerConnectionCreate.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/NavigatorHandlerConnectionMigrate.java
...dbeaver/ui/actions/NavigatorHandlerConnectionMigrate.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/NavigatorHandlerDriverManager.java
...iss/dbeaver/ui/actions/NavigatorHandlerDriverManager.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/DataSourceToolsContributor.java
...ver/ui/actions/datasource/DataSourceToolsContributor.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/sql/UIServiceSQLImpl.java
...rc/org/jkiss/dbeaver/ui/editors/sql/UIServiceSQLImpl.java
+3
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/navigator/actions/NavigatorHandlerObjectBase.java
...aver/ui/navigator/actions/NavigatorHandlerObjectBase.java
+9
-15
plugins/org.jkiss.dbeaver.data.transfer/src/org/jkiss/dbeaver/tools/transfer/database/page/DatabaseConsumerPageMapping.java
...s/transfer/database/page/DatabaseConsumerPageMapping.java
+2
-3
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/runtime/ui/UIServiceSQL.java
....model/src/org/jkiss/dbeaver/runtime/ui/UIServiceSQL.java
+1
-1
未找到文件。
plugins/org.jkiss.dbeaver.core/plugin.xml
浏览文件 @
2cf9beea
...
...
@@ -684,15 +684,15 @@
</enabledWhen>
</handler>
<handler
commandId=
"org.jkiss.dbeaver.core.driver.manager"
class=
"org.jkiss.dbeaver.ui.
navigator.
actions.NavigatorHandlerDriverManager"
/>
<handler
commandId=
"org.jkiss.dbeaver.core.new.connection"
class=
"org.jkiss.dbeaver.ui.
navigator.
actions.NavigatorHandlerConnectionCreate"
>
<handler
commandId=
"org.jkiss.dbeaver.core.driver.manager"
class=
"org.jkiss.dbeaver.ui.actions.NavigatorHandlerDriverManager"
/>
<handler
commandId=
"org.jkiss.dbeaver.core.new.connection"
class=
"org.jkiss.dbeaver.ui.actions.NavigatorHandlerConnectionCreate"
>
<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.
navigator.
actions.NavigatorHandlerConnectionMigrate"
/>
<handler
commandId=
"org.jkiss.dbeaver.core.migrate.connection"
class=
"org.jkiss.dbeaver.ui.actions.NavigatorHandlerConnectionMigrate"
/>
<handler
commandId=
"org.jkiss.dbeaver.core.new.folder"
class=
"org.jkiss.dbeaver.ui.navigator.actions.NavigatorHandlerLocalFolderCreate"
>
<enabledWhen>
<with
variable=
"selection"
>
...
...
@@ -740,7 +740,7 @@
</with>
</enabledWhen>
</handler>
<handler
commandId=
"org.jkiss.dbeaver.core.navigator.bookmark.add"
class=
"org.jkiss.dbeaver.ui.
navigator.
actions.NavigatorHandlerAddBookmark"
>
<handler
commandId=
"org.jkiss.dbeaver.core.navigator.bookmark.add"
class=
"org.jkiss.dbeaver.ui.actions.NavigatorHandlerAddBookmark"
>
<enabledWhen>
<with
variable=
"selection"
>
<count
value=
"1"
/>
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/
navigator/
actions/NavigatorActionExecuteTool.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/NavigatorActionExecuteTool.java
浏览文件 @
2cf9beea
...
...
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.jkiss.dbeaver.ui.
navigator.
actions
;
package
org.jkiss.dbeaver.ui.actions
;
import
org.eclipse.jface.action.IAction
;
import
org.eclipse.jface.viewers.ISelection
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/
navigator/
actions/NavigatorHandlerAddBookmark.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/NavigatorHandlerAddBookmark.java
浏览文件 @
2cf9beea
...
...
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.jkiss.dbeaver.ui.
navigator.
actions
;
package
org.jkiss.dbeaver.ui.actions
;
import
org.eclipse.core.commands.ExecutionEvent
;
import
org.eclipse.core.commands.ExecutionException
;
...
...
@@ -38,6 +38,7 @@ import org.jkiss.dbeaver.runtime.ui.DBUserInterface;
import
org.jkiss.dbeaver.ui.UIUtils
;
import
org.jkiss.dbeaver.ui.dialogs.EnterNameDialog
;
import
org.jkiss.dbeaver.ui.navigator.NavigatorUtils
;
import
org.jkiss.dbeaver.ui.navigator.actions.NavigatorHandlerObjectBase
;
import
org.jkiss.dbeaver.ui.navigator.database.DatabaseNavigatorTree
;
import
org.jkiss.dbeaver.ui.resources.bookmarks.BookmarksHandlerImpl
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/
navigator/
actions/NavigatorHandlerConnectionCreate.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/NavigatorHandlerConnectionCreate.java
浏览文件 @
2cf9beea
...
...
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.jkiss.dbeaver.ui.
navigator.
actions
;
package
org.jkiss.dbeaver.ui.actions
;
import
org.eclipse.core.commands.AbstractHandler
;
import
org.eclipse.core.commands.ExecutionEvent
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/
navigator/
actions/NavigatorHandlerConnectionMigrate.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/NavigatorHandlerConnectionMigrate.java
浏览文件 @
2cf9beea
...
...
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.jkiss.dbeaver.ui.
navigator.
actions
;
package
org.jkiss.dbeaver.ui.actions
;
import
org.eclipse.core.commands.AbstractHandler
;
import
org.eclipse.core.commands.ExecutionEvent
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/
navigator/
actions/NavigatorHandlerDriverManager.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/NavigatorHandlerDriverManager.java
浏览文件 @
2cf9beea
...
...
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.jkiss.dbeaver.ui.
navigator.
actions
;
package
org.jkiss.dbeaver.ui.actions
;
import
org.eclipse.core.commands.AbstractHandler
;
import
org.eclipse.core.commands.ExecutionEvent
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/DataSourceToolsContributor.java
浏览文件 @
2cf9beea
...
...
@@ -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.
navigator.
actions.NavigatorActionExecuteTool
;
import
org.jkiss.dbeaver.ui.actions.NavigatorActionExecuteTool
;
import
org.jkiss.dbeaver.ui.editors.DatabaseEditorInput
;
import
org.jkiss.dbeaver.ui.editors.IDatabaseEditorInput
;
import
org.jkiss.dbeaver.ui.navigator.NavigatorUtils
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/sql/UIServiceSQLImpl.java
浏览文件 @
2cf9beea
...
...
@@ -44,7 +44,7 @@ public class UIServiceSQLImpl implements UIServiceSQL {
private
static
final
Log
log
=
Log
.
getLog
(
UIServiceSQLImpl
.
class
);
@Override
public
void
openSQLViewer
(
DBCExecutionContext
context
,
String
title
,
DBPImage
image
,
String
text
)
{
public
int
openSQLViewer
(
DBCExecutionContext
context
,
String
title
,
DBPImage
image
,
String
text
,
boolean
showSaveButton
)
{
ViewSQLDialog
dialog
=
new
ViewSQLDialog
(
UIUtils
.
getActiveWorkbenchWindow
().
getActivePage
().
getActivePart
().
getSite
(),
context
,
...
...
@@ -52,7 +52,8 @@ public class UIServiceSQLImpl implements UIServiceSQL {
image
,
text
);
dialog
.
open
();
dialog
.
setShowSaveButton
(
showSaveButton
);
return
dialog
.
open
();
}
@Override
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/navigator/actions/NavigatorHandlerObjectBase.java
浏览文件 @
2cf9beea
...
...
@@ -40,14 +40,14 @@ import org.jkiss.dbeaver.model.sql.SQLUtils;
import
org.jkiss.dbeaver.model.struct.DBSObject
;
import
org.jkiss.dbeaver.model.struct.DBSObjectReference
;
import
org.jkiss.dbeaver.registry.ObjectManagerRegistry
;
import
org.jkiss.dbeaver.ui.editors.SimpleCommandContext
;
import
org.jkiss.dbeaver.runtime.DBWorkbench
;
import
org.jkiss.dbeaver.runtime.ui.UIServiceSQL
;
import
org.jkiss.dbeaver.ui.UIIcon
;
import
org.jkiss.dbeaver.ui.UIUtils
;
import
org.jkiss.dbeaver.ui.controls.folders.ITabbedFolderContainer
;
import
org.jkiss.dbeaver.ui.editors.sql.dialogs.ViewSQLDialog
;
import
org.jkiss.dbeaver.ui.editors.IDatabaseEditor
;
import
org.jkiss.dbeaver.ui.editors.IDatabaseEditorInput
;
import
org.jkiss.dbeaver.ui.
navigator.database.DatabaseNavigatorView
;
import
org.jkiss.dbeaver.ui.
editors.SimpleCommandContext
;
import
org.jkiss.dbeaver.utils.RuntimeUtils
;
import
java.lang.reflect.InvocationTargetException
;
...
...
@@ -214,19 +214,13 @@ public abstract class NavigatorHandlerObjectBase extends AbstractHandler {
}
catch
(
InterruptedException
e
)
{
return
false
;
}
DatabaseNavigatorView
view
=
UIUtils
.
findView
(
workbenchWindow
,
DatabaseNavigatorView
.
class
);
if
(
view
!=
null
)
{
ViewSQLDialog
dialog
=
new
ViewSQLDialog
(
view
.
getSite
(),
commandContext
.
getExecutionContext
(),
dialogTitle
,
UIIcon
.
SQL_PREVIEW
,
script
.
toString
());
dialog
.
setShowSaveButton
(
true
);
return
dialog
.
open
()
==
IDialogConstants
.
PROCEED_ID
;
}
else
{
return
false
;
UIServiceSQL
serviceSQL
=
DBWorkbench
.
getService
(
UIServiceSQL
.
class
);
if
(
serviceSQL
!=
null
)
{
return
serviceSQL
.
openSQLViewer
(
commandContext
.
getExecutionContext
(),
dialogTitle
,
UIIcon
.
SQL_PREVIEW
,
script
.
toString
(),
true
)
==
IDialogConstants
.
PROCEED_ID
;
}
return
false
;
}
private
static
class
NodeLoader
implements
DBRRunnableWithProgress
{
...
...
plugins/org.jkiss.dbeaver.data.transfer/src/org/jkiss/dbeaver/tools/transfer/database/page/DatabaseConsumerPageMapping.java
浏览文件 @
2cf9beea
...
...
@@ -55,7 +55,6 @@ import org.jkiss.utils.CommonUtils;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
public
class
DatabaseConsumerPageMapping
extends
ActiveWizardPage
<
DataTransferWizard
>
{
...
...
@@ -677,8 +676,8 @@ public class DatabaseConsumerPageMapping extends ActiveWizardPage<DataTransferWi
DBUtils
.
getDefaultContext
(
container
,
true
),
"Target DDL"
,
null
,
ddl
);
ddl
,
false
);
}
}
catch
(
DBException
e
)
{
DBUserInterface
.
getInstance
().
showError
(
"Target DDL"
,
"Error generatiung target DDL"
,
e
);
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/runtime/ui/UIServiceSQL.java
浏览文件 @
2cf9beea
...
...
@@ -29,7 +29,7 @@ import org.jkiss.dbeaver.model.exec.DBCExecutionContext;
*/
public
interface
UIServiceSQL
{
void
openSQLViewer
(
@Nullable
DBCExecutionContext
context
,
String
title
,
@Nullable
DBPImage
image
,
String
text
);
int
openSQLViewer
(
@Nullable
DBCExecutionContext
context
,
String
title
,
@Nullable
DBPImage
image
,
String
text
,
boolean
showSaveButton
);
/**
* @return IEditorPart
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录