Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
0b79785e
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,发现更多精彩内容 >>
提交
0b79785e
编写于
6月 23, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adapters registration redesigned.
Icons fix
上级
6982d957
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
29 addition
and
27 deletion
+29
-27
plugins/org.jkiss.dbeaver.core/plugin.xml
plugins/org.jkiss.dbeaver.core/plugin.xml
+23
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/core/DBeaverCore.java
....dbeaver.core/src/org/jkiss/dbeaver/core/DBeaverCore.java
+0
-12
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/navigator/DBNModel.java
....core/src/org/jkiss/dbeaver/model/navigator/DBNModel.java
+0
-12
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/lightgrid/GridCellRenderer.java
...jkiss/dbeaver/ui/controls/lightgrid/GridCellRenderer.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/views/navigator/NavigatorAdapterFactory.java
...s/dbeaver/ui/views/navigator/NavigatorAdapterFactory.java
+5
-2
未找到文件。
plugins/org.jkiss.dbeaver.core/plugin.xml
浏览文件 @
0b79785e
...
...
@@ -1897,6 +1897,29 @@
</page>
</extension>
<extension
point=
"org.eclipse.core.runtime.adapters"
>
<factory
adaptableType=
"org.jkiss.dbeaver.model.DBPObject"
class=
"org.jkiss.dbeaver.ui.views.navigator.NavigatorAdapterFactory"
>
<adapter
type=
"org.jkiss.dbeaver.model.DBPNamedObject"
/>
<adapter
type=
"org.jkiss.dbeaver.model.DBPQualifiedObject"
/>
<adapter
type=
"org.jkiss.dbeaver.model.struct.DBSObject"
/>
<adapter
type=
"org.jkiss.dbeaver.model.struct.DBSDataContainer"
/>
<adapter
type=
"org.jkiss.dbeaver.model.struct.DBSDataManipulator"
/>
<adapter
type=
"org.jkiss.dbeaver.model.struct.DBSDataSourceContainer"
/>
<adapter
type=
"org.jkiss.dbeaver.model.DBPObject"
/>
<adapter
type=
"org.eclipse.ui.views.properties.IPropertySource"
/>
<adapter
type=
"org.eclipse.core.resources.IResource"
/>
<adapter
type=
"org.eclipse.core.resources.IProject"
/>
<adapter
type=
"org.eclipse.core.resources.IFile"
/>
<adapter
type=
"org.eclipse.core.resources.IFolder"
/>
<adapter
type=
"org.eclipse.ui.model.IWorkbenchAdapter"
/>
</factory>
<factory
adaptableType=
"org.eclipse.ui.IWorkbenchPart"
class=
"org.jkiss.dbeaver.ui.editors.DatabaseEditorAdapterFactory"
>
<adapter
type=
"org.jkiss.dbeaver.model.struct.DBSObject"
/>
<adapter
type=
"org.jkiss.dbeaver.model.struct.DBSDataContainer"
/>
<adapter
type=
"org.jkiss.dbeaver.model.struct.DBSDataSourceContainer"
/>
</factory>
</extension>
<extension
point=
"org.eclipse.ui.elementFactories"
>
<factory
id=
"org.jkiss.dbeaver.ui.editors.sql.SQLEditorInputFactory"
class=
"org.jkiss.dbeaver.ui.editors.sql.SQLEditorInputFactory"
/>
<factory
id=
"org.jkiss.dbeaver.ui.editors.DatabaseEditorInputFactory"
class=
"org.jkiss.dbeaver.ui.editors.DatabaseEditorInputFactory"
/>
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/core/DBeaverCore.java
浏览文件 @
0b79785e
...
...
@@ -60,8 +60,6 @@ public class DBeaverCore implements DBPApplication {
private
static
boolean
standalone
=
false
;
private
static
volatile
boolean
isClosing
=
false
;
private
DatabaseEditorAdapterFactory
editorsAdapter
;
//private DBeaverProgressProvider progressProvider;
private
IWorkspace
workspace
;
private
IProject
tempProject
;
private
OSDescriptor
localSystem
;
...
...
@@ -156,10 +154,6 @@ public class DBeaverCore implements DBPApplication {
private
void
initialize
()
{
// Register properties adapter
this
.
editorsAdapter
=
new
DatabaseEditorAdapterFactory
();
IAdapterManager
mgr
=
Platform
.
getAdapterManager
();
mgr
.
registerAdapters
(
editorsAdapter
,
IWorkbenchPart
.
class
);
this
.
workspace
=
ResourcesPlugin
.
getWorkspace
();
this
.
localSystem
=
new
OSDescriptor
(
Platform
.
getOS
(),
Platform
.
getOSArch
());
...
...
@@ -264,12 +258,6 @@ public class DBeaverCore implements DBPApplication {
}
DataSourceProviderRegistry
.
getInstance
().
dispose
();
if
(
this
.
editorsAdapter
!=
null
)
{
// Unregister properties adapter
Platform
.
getAdapterManager
().
unregisterAdapters
(
this
.
editorsAdapter
);
this
.
editorsAdapter
=
null
;
}
if
(
isStandalone
()
&&
workspace
!=
null
)
{
try
{
workspace
.
save
(
true
,
monitor
);
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/navigator/DBNModel.java
浏览文件 @
0b79785e
...
...
@@ -21,16 +21,12 @@ import org.eclipse.core.resources.IProject;
import
org.eclipse.core.resources.IResourceChangeEvent
;
import
org.eclipse.core.resources.IResourceChangeListener
;
import
org.eclipse.core.resources.IResourceDelta
;
import
org.eclipse.core.runtime.IAdapterManager
;
import
org.eclipse.core.runtime.Platform
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.core.DBeaverCore
;
import
org.jkiss.dbeaver.core.Log
;
import
org.jkiss.dbeaver.model.DBIconComposite
;
import
org.jkiss.dbeaver.model.DBPImage
;
import
org.jkiss.dbeaver.model.DBPObject
;
import
org.jkiss.dbeaver.model.DBPQualifiedObject
;
import
org.jkiss.dbeaver.model.runtime.DBRProgressMonitor
;
import
org.jkiss.dbeaver.model.struct.DBSObject
;
import
org.jkiss.dbeaver.model.struct.DBSObjectState
;
...
...
@@ -60,7 +56,6 @@ public class DBNModel implements IResourceChangeListener {
private
final
List
<
IDBNListener
>
listeners
=
new
ArrayList
<
IDBNListener
>();
private
transient
IDBNListener
[]
listenersCopy
=
null
;
private
final
Map
<
DBSObject
,
Object
>
nodeMap
=
new
HashMap
<
DBSObject
,
Object
>();
private
DBNAdapterFactory
nodesAdapter
;
public
DBNModel
()
{
...
...
@@ -90,17 +85,10 @@ public class DBNModel implements IResourceChangeListener {
*/
core
.
getWorkspace
().
addResourceChangeListener
(
this
);
nodesAdapter
=
new
DBNAdapterFactory
();
IAdapterManager
mgr
=
Platform
.
getAdapterManager
();
mgr
.
registerAdapters
(
nodesAdapter
,
DBNNode
.
class
);
mgr
.
registerAdapters
(
nodesAdapter
,
DBPObject
.
class
);
mgr
.
registerAdapters
(
nodesAdapter
,
DBPQualifiedObject
.
class
);
}
public
void
dispose
()
{
Platform
.
getAdapterManager
().
unregisterAdapters
(
nodesAdapter
);
DBeaverCore
.
getInstance
().
getWorkspace
().
removeResourceChangeListener
(
this
);
this
.
root
.
dispose
(
false
);
synchronized
(
nodeMap
)
{
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/lightgrid/GridCellRenderer.java
浏览文件 @
0b79785e
...
...
@@ -38,7 +38,7 @@ class GridCellRenderer extends AbstractRenderer
private
static
final
int
TEXT_TOP_MARGIN
=
1
;
private
static
final
int
INSIDE_MARGIN
=
3
;
static
final
Image
LINK_IMAGE
=
DBeaverIcons
.
getImage
(
DBIcon
.
TREE_
LINK
);
static
final
Image
LINK_IMAGE
=
DBeaverIcons
.
getImage
(
DBIcon
.
LINK
);
static
final
Rectangle
LINK_IMAGE_BOUNDS
=
LINK_IMAGE
.
getBounds
();
protected
Color
colorSelected
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/
model/navigator/DBN
AdapterFactory.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/
ui/views/navigator/Navigator
AdapterFactory.java
浏览文件 @
0b79785e
...
...
@@ -15,7 +15,7 @@
* 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.
model
.navigator
;
package
org.jkiss.dbeaver.
ui.views
.navigator
;
import
org.eclipse.core.resources.IFile
;
import
org.eclipse.core.resources.IFolder
;
...
...
@@ -29,6 +29,9 @@ import org.eclipse.ui.model.WorkbenchAdapter;
import
org.eclipse.ui.views.properties.IPropertySource
;
import
org.jkiss.dbeaver.core.CoreMessages
;
import
org.jkiss.dbeaver.model.*
;
import
org.jkiss.dbeaver.model.navigator.DBNDataSource
;
import
org.jkiss.dbeaver.model.navigator.DBNNode
;
import
org.jkiss.dbeaver.model.navigator.DBNResource
;
import
org.jkiss.dbeaver.model.struct.*
;
import
org.jkiss.dbeaver.ui.DBeaverIcons
;
import
org.jkiss.dbeaver.ui.properties.PropertyCollector
;
...
...
@@ -37,7 +40,7 @@ import org.jkiss.dbeaver.ui.properties.PropertySourceDelegate;
/**
* Navigator AdapterFactory
*/
public
class
DBN
AdapterFactory
implements
IAdapterFactory
public
class
Navigator
AdapterFactory
implements
IAdapterFactory
{
private
static
final
Class
<?>[]
ADAPTER_LIST
=
{
DBPNamedObject
.
class
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录