Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
57ebcf26
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,发现更多精彩内容 >>
提交
57ebcf26
编写于
2月 02, 2013
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Value viewer for object value types (simple read-only text)
上级
e8059a1d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
9 deletion
+25
-9
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCObjectValueHandler.java
.../dbeaver/model/impl/jdbc/data/JDBCObjectValueHandler.java
+24
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/ResultSetPropertyTester.java
...beaver/ui/controls/resultset/ResultSetPropertyTester.java
+1
-4
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/ViewValuePanel.java
...g/jkiss/dbeaver/ui/controls/resultset/ViewValuePanel.java
+0
-4
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCObjectValueHandler.java
浏览文件 @
57ebcf26
...
...
@@ -21,6 +21,9 @@ 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.IMenuManager
;
import
org.eclipse.swt.SWT
;
import
org.eclipse.swt.widgets.Composite
;
import
org.eclipse.swt.widgets.Text
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.core.CoreMessages
;
import
org.jkiss.dbeaver.model.DBUtils
;
...
...
@@ -30,6 +33,7 @@ import org.jkiss.dbeaver.model.exec.DBCExecutionContext;
import
org.jkiss.dbeaver.model.exec.jdbc.JDBCExecutionContext
;
import
org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement
;
import
org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSet
;
import
org.jkiss.dbeaver.model.runtime.DBRProgressMonitor
;
import
org.jkiss.dbeaver.model.struct.DBSTypedObject
;
import
org.jkiss.dbeaver.ui.dialogs.data.CursorViewDialog
;
import
org.jkiss.dbeaver.ui.properties.PropertySourceAbstract
;
...
...
@@ -84,7 +88,7 @@ public class JDBCObjectValueHandler extends JDBCAbstractValueHandler {
@Override
public
int
getFeatures
()
{
return
FEATURE_VIEWER
;
return
FEATURE_VIEWER
|
FEATURE_EDITOR
;
}
@Override
...
...
@@ -130,6 +134,25 @@ public class JDBCObjectValueHandler extends JDBCAbstractValueHandler {
throws
DBException
{
switch
(
controller
.
getEditType
())
{
case
PANEL:
return
new
ValueEditor
<
Text
>(
controller
)
{
@Override
protected
Text
createControl
(
Composite
editPlaceholder
)
{
return
new
Text
(
valueController
.
getEditPlaceholder
(),
SWT
.
BORDER
|
SWT
.
MULTI
|
SWT
.
WRAP
|
SWT
.
V_SCROLL
|
SWT
.
READ_ONLY
);
}
@Override
public
void
refreshValue
()
{
control
.
setText
(
CommonUtils
.
toString
(
valueController
.
getValue
()));
}
@Override
public
Object
extractValue
(
DBRProgressMonitor
monitor
)
{
return
null
;
}
};
case
EDITOR:
final
Object
value
=
controller
.
getValue
();
if
(
value
instanceof
DBDCursor
)
{
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/ResultSetPropertyTester.java
浏览文件 @
57ebcf26
...
...
@@ -84,12 +84,9 @@ public class ResultSetPropertyTester extends PropertyTester
if
(!
rsv
.
hasData
())
{
return
false
;
}
if
(
"edit"
.
equals
(
expectedValue
))
{
if
(
"edit"
.
equals
(
expectedValue
)
||
"inline"
.
equals
(
expectedValue
)
)
{
GridPos
pos
=
rsv
.
getCurrentPosition
();
return
pos
!=
null
&&
rsv
.
isValidCell
(
pos
);
}
else
if
(
"inline"
.
equals
(
expectedValue
))
{
GridPos
pos
=
rsv
.
getCurrentPosition
();
return
pos
!=
null
&&
!
rsv
.
isColumnReadOnly
(
pos
);
}
else
if
(
"add"
.
equals
(
expectedValue
))
{
return
rsv
.
isInsertable
();
}
else
if
(
"copy"
.
equals
(
expectedValue
)
||
"delete"
.
equals
(
expectedValue
))
{
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/ViewValuePanel.java
浏览文件 @
57ebcf26
...
...
@@ -4,8 +4,6 @@ import org.eclipse.jface.action.Action;
import
org.eclipse.swt.SWT
;
import
org.eclipse.swt.events.PaintEvent
;
import
org.eclipse.swt.events.PaintListener
;
import
org.eclipse.swt.events.SelectionAdapter
;
import
org.eclipse.swt.events.SelectionEvent
;
import
org.eclipse.swt.graphics.Color
;
import
org.eclipse.swt.graphics.Point
;
import
org.eclipse.swt.graphics.Rectangle
;
...
...
@@ -14,12 +12,10 @@ import org.eclipse.swt.layout.GridData;
import
org.eclipse.swt.layout.GridLayout
;
import
org.eclipse.swt.widgets.*
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.core.DBeaverUI
;
import
org.jkiss.dbeaver.model.data.DBDValueController
;
import
org.jkiss.dbeaver.model.data.DBDValueEditor
;
import
org.jkiss.dbeaver.model.data.DBDValueEditorEx
;
import
org.jkiss.dbeaver.ui.DBIcon
;
import
org.jkiss.dbeaver.ui.SharedTextColors
;
import
org.jkiss.dbeaver.ui.UIUtils
;
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录