Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
48bdf41c
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,发现更多精彩内容 >>
提交
48bdf41c
编写于
11月 15, 2013
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Completion processor fix
上级
e6f0f581
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
33 addition
and
5 deletion
+33
-5
plugins/org.jkiss.dbeaver.core/plugin.properties
plugins/org.jkiss.dbeaver.core/plugin.properties
+1
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/sql/syntax/SQLCompletionProcessor.java
...dbeaver/ui/editors/sql/syntax/SQLCompletionProcessor.java
+8
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/sql/syntax/SQLCompletionProposal.java
.../dbeaver/ui/editors/sql/syntax/SQLCompletionProposal.java
+13
-3
plugins/org.jkiss.dbeaver.generic/src/org/jkiss/dbeaver/ext/generic/model/GenericStructureAssistant.java
.../dbeaver/ext/generic/model/GenericStructureAssistant.java
+11
-0
未找到文件。
plugins/org.jkiss.dbeaver.core/plugin.properties
浏览文件 @
48bdf41c
...
...
@@ -246,6 +246,7 @@ meta.org.jkiss.dbeaver.model.impl.struct.AbstractAttribute.maxLength.name=Length
meta.org.jkiss.dbeaver.model.impl.struct.AbstractAttribute.required.name
=
Not Null
meta.org.jkiss.dbeaver.model.impl.struct.AbstractAttribute.scale.name
=
Scale
meta.org.jkiss.dbeaver.model.impl.struct.AbstractAttribute.precision.name
=
Precision
meta.org.jkiss.dbeaver.model.impl.struct.AbstractAttribute.sequence.name
=
Position
meta.org.jkiss.dbeaver.model.impl.struct.AbstractProcedure.name.name
=
Procedure Name
meta.org.jkiss.dbeaver.model.impl.struct.AbstractProcedure.description.name
=
Procedure Description
meta.org.jkiss.dbeaver.model.impl.struct.AbstractTable.name.name
=
Table Name
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/sql/syntax/SQLCompletionProcessor.java
浏览文件 @
48bdf41c
...
...
@@ -295,9 +295,15 @@ public class SQLCompletionProcessor implements IContentAssistProcessor
makeProposalsFromChildren
(
monitor
,
childObject
,
lastToken
,
proposals
);
if
(
proposals
.
isEmpty
()
||
tokens
.
size
()
==
1
)
{
// At last - try to find child tables by pattern
DBSStructureAssistant
structureAssistant
=
DBUtils
.
getAdapter
(
DBSStructureAssistant
.
class
,
childObject
);
DBSStructureAssistant
structureAssistant
=
null
;
for
(
DBSObject
object
=
childObject
;
object
!=
null
;
object
=
object
.
getParentObject
())
{
structureAssistant
=
DBUtils
.
getAdapter
(
DBSStructureAssistant
.
class
,
object
);
if
(
structureAssistant
!=
null
)
{
break
;
}
}
if
(
structureAssistant
!=
null
)
{
makeProposalsFromAssistant
(
monitor
,
structureAssistant
,
rootContainer
,
lastToken
,
proposals
);
makeProposalsFromAssistant
(
monitor
,
structureAssistant
,
sc
,
lastToken
,
proposals
);
}
}
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/sql/syntax/SQLCompletionProposal.java
浏览文件 @
48bdf41c
...
...
@@ -44,7 +44,8 @@ public class SQLCompletionProposal implements ICompletionProposal, ICompletionPr
private
String
displayString
;
/** The replacement string. */
private
String
replacementString
;
private
String
replacementLower
;
private
String
replacementFull
;
private
String
replacementLast
;
/** The replacement offset. */
private
int
replacementOffset
;
/** The replacement length. */
...
...
@@ -63,7 +64,13 @@ public class SQLCompletionProposal implements ICompletionProposal, ICompletionPr
this
.
syntaxManager
=
syntaxManager
;
this
.
displayString
=
displayString
;
this
.
replacementString
=
replacementString
;
this
.
replacementLower
=
replacementString
.
toLowerCase
();
this
.
replacementFull
=
replacementString
.
toLowerCase
();
int
divPos
=
this
.
replacementFull
.
lastIndexOf
(
syntaxManager
.
getStructSeparator
());
if
(
divPos
==
-
1
)
{
this
.
replacementLast
=
null
;
}
else
{
this
.
replacementLast
=
this
.
replacementFull
.
substring
(
divPos
+
1
);
}
this
.
cursorPosition
=
cursorPosition
;
this
.
image
=
image
;
this
.
contextInformation
=
contextInformation
;
...
...
@@ -165,7 +172,10 @@ public class SQLCompletionProposal implements ICompletionProposal, ICompletionPr
if
(
divPos
!=
-
1
)
{
wordPart
=
wordPart
.
substring
(
divPos
+
1
);
}
if
(!
CommonUtils
.
isEmpty
(
wordPart
)
&&
replacementLower
.
startsWith
(
wordPart
.
toLowerCase
()))
{
String
wordLower
=
wordPart
.
toLowerCase
();
if
(!
CommonUtils
.
isEmpty
(
wordPart
)
&&
(
replacementFull
.
startsWith
(
wordLower
)
||
(
this
.
replacementLast
!=
null
&&
this
.
replacementLast
.
startsWith
(
wordLower
))))
{
setPosition
(
wordDetector
);
return
true
;
}
else
{
...
...
plugins/org.jkiss.dbeaver.generic/src/org/jkiss/dbeaver/ext/generic/model/GenericStructureAssistant.java
浏览文件 @
48bdf41c
...
...
@@ -65,6 +65,17 @@ public class GenericStructureAssistant extends JDBCStructureAssistant
};
}
public
DBSObjectType
[]
getHyperlinkObjectTypes
()
{
return
getSupportedObjectTypes
();
}
@Override
public
DBSObjectType
[]
getAutoCompleteObjectTypes
()
{
return
getSupportedObjectTypes
();
}
@Override
protected
void
findObjectsByMask
(
JDBCSession
session
,
DBSObjectType
objectType
,
DBSObject
parentObject
,
String
objectNameMask
,
boolean
caseSensitive
,
int
maxResults
,
List
<
DBSObjectReference
>
references
)
throws
DBException
,
SQLException
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录