Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
2efc4987
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,发现更多精彩内容 >>
提交
2efc4987
编写于
4月 07, 2018
作者:
A
Alexander Fedorov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#3259 replace variable with the most recent
上级
9bb25b4b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
37 addition
and
7 deletion
+37
-7
plugins/org.jkiss.dbeaver.debug.core/src/org/jkiss/dbeaver/debug/DBGVariable.java
...r.debug.core/src/org/jkiss/dbeaver/debug/DBGVariable.java
+2
-0
plugins/org.jkiss.dbeaver.debug.core/src/org/jkiss/dbeaver/debug/core/model/DatabaseStackFrame.java
...rg/jkiss/dbeaver/debug/core/model/DatabaseStackFrame.java
+26
-0
plugins/org.jkiss.dbeaver.ext.postgresql.debug.core/src/org/jkiss/dbeaver/ext/postgresql/debug/internal/impl/PostgreDebugSession.java
...t/postgresql/debug/internal/impl/PostgreDebugSession.java
+1
-1
plugins/org.jkiss.dbeaver.ext.postgresql.debug.core/src/org/jkiss/dbeaver/ext/postgresql/debug/internal/impl/PostgreDebugVariable.java
.../postgresql/debug/internal/impl/PostgreDebugVariable.java
+8
-6
未找到文件。
plugins/org.jkiss.dbeaver.debug.core/src/org/jkiss/dbeaver/debug/DBGVariable.java
浏览文件 @
2efc4987
...
...
@@ -27,4 +27,6 @@ public interface DBGVariable<T> {
DBGVariableType
getType
();
int
getLineNumber
();
}
plugins/org.jkiss.dbeaver.debug.core/src/org/jkiss/dbeaver/debug/core/model/DatabaseStackFrame.java
浏览文件 @
2efc4987
...
...
@@ -19,7 +19,9 @@
package
org.jkiss.dbeaver.debug.core.model
;
import
java.util.ArrayList
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.eclipse.core.runtime.IStatus
;
import
org.eclipse.debug.core.DebugException
;
...
...
@@ -28,6 +30,7 @@ import org.eclipse.debug.core.model.IStackFrame;
import
org.eclipse.debug.core.model.IThread
;
import
org.eclipse.debug.core.model.IVariable
;
import
org.eclipse.osgi.util.NLS
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.debug.DBGException
;
import
org.jkiss.dbeaver.debug.DBGStackFrame
;
import
org.jkiss.dbeaver.debug.DBGVariable
;
...
...
@@ -38,6 +41,8 @@ public class DatabaseStackFrame extends DatabaseDebugElement implements IStackFr
private
static
final
IRegisterGroup
[]
NO_REGISTER_GROUPS
=
new
IRegisterGroup
[
0
];
private
static
final
IVariable
[]
NO_VARIABLES
=
new
IVariable
[
0
];
private
static
Log
log
=
Log
.
getLog
(
DatabaseStackFrame
.
class
);
private
final
List
<
DatabaseVariable
>
variables
=
new
ArrayList
<
DatabaseVariable
>();
private
final
DatabaseThread
thread
;
...
...
@@ -154,8 +159,29 @@ public class DatabaseStackFrame extends DatabaseDebugElement implements IStackFr
protected
void
rebuildVariables
(
List
<?
extends
DBGVariable
<?>>
dbgVariables
)
{
try
{
int
frameLN
=
dbgStackFrame
.
getLineNumber
();
variables
.
clear
();
Map
<
String
,
DBGVariable
<?>>
filtered
=
new
LinkedHashMap
<
String
,
DBGVariable
<?>>();
for
(
DBGVariable
<?>
dbgVariable
:
dbgVariables
)
{
String
name
=
dbgVariable
.
getName
();
DBGVariable
<?>
existing
=
filtered
.
get
(
name
);
if
(
existing
==
null
)
{
filtered
.
put
(
name
,
dbgVariable
);
}
else
{
int
existingLN
=
existing
.
getLineNumber
();
int
currentLN
=
dbgVariable
.
getLineNumber
();
int
delta
=
currentLN
-
existingLN
;
if
(
delta
>=
0
)
{
filtered
.
put
(
name
,
dbgVariable
);
}
else
{
String
pattern
=
"Already have {0} and ignored {1} for frame at {2}"
;
String
message
=
NLS
.
bind
(
pattern
,
new
Object
[]{
existing
,
dbgVariable
,
frameLN
});
log
.
error
(
message
);;
}
}
}
for
(
DBGVariable
<?>
dbgVariable
:
filtered
.
values
())
{
DatabaseVariable
variable
=
new
DatabaseVariable
(
getDatabaseDebugTarget
(),
dbgVariable
);
variables
.
add
(
variable
);
}
...
...
plugins/org.jkiss.dbeaver.ext.postgresql.debug.core/src/org/jkiss/dbeaver/ext/postgresql/debug/internal/impl/PostgreDebugSession.java
浏览文件 @
2efc4987
...
...
@@ -534,7 +534,7 @@ public class PostgreDebugSession extends DBGBaseSession {
stmt
.
setInt
(
1
,
sessionId
);
stmt
.
setString
(
2
,
var
.
getName
());
stmt
.
setInt
(
3
,
var
.
getLine
n
umber
());
stmt
.
setInt
(
3
,
var
.
getLine
N
umber
());
stmt
.
setString
(
4
,
(
String
)
value
);
stmt
.
execute
();
...
...
plugins/org.jkiss.dbeaver.ext.postgresql.debug.core/src/org/jkiss/dbeaver/ext/postgresql/debug/internal/impl/PostgreDebugVariable.java
浏览文件 @
2efc4987
...
...
@@ -28,7 +28,7 @@ public class PostgreDebugVariable implements DBGVariable<String> {
private
final
String
varclass
;
private
final
int
line
n
umber
;
private
final
int
line
N
umber
;
private
final
boolean
unique
;
...
...
@@ -63,7 +63,7 @@ public class PostgreDebugVariable implements DBGVariable<String> {
super
();
this
.
name
=
name
;
this
.
varclass
=
varclass
;
this
.
line
n
umber
=
linenumber
;
this
.
line
N
umber
=
linenumber
;
this
.
unique
=
unique
;
this
.
constant
=
constant
;
this
.
notnull
=
notnull
;
...
...
@@ -75,8 +75,9 @@ public class PostgreDebugVariable implements DBGVariable<String> {
return
varclass
;
}
public
int
getLinenumber
()
{
return
linenumber
;
@Override
public
int
getLineNumber
()
{
return
lineNumber
;
}
public
boolean
isUnique
()
{
...
...
@@ -95,10 +96,11 @@ public class PostgreDebugVariable implements DBGVariable<String> {
return
oid
;
}
@SuppressWarnings
(
"nls"
)
@Override
public
String
toString
()
{
return
"PostgreDebugVariable [name="
+
name
+
", val="
+
val
+
", varclass="
+
varclass
+
", line
n
umber="
+
line
n
umber
+
", unique="
+
unique
+
", constant="
+
constant
+
", notnull="
+
notnull
+
", oid="
+
oid
return
"PostgreDebugVariable [name="
+
name
+
", val="
+
val
+
", varclass="
+
varclass
+
", line
N
umber="
+
line
N
umber
+
", unique="
+
unique
+
", constant="
+
constant
+
", notnull="
+
notnull
+
", oid="
+
oid
+
"]"
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录