Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
9f729f4a
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
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,发现更多精彩内容 >>
提交
9f729f4a
编写于
12月 18, 2013
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
DBD model cleanup
Former-commit-id:
44191c45
上级
c07c1ceb
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
29 addition
and
28 deletion
+29
-28
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/data/DBDValueHandler.java
...ore/src/org/jkiss/dbeaver/model/data/DBDValueHandler.java
+6
-5
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/DBCDefaultValueHandler.java
.../org/jkiss/dbeaver/model/impl/DBCDefaultValueHandler.java
+3
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCAbstractValueHandler.java
...beaver/model/impl/jdbc/data/JDBCAbstractValueHandler.java
+3
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCComplexValueHandler.java
...dbeaver/model/impl/jdbc/data/JDBCComplexValueHandler.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCContentValueHandler.java
...dbeaver/model/impl/jdbc/data/JDBCContentValueHandler.java
+6
-6
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCDateTimeValueHandler.java
...beaver/model/impl/jdbc/data/JDBCDateTimeValueHandler.java
+5
-5
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/ColumnInfoPanel.java
...re/src/org/jkiss/dbeaver/ui/controls/ColumnInfoPanel.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/ResultSetViewer.java
.../jkiss/dbeaver/ui/controls/resultset/ResultSetViewer.java
+2
-2
plugins/org.jkiss.dbeaver.mysql/src/org/jkiss/dbeaver/ext/mysql/data/MySQLEnumValueHandler.java
...g/jkiss/dbeaver/ext/mysql/data/MySQLEnumValueHandler.java
+1
-1
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/data/DBDValueHandler.java
浏览文件 @
9f729f4a
...
...
@@ -19,7 +19,7 @@
package
org.jkiss.dbeaver.model.data
;
import
org.eclipse.jface.action.I
Menu
Manager
;
import
org.eclipse.jface.action.I
Contribution
Manager
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.model.exec.DBCException
;
import
org.jkiss.dbeaver.model.exec.DBCResultSet
;
...
...
@@ -121,11 +121,12 @@ public interface DBDValueHandler
/**
* Fills context menu for certain value
* @param menuManager context menu manager
*
* @param manager context menu manager
* @param controller value controller
* @throws DBCException on error
*/
void
fillContextMenu
(
IMenuManager
menuM
anager
,
DBDValueController
controller
)
void
contributeActions
(
IContributionManager
m
anager
,
DBDValueController
controller
)
throws
DBCException
;
/**
...
...
@@ -133,10 +134,10 @@ public interface DBDValueHandler
* @param propertySource property source
* @param controller value controller
*/
void
fill
Properties
(
PropertySourceAbstract
propertySource
,
DBDValueController
controller
);
void
contribute
Properties
(
PropertySourceAbstract
propertySource
,
DBDValueController
controller
);
/**
*
Show
s value editor.
*
Create
s value editor.
* Value editor could be:
* <li>inline editor (control created withing inline placeholder)</li>
* <li>dialog (modal or modeless)</li>
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/DBCDefaultValueHandler.java
浏览文件 @
9f729f4a
...
...
@@ -18,7 +18,7 @@
*/
package
org.jkiss.dbeaver.model.impl
;
import
org.eclipse.jface.action.I
Menu
Manager
;
import
org.eclipse.jface.action.I
Contribution
Manager
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.data.*
;
...
...
@@ -89,11 +89,11 @@ public class DBCDefaultValueHandler implements DBDValueHandler {
}
@Override
public
void
fillContextMenu
(
IMenuManager
menuM
anager
,
DBDValueController
controller
)
throws
DBCException
{
public
void
contributeActions
(
IContributionManager
m
anager
,
DBDValueController
controller
)
throws
DBCException
{
}
@Override
public
void
fill
Properties
(
PropertySourceAbstract
propertySource
,
DBDValueController
controller
)
{
public
void
contribute
Properties
(
PropertySourceAbstract
propertySource
,
DBDValueController
controller
)
{
}
@Override
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCAbstractValueHandler.java
浏览文件 @
9f729f4a
...
...
@@ -21,7 +21,7 @@ package org.jkiss.dbeaver.model.impl.jdbc.data;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.eclipse.jface.action.Action
;
import
org.eclipse.jface.action.I
Menu
Manager
;
import
org.eclipse.jface.action.I
Contribution
Manager
;
import
org.eclipse.swt.SWT
;
import
org.eclipse.swt.events.*
;
import
org.eclipse.swt.widgets.Composite
;
...
...
@@ -93,14 +93,14 @@ public abstract class JDBCAbstractValueHandler implements DBDValueHandler {
}
@Override
public
void
fillContextMenu
(
IMenuManager
menuM
anager
,
DBDValueController
controller
)
public
void
contributeActions
(
IContributionManager
m
anager
,
DBDValueController
controller
)
throws
DBCException
{
}
@Override
public
void
fill
Properties
(
PropertySourceAbstract
propertySource
,
DBDValueController
controller
)
public
void
contribute
Properties
(
PropertySourceAbstract
propertySource
,
DBDValueController
controller
)
{
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCComplexValueHandler.java
浏览文件 @
9f729f4a
...
...
@@ -83,9 +83,9 @@ public abstract class JDBCComplexValueHandler extends JDBCAbstractValueHandler {
}
@Override
public
void
fill
Properties
(
PropertySourceAbstract
propertySource
,
DBDValueController
controller
)
public
void
contribute
Properties
(
PropertySourceAbstract
propertySource
,
DBDValueController
controller
)
{
super
.
fill
Properties
(
propertySource
,
controller
);
super
.
contribute
Properties
(
propertySource
,
controller
);
try
{
Object
value
=
controller
.
getValue
();
if
(
value
instanceof
DBDComplexType
)
{
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCContentValueHandler.java
浏览文件 @
9f729f4a
...
...
@@ -21,7 +21,7 @@ package org.jkiss.dbeaver.model.impl.jdbc.data;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.eclipse.jface.action.Action
;
import
org.eclipse.jface.action.I
Menu
Manager
;
import
org.eclipse.jface.action.I
Contribution
Manager
;
import
org.eclipse.swt.SWT
;
import
org.eclipse.swt.graphics.ImageData
;
import
org.eclipse.swt.widgets.Composite
;
...
...
@@ -222,18 +222,18 @@ public class JDBCContentValueHandler extends JDBCAbstractValueHandler {
}
@Override
public
void
fillContextMenu
(
IMenuManager
menuM
anager
,
final
DBDValueController
controller
)
public
void
contributeActions
(
IContributionManager
m
anager
,
final
DBDValueController
controller
)
throws
DBCException
{
if
(
controller
.
getValue
()
instanceof
DBDContent
&&
!((
DBDContent
)
controller
.
getValue
()).
isNull
())
{
m
enuM
anager
.
add
(
new
Action
(
CoreMessages
.
model_jdbc_save_to_file_
,
DBIcon
.
SAVE
.
getImageDescriptor
())
{
manager
.
add
(
new
Action
(
CoreMessages
.
model_jdbc_save_to_file_
,
DBIcon
.
SAVE
.
getImageDescriptor
())
{
@Override
public
void
run
()
{
saveToFile
(
controller
);
}
});
}
m
enuM
anager
.
add
(
new
Action
(
CoreMessages
.
model_jdbc_load_from_file_
,
DBIcon
.
LOAD
.
getImageDescriptor
())
{
manager
.
add
(
new
Action
(
CoreMessages
.
model_jdbc_load_from_file_
,
DBIcon
.
LOAD
.
getImageDescriptor
())
{
@Override
public
void
run
()
{
loadFromFile
(
controller
);
...
...
@@ -242,9 +242,9 @@ public class JDBCContentValueHandler extends JDBCAbstractValueHandler {
}
@Override
public
void
fill
Properties
(
PropertySourceAbstract
propertySource
,
DBDValueController
controller
)
public
void
contribute
Properties
(
PropertySourceAbstract
propertySource
,
DBDValueController
controller
)
{
super
.
fill
Properties
(
propertySource
,
controller
);
super
.
contribute
Properties
(
propertySource
,
controller
);
try
{
Object
value
=
controller
.
getValue
();
if
(
value
instanceof
DBDContent
)
{
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCDateTimeValueHandler.java
浏览文件 @
9f729f4a
...
...
@@ -19,7 +19,7 @@
package
org.jkiss.dbeaver.model.impl.jdbc.data
;
import
org.eclipse.jface.action.Action
;
import
org.eclipse.jface.action.I
Menu
Manager
;
import
org.eclipse.jface.action.I
Contribution
Manager
;
import
org.eclipse.swt.SWT
;
import
org.eclipse.swt.layout.GridLayout
;
import
org.eclipse.swt.widgets.Composite
;
...
...
@@ -267,10 +267,10 @@ public class JDBCDateTimeValueHandler extends JDBCAbstractValueHandler {
}
@Override
public
void
fillContextMenu
(
IMenuManager
menuM
anager
,
final
DBDValueController
controller
)
public
void
contributeActions
(
IContributionManager
m
anager
,
final
DBDValueController
controller
)
throws
DBCException
{
m
enuM
anager
.
add
(
new
Action
(
CoreMessages
.
model_jdbc_set_to_current_time
)
{
manager
.
add
(
new
Action
(
CoreMessages
.
model_jdbc_set_to_current_time
)
{
@Override
public
void
run
()
{
...
...
@@ -280,9 +280,9 @@ public class JDBCDateTimeValueHandler extends JDBCAbstractValueHandler {
}
@Override
public
void
fill
Properties
(
PropertySourceAbstract
propertySource
,
DBDValueController
controller
)
public
void
contribute
Properties
(
PropertySourceAbstract
propertySource
,
DBDValueController
controller
)
{
super
.
fill
Properties
(
propertySource
,
controller
);
super
.
contribute
Properties
(
propertySource
,
controller
);
propertySource
.
addProperty
(
"Date/Time"
,
"format"
,
//$NON-NLS-1$
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/ColumnInfoPanel.java
浏览文件 @
9f729f4a
...
...
@@ -51,7 +51,7 @@ public class ColumnInfoPanel extends Composite {
{
PropertyCollector
infoItem
=
new
PropertyCollector
(
valueController
.
getAttribute
(),
false
);
infoItem
.
collectProperties
();
valueController
.
getValueHandler
().
fill
Properties
(
infoItem
,
valueController
);
valueController
.
getValueHandler
().
contribute
Properties
(
infoItem
,
valueController
);
if
(
valueController
.
getValueLocator
()
!=
null
)
{
infoItem
.
addProperty
(
null
,
"Key"
,
CoreMessages
.
controls_column_info_panel_property_key
,
new
CellKeyInfo
(
valueController
)
);
//$NON-NLS-1$
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/ResultSetViewer.java
浏览文件 @
9f729f4a
...
...
@@ -559,7 +559,7 @@ public class ResultSetViewer extends Viewer implements IDataSourceProvider, ISpr
null
);
PropertyCollector
props
=
new
PropertyCollector
(
valueController
.
getAttribute
(),
false
);
props
.
collectProperties
();
valueController
.
getValueHandler
().
fill
Properties
(
props
,
valueController
);
valueController
.
getValueHandler
().
contribute
Properties
(
props
,
valueController
);
return
props
;
}
}
...
...
@@ -1428,7 +1428,7 @@ public class ResultSetViewer extends Viewer implements IDataSourceProvider, ISpr
// Menus from value handler
try
{
manager
.
add
(
new
Separator
());
model
.
getColumn
(
cell
.
col
).
getValueHandler
().
fillContextMenu
(
manager
,
valueController
);
model
.
getColumn
(
cell
.
col
).
getValueHandler
().
contributeActions
(
manager
,
valueController
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
);
...
...
plugins/org.jkiss.dbeaver.mysql/src/org/jkiss/dbeaver/ext/mysql/data/MySQLEnumValueHandler.java
浏览文件 @
9f729f4a
...
...
@@ -245,7 +245,7 @@ public class MySQLEnumValueHandler extends JDBCAbstractValueHandler {
}
/*
public void
fill
Properties(PropertySourceAbstract propertySource, DBDValueController controller)
public void
contribute
Properties(PropertySourceAbstract propertySource, DBDValueController controller)
{
propertySource.addProperty(
"max_length",
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录