Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
670bb5a7
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,发现更多精彩内容 >>
提交
670bb5a7
编写于
1月 26, 2013
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Inline controls activation/deactivation fix
Former-commit-id:
de455e0d
上级
cffd2904
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
36 addition
and
9 deletion
+36
-9
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCAbstractValueHandler.java
...beaver/model/impl/jdbc/data/JDBCAbstractValueHandler.java
+22
-4
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/UIUtils.java
....jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/UIUtils.java
+1
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/ResultSetCommandHandler.java
...beaver/ui/controls/resultset/ResultSetCommandHandler.java
+3
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/ResultSetViewer.java
.../jkiss/dbeaver/ui/controls/resultset/ResultSetViewer.java
+10
-2
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCAbstractValueHandler.java
浏览文件 @
670bb5a7
...
...
@@ -133,6 +133,7 @@ public abstract class JDBCAbstractValueHandler implements DBDValueHandler {
protected
abstract
class
ValueEditor
<
T
extends
Control
>
implements
DBDValueEditor
{
protected
final
DBDValueController
valueController
;
protected
final
T
control
;
private
boolean
activated
;
protected
ValueEditor
(
final
DBDValueController
valueController
)
{
this
.
valueController
=
valueController
;
...
...
@@ -166,22 +167,39 @@ public abstract class JDBCAbstractValueHandler implements DBDValueHandler {
protected
void
initInlineControl
(
final
Control
inlineControl
)
{
boolean
isInline
=
(
valueController
.
getEditType
()
==
DBDValueController
.
EditType
.
INLINE
);
// Panel controls
inlineControl
.
addFocusListener
(
new
FocusListener
()
{
@Override
public
void
focusGained
(
FocusEvent
e
)
{
UIUtils
.
enableHostEditorKeyBindings
(
valueController
.
getValueSite
(),
false
);
if
(!
activated
)
{
UIUtils
.
enableHostEditorKeyBindings
(
valueController
.
getValueSite
(),
false
);
activated
=
true
;
}
}
@Override
public
void
focusLost
(
FocusEvent
e
)
{
UIUtils
.
enableHostEditorKeyBindings
(
valueController
.
getValueSite
(),
true
);
if
(
activated
)
{
UIUtils
.
enableHostEditorKeyBindings
(
valueController
.
getValueSite
(),
true
);
activated
=
false
;
}
}
});
inlineControl
.
addDisposeListener
(
new
DisposeListener
()
{
@Override
public
void
widgetDisposed
(
DisposeEvent
e
)
{
if
(
activated
)
{
UIUtils
.
enableHostEditorKeyBindings
(
valueController
.
getValueSite
(),
true
);
activated
=
false
;
}
}
});
boolean
isInline
=
(
valueController
.
getEditType
()
==
DBDValueController
.
EditType
.
INLINE
);
// if (!isInline) {
// inlineControl.setBackground(valueController.getEditPlaceholder().getBackground());
// }
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/UIUtils.java
浏览文件 @
670bb5a7
...
...
@@ -1137,6 +1137,7 @@ public class UIUtils {
}
catch
(
Exception
e
)
{
log
.
debug
(
e
);
}
}
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/ResultSetCommandHandler.java
浏览文件 @
670bb5a7
...
...
@@ -87,13 +87,13 @@ public class ResultSetCommandHandler extends SpreadsheetCommandHandler {
}
else
if
(
actionId
.
equals
(
CMD_REJECT_CHANGES
))
{
resultSet
.
rejectChanges
();
}
else
if
(
actionId
.
equals
(
IWorkbenchCommandConstants
.
EDIT_COPY
))
{
resultSet
.
copySelectionToClipboard
(
false
,
DBDDisplayFormat
.
EDIT
);
resultSet
.
copySelectionToClipboard
(
false
,
false
,
DBDDisplayFormat
.
EDIT
);
}
else
if
(
actionId
.
equals
(
ICommandIds
.
CMD_COPY_SPECIAL
))
{
resultSet
.
copySelectionToClipboard
(
true
,
DBDDisplayFormat
.
UI
);
resultSet
.
copySelectionToClipboard
(
true
,
false
,
DBDDisplayFormat
.
UI
);
}
else
if
(
actionId
.
equals
(
IWorkbenchCommandConstants
.
EDIT_PASTE
))
{
resultSet
.
pasteCellValue
();
}
else
if
(
actionId
.
equals
(
IWorkbenchCommandConstants
.
EDIT_CUT
))
{
resultSet
.
copySelectionToClipboard
(
false
,
DBDDisplayFormat
.
EDIT
);
resultSet
.
copySelectionToClipboard
(
false
,
true
,
DBDDisplayFormat
.
EDIT
);
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/ResultSetViewer.java
浏览文件 @
670bb5a7
...
...
@@ -1682,7 +1682,7 @@ public class ResultSetViewer extends Viewer implements IDataSourceProvider, ISpr
new
DataUpdater
().
rejectChanges
();
}
public
void
copySelectionToClipboard
(
boolean
copyHeader
,
DBDDisplayFormat
format
)
public
void
copySelectionToClipboard
(
boolean
copyHeader
,
boolean
cut
,
DBDDisplayFormat
format
)
{
String
lineSeparator
=
ContentUtils
.
getDefaultLineSeparator
();
List
<
Integer
>
colsSelected
=
new
ArrayList
<
Integer
>();
...
...
@@ -1738,7 +1738,8 @@ public class ResultSetViewer extends Viewer implements IDataSourceProvider, ISpr
prevCol
=
pos
.
col
;
}
GridPos
cellPos
=
translateGridPos
(
pos
);
Object
value
=
curRows
.
get
(
cellPos
.
row
)[
cellPos
.
col
];
Object
[]
curRow
=
curRows
.
get
(
cellPos
.
row
);
Object
value
=
curRow
[
cellPos
.
col
];
String
cellText
=
metaColumns
[
cellPos
.
col
].
getValueHandler
().
getValueDisplayString
(
metaColumns
[
cellPos
.
col
].
getAttribute
(),
value
,
...
...
@@ -1746,6 +1747,13 @@ public class ResultSetViewer extends Viewer implements IDataSourceProvider, ISpr
if
(
cellText
!=
null
)
{
tdt
.
append
(
cellText
);
}
if
(
cut
)
{
DBDValueController
valueController
=
new
ResultSetValueController
(
curRow
,
cellPos
.
col
,
DBDValueController
.
EditType
.
NONE
,
null
);
if
(!
valueController
.
isReadOnly
())
{
valueController
.
updateValue
(
DBUtils
.
makeNullValue
(
valueController
));
}
}
}
if
(
tdt
.
length
()
>
0
)
{
TextTransfer
textTransfer
=
TextTransfer
.
getInstance
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录