Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
a412f6b2
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,发现更多精彩内容 >>
提交
a412f6b2
编写于
6月 23, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Navigator API refactoring
上级
0b79785e
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
16 addition
and
19 deletion
+16
-19
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/core/DBeaverCore.java
....dbeaver.core/src/org/jkiss/dbeaver/core/DBeaverCore.java
+0
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/navigator/DBNModel.java
....core/src/org/jkiss/dbeaver/model/navigator/DBNModel.java
+9
-9
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/navigator/INavigatorListener.java
...org/jkiss/dbeaver/model/navigator/INavigatorListener.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/itemlist/NodeListControl.java
...g/jkiss/dbeaver/ui/controls/itemlist/NodeListControl.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/DatabaseEditorListener.java
.../org/jkiss/dbeaver/ui/editors/DatabaseEditorListener.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/views/navigator/database/DatabaseNavigatorTree.java
...er/ui/views/navigator/database/DatabaseNavigatorTree.java
+1
-2
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/core/DBeaverCore.java
浏览文件 @
a412f6b2
...
...
@@ -21,7 +21,6 @@ package org.jkiss.dbeaver.core;
import
org.eclipse.core.resources.*
;
import
org.eclipse.core.runtime.*
;
import
org.eclipse.jface.preference.IPreferenceStore
;
import
org.eclipse.ui.IWorkbenchPart
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.model.DBPApplication
;
...
...
@@ -34,7 +33,6 @@ import org.jkiss.dbeaver.registry.OSDescriptor;
import
org.jkiss.dbeaver.registry.ProjectRegistry
;
import
org.jkiss.dbeaver.runtime.qm.QMControllerImpl
;
import
org.jkiss.dbeaver.runtime.qm.QMLogFileWriter
;
import
org.jkiss.dbeaver.ui.editors.DatabaseEditorAdapterFactory
;
import
org.osgi.framework.Bundle
;
import
org.osgi.framework.Version
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/navigator/DBNModel.java
浏览文件 @
a412f6b2
...
...
@@ -53,8 +53,8 @@ public class DBNModel implements IResourceChangeListener {
static
final
Log
log
=
Log
.
getLog
(
DBNModel
.
class
);
private
DBNRoot
root
;
private
final
List
<
I
DBNListener
>
listeners
=
new
ArrayList
<
IDBN
Listener
>();
private
transient
I
DBN
Listener
[]
listenersCopy
=
null
;
private
final
List
<
I
NavigatorListener
>
listeners
=
new
ArrayList
<
INavigator
Listener
>();
private
transient
I
Navigator
Listener
[]
listenersCopy
=
null
;
private
final
Map
<
DBSObject
,
Object
>
nodeMap
=
new
HashMap
<
DBSObject
,
Object
>();
public
DBNModel
()
...
...
@@ -96,7 +96,7 @@ public class DBNModel implements IResourceChangeListener {
}
synchronized
(
this
.
listeners
)
{
if
(!
listeners
.
isEmpty
())
{
for
(
I
DBN
Listener
listener
:
listeners
)
{
for
(
I
Navigator
Listener
listener
:
listeners
)
{
log
.
warn
(
"Listener '"
+
listener
+
"' is not unregistered from DBM model"
);
}
}
...
...
@@ -389,7 +389,7 @@ public class DBNModel implements IResourceChangeListener {
}
}
public
void
addListener
(
I
DBN
Listener
listener
)
public
void
addListener
(
I
Navigator
Listener
listener
)
{
synchronized
(
this
.
listeners
)
{
if
(
this
.
listeners
.
contains
(
listener
))
{
...
...
@@ -397,17 +397,17 @@ public class DBNModel implements IResourceChangeListener {
}
else
{
this
.
listeners
.
add
(
listener
);
}
this
.
listenersCopy
=
this
.
listeners
.
toArray
(
new
I
DBN
Listener
[
this
.
listeners
.
size
()]);
this
.
listenersCopy
=
this
.
listeners
.
toArray
(
new
I
Navigator
Listener
[
this
.
listeners
.
size
()]);
}
}
public
void
removeListener
(
I
DBN
Listener
listener
)
public
void
removeListener
(
I
Navigator
Listener
listener
)
{
synchronized
(
this
.
listeners
)
{
if
(!
this
.
listeners
.
remove
(
listener
))
{
log
.
warn
(
"Listener "
+
listener
+
" wasn't registered in model"
);
}
this
.
listenersCopy
=
this
.
listeners
.
toArray
(
new
I
DBN
Listener
[
this
.
listeners
.
size
()]);
this
.
listenersCopy
=
this
.
listeners
.
toArray
(
new
I
Navigator
Listener
[
this
.
listeners
.
size
()]);
}
}
...
...
@@ -418,14 +418,14 @@ public class DBNModel implements IResourceChangeListener {
void
fireNodeEvent
(
final
DBNEvent
event
)
{
I
DBN
Listener
[]
listenersCopy
;
I
Navigator
Listener
[]
listenersCopy
;
synchronized
(
this
.
listeners
)
{
if
(
listeners
.
isEmpty
())
{
return
;
}
listenersCopy
=
this
.
listenersCopy
;
}
for
(
I
DBN
Listener
listener
:
listenersCopy
)
{
for
(
I
Navigator
Listener
listener
:
listenersCopy
)
{
listener
.
nodeChanged
(
event
);
}
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/navigator/I
DBN
Listener.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/navigator/I
Navigator
Listener.java
浏览文件 @
a412f6b2
...
...
@@ -19,9 +19,9 @@
package
org.jkiss.dbeaver.model.navigator
;
/**
* I
DBN
Listener
* I
Navigator
Listener
*/
public
interface
I
DBN
Listener
public
interface
I
Navigator
Listener
{
void
nodeChanged
(
DBNEvent
event
);
}
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/itemlist/NodeListControl.java
浏览文件 @
a412f6b2
...
...
@@ -34,7 +34,7 @@ import org.jkiss.dbeaver.model.edit.DBEObjectEditor;
import
org.jkiss.dbeaver.model.navigator.DBNDatabaseNode
;
import
org.jkiss.dbeaver.model.navigator.DBNEvent
;
import
org.jkiss.dbeaver.model.navigator.DBNNode
;
import
org.jkiss.dbeaver.model.navigator.I
DBN
Listener
;
import
org.jkiss.dbeaver.model.navigator.I
Navigator
Listener
;
import
org.jkiss.dbeaver.model.struct.DBSDataSourceContainer
;
import
org.jkiss.dbeaver.model.struct.DBSObject
;
import
org.jkiss.dbeaver.model.struct.DBSWrapper
;
...
...
@@ -61,7 +61,7 @@ import java.util.Set;
/**
* NodeListControl
*/
public
abstract
class
NodeListControl
extends
ObjectListControl
<
DBNNode
>
implements
IDataSourceContainerProvider
,
INavigatorModelView
,
I
DBN
Listener
,
IMenuListener
{
public
abstract
class
NodeListControl
extends
ObjectListControl
<
DBNNode
>
implements
IDataSourceContainerProvider
,
INavigatorModelView
,
I
Navigator
Listener
,
IMenuListener
{
//static final Log log = Log.getLog(NodeListControl.class);
private
final
IWorkbenchSite
workbenchSite
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/DatabaseEditorListener.java
浏览文件 @
a412f6b2
...
...
@@ -22,14 +22,14 @@ import org.eclipse.ui.IWorkbenchPage;
import
org.jkiss.dbeaver.core.DBeaverCore
;
import
org.jkiss.dbeaver.model.navigator.DBNEvent
;
import
org.jkiss.dbeaver.model.navigator.DBNNode
;
import
org.jkiss.dbeaver.model.navigator.I
DBN
Listener
;
import
org.jkiss.dbeaver.model.navigator.I
Navigator
Listener
;
import
org.jkiss.dbeaver.model.struct.DBSDataSourceContainer
;
import
org.jkiss.dbeaver.ui.actions.navigator.NavigatorHandlerRefresh
;
/**
* DatabaseEditorListener
*/
public
class
DatabaseEditorListener
implements
I
DBN
Listener
public
class
DatabaseEditorListener
implements
I
Navigator
Listener
{
private
final
IDatabaseEditor
databaseEditor
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/views/navigator/database/DatabaseNavigatorTree.java
浏览文件 @
a412f6b2
...
...
@@ -17,7 +17,6 @@
*/
package
org.jkiss.dbeaver.ui.views.navigator.database
;
import
org.eclipse.ui.dialogs.FilteredTree
;
import
org.eclipse.ui.dialogs.PatternFilter
;
import
org.jkiss.dbeaver.core.Log
;
import
org.eclipse.core.runtime.IStatus
;
...
...
@@ -49,7 +48,7 @@ import org.jkiss.utils.CommonUtils;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.List
;
public
class
DatabaseNavigatorTree
extends
Composite
implements
I
DBN
Listener
public
class
DatabaseNavigatorTree
extends
Composite
implements
I
Navigator
Listener
{
static
final
Log
log
=
Log
.
getLog
(
DatabaseNavigatorTree
.
class
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录