Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
5bc93abf
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,发现更多精彩内容 >>
提交
5bc93abf
编写于
9月 23, 2016
作者:
S
serge-rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Image detection refactoring
上级
3c8bc43a
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
34 addition
and
24 deletion
+34
-24
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/panel/AggregateColumnsPanel.java
...er/ui/controls/resultset/panel/AggregateColumnsPanel.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/panel/MetaDataPanel.java
...ss/dbeaver/ui/controls/resultset/panel/MetaDataPanel.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/spreadsheet/SpreadsheetPresentation.java
...ntrols/resultset/spreadsheet/SpreadsheetPresentation.java
+2
-2
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/data/DB2ValueHandlerProvider.java
...g/jkiss/dbeaver/ext/db2/data/DB2ValueHandlerProvider.java
+1
-1
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/data/MySQLValueHandlerProvider.java
...iss/dbeaver/ext/mysql/data/MySQLValueHandlerProvider.java
+1
-1
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/data/OracleValueHandlerProvider.java
...s/dbeaver/ext/oracle/data/OracleValueHandlerProvider.java
+1
-1
plugins/org.jkiss.dbeaver.ext.phoenix/src/org/jkiss/dbeaver/ext/phoenix/model/data/PhoenixValueHandlerProvider.java
...r/ext/phoenix/model/data/PhoenixValueHandlerProvider.java
+1
-1
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/data/PostgreValueHandlerProvider.java
...xt/postgresql/model/data/PostgreValueHandlerProvider.java
+1
-1
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/DBUtils.java
...ss.dbeaver.model/src/org/jkiss/dbeaver/model/DBUtils.java
+18
-7
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/data/DBDAttributeBindingElement.java
.../jkiss/dbeaver/model/data/DBDAttributeBindingElement.java
+1
-1
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/data/DBDAttributeBindingType.java
...org/jkiss/dbeaver/model/data/DBDAttributeBindingType.java
+1
-1
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/data/AttributeMetaDataProxy.java
...jkiss/dbeaver/model/impl/data/AttributeMetaDataProxy.java
+1
-1
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/jdbc/data/handlers/JDBCStandardValueHandlerProvider.java
.../jdbc/data/handlers/JDBCStandardValueHandlerProvider.java
+1
-2
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/jdbc/exec/JDBCColumnMetaData.java
...kiss/dbeaver/model/impl/jdbc/exec/JDBCColumnMetaData.java
+1
-1
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/jdbc/struct/JDBCAttribute.java
...g/jkiss/dbeaver/model/impl/jdbc/struct/JDBCAttribute.java
+1
-1
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/local/LocalResultSetColumn.java
.../jkiss/dbeaver/model/impl/local/LocalResultSetColumn.java
+1
-1
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/panel/AggregateColumnsPanel.java
浏览文件 @
5bc93abf
...
...
@@ -253,7 +253,7 @@ public class AggregateColumnsPanel implements IResultSetPanel {
for
(
Map
.
Entry
<
DBDAttributeBinding
,
List
<
Object
>>
entry
:
attrValues
.
entrySet
())
{
TreeItem
attrItem
=
new
TreeItem
(
aggregateTable
,
SWT
.
NONE
);
attrItem
.
setText
(
entry
.
getKey
().
getName
());
attrItem
.
setImage
(
DBeaverIcons
.
getImage
(
DBUtils
.
get
DataIcon
(
entry
.
getKey
())));
attrItem
.
setImage
(
DBeaverIcons
.
getImage
(
DBUtils
.
get
TypeImage
(
entry
.
getKey
())));
aggregateValues
(
attrItem
,
entry
.
getValue
());
attrItem
.
setExpanded
(
true
);
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/panel/MetaDataPanel.java
浏览文件 @
5bc93abf
...
...
@@ -170,7 +170,7 @@ public class MetaDataPanel implements IResultSetPanel {
@Nullable
@Override
protected
DBPImage
getObjectImage
(
DBDAttributeBinding
item
)
{
return
DBUtils
.
get
Type
Image
(
item
.
getMetaAttribute
());
return
DBUtils
.
get
Object
Image
(
item
.
getMetaAttribute
());
}
@Override
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/resultset/spreadsheet/SpreadsheetPresentation.java
浏览文件 @
5bc93abf
...
...
@@ -1302,7 +1302,7 @@ public class SpreadsheetPresentation extends AbstractPresentation implements IRe
Object
cellValue
=
getCellValue
(
colElement
,
rowElement
,
false
);
if
(
cellValue
instanceof
DBDContent
||
cellValue
instanceof
DBDReference
)
{
DBDAttributeBinding
attr
=
(
DBDAttributeBinding
)(
controller
.
isRecordMode
()
?
rowElement
:
colElement
);
return
DBUtils
.
get
Type
Image
(
attr
.
getMetaAttribute
());
return
DBUtils
.
get
Object
Image
(
attr
.
getMetaAttribute
());
}
else
{
return
null
;
}
...
...
@@ -1381,7 +1381,7 @@ public class SpreadsheetPresentation extends AbstractPresentation implements IRe
public
Image
getImage
(
Object
element
)
{
if
(
element
instanceof
DBDAttributeBinding
/* && (!isRecordMode() || !model.isDynamicMetadata())*/
)
{
return
DBeaverIcons
.
getImage
(
DBUtils
.
get
Type
Image
(((
DBDAttributeBinding
)
element
).
getMetaAttribute
()));
return
DBeaverIcons
.
getImage
(
DBUtils
.
get
Object
Image
(((
DBDAttributeBinding
)
element
).
getMetaAttribute
()));
}
return
null
;
}
...
...
plugins/org.jkiss.dbeaver.ext.db2/src/org/jkiss/dbeaver/ext/db2/data/DB2ValueHandlerProvider.java
浏览文件 @
5bc93abf
...
...
@@ -37,7 +37,7 @@ public class DB2ValueHandlerProvider implements DBDValueHandlerProvider {
@Override
public
DBPImage
getTypeImage
(
DBSTypedObject
type
)
{
return
DBUtils
.
get
DataIcon
(
type
);
return
DBUtils
.
get
TypeImage
(
type
);
}
@Override
...
...
plugins/org.jkiss.dbeaver.ext.mysql/src/org/jkiss/dbeaver/ext/mysql/data/MySQLValueHandlerProvider.java
浏览文件 @
5bc93abf
...
...
@@ -35,7 +35,7 @@ public class MySQLValueHandlerProvider implements DBDValueHandlerProvider {
@Override
public
DBPImage
getTypeImage
(
DBSTypedObject
type
)
{
return
DBUtils
.
get
DataIcon
(
type
);
return
DBUtils
.
get
TypeImage
(
type
);
}
@Nullable
...
...
plugins/org.jkiss.dbeaver.ext.oracle/src/org/jkiss/dbeaver/ext/oracle/data/OracleValueHandlerProvider.java
浏览文件 @
5bc93abf
...
...
@@ -34,7 +34,7 @@ public class OracleValueHandlerProvider implements DBDValueHandlerProvider {
@Override
public
DBPImage
getTypeImage
(
DBSTypedObject
type
)
{
return
DBUtils
.
get
DataIcon
(
type
);
return
DBUtils
.
get
TypeImage
(
type
);
}
@Override
...
...
plugins/org.jkiss.dbeaver.ext.phoenix/src/org/jkiss/dbeaver/ext/phoenix/model/data/PhoenixValueHandlerProvider.java
浏览文件 @
5bc93abf
...
...
@@ -36,7 +36,7 @@ public class PhoenixValueHandlerProvider implements DBDValueHandlerProvider {
@Override
public
DBPImage
getTypeImage
(
DBSTypedObject
type
)
{
return
DBUtils
.
get
DataIcon
(
type
);
return
DBUtils
.
get
TypeImage
(
type
);
}
@Nullable
...
...
plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/data/PostgreValueHandlerProvider.java
浏览文件 @
5bc93abf
...
...
@@ -37,7 +37,7 @@ public class PostgreValueHandlerProvider implements DBDValueHandlerProvider {
@Override
public
DBPImage
getTypeImage
(
DBSTypedObject
type
)
{
return
DBUtils
.
get
DataIcon
(
type
);
return
DBUtils
.
get
TypeImage
(
type
);
}
@Nullable
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/DBUtils.java
浏览文件 @
5bc93abf
...
...
@@ -1253,10 +1253,16 @@ public final class DBUtils {
}
@NotNull
public
static
DB
Icon
getDataIcon
(
@NotNull
DBSTypedObject
type
)
public
static
DB
PImage
getTypeImage
(
@NotNull
DBSTypedObject
typedObject
)
{
String
typeName
=
type
.
getTypeName
();
switch
(
type
.
getDataKind
())
{
if
(
typedObject
instanceof
DBSTypedObjectEx
)
{
DBSDataType
dataType
=
((
DBSTypedObjectEx
)
typedObject
).
getDataType
();
if
(
dataType
instanceof
DBPImageProvider
)
{
return
((
DBPImageProvider
)
dataType
).
getObjectImage
();
}
}
String
typeName
=
typedObject
.
getTypeName
();
switch
(
typedObject
.
getDataKind
())
{
case
BOOLEAN:
return
DBIcon
.
TYPE_BOOLEAN
;
case
STRING:
...
...
@@ -1297,14 +1303,19 @@ public final class DBUtils {
}
@NotNull
public
static
DBPImage
get
TypeImage
(
DBSTypedObject
column
)
public
static
DBPImage
get
ObjectImage
(
DBPObject
object
)
{
DBPImage
image
=
null
;
if
(
column
instanceof
DBPImageProvider
)
{
image
=
((
DBPImageProvider
)
column
).
getObjectImage
();
if
(
object
instanceof
DBPImageProvider
)
{
image
=
((
DBPImageProvider
)
object
).
getObjectImage
();
}
if
(
image
==
null
)
{
image
=
DBIcon
.
TREE_COLUMN
;
if
(
object
instanceof
DBSTypedObject
)
{
image
=
getTypeImage
((
DBSTypedObject
)
object
);
}
if
(
image
==
null
)
{
image
=
DBIcon
.
TYPE_OBJECT
;
}
}
return
image
;
}
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/data/DBDAttributeBindingElement.java
浏览文件 @
5bc93abf
...
...
@@ -154,6 +154,6 @@ public class DBDAttributeBindingElement extends DBDAttributeBindingNested implem
if
(
collection
.
getComponentType
()
instanceof
DBPImageProvider
)
{
return
((
DBPImageProvider
)
collection
.
getComponentType
()).
getObjectImage
();
}
return
DBUtils
.
get
DataIcon
(
collection
.
getComponentType
());
return
DBUtils
.
get
TypeImage
(
collection
.
getComponentType
());
}
}
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/data/DBDAttributeBindingType.java
浏览文件 @
5bc93abf
...
...
@@ -145,7 +145,7 @@ public class DBDAttributeBindingType extends DBDAttributeBindingNested implement
if
(
attribute
instanceof
DBPImageProvider
)
{
return
((
DBPImageProvider
)
attribute
).
getObjectImage
();
}
return
DBUtils
.
get
DataIcon
(
this
);
return
DBUtils
.
get
TypeImage
(
this
);
}
@Override
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/data/AttributeMetaDataProxy.java
浏览文件 @
5bc93abf
...
...
@@ -128,7 +128,7 @@ public class AttributeMetaDataProxy implements DBCAttributeMetaData, DBPImagePro
if
(
attribute
instanceof
DBPImageProvider
)
{
return
((
DBPImageProvider
)
attribute
).
getObjectImage
();
}
return
DBUtils
.
get
DataIcon
(
this
);
return
DBUtils
.
get
TypeImage
(
this
);
}
@Override
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/jdbc/data/handlers/JDBCStandardValueHandlerProvider.java
浏览文件 @
5bc93abf
...
...
@@ -24,7 +24,6 @@ import org.jkiss.dbeaver.model.DBUtils;
import
org.jkiss.dbeaver.model.data.DBDPreferences
;
import
org.jkiss.dbeaver.model.data.DBDValueHandler
;
import
org.jkiss.dbeaver.model.data.DBDValueHandlerProvider
;
import
org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils
;
import
org.jkiss.dbeaver.model.struct.DBSTypedObject
;
/**
...
...
@@ -35,7 +34,7 @@ public class JDBCStandardValueHandlerProvider implements DBDValueHandlerProvider
@Override
public
DBPImage
getTypeImage
(
DBSTypedObject
type
)
{
return
DBUtils
.
get
DataIcon
(
type
);
return
DBUtils
.
get
TypeImage
(
type
);
}
@Override
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/jdbc/exec/JDBCColumnMetaData.java
浏览文件 @
5bc93abf
...
...
@@ -304,7 +304,7 @@ public class JDBCColumnMetaData implements DBCAttributeMetaData, DBPImageProvide
@Nullable
@Override
public
DBPImage
getObjectImage
()
{
return
DBUtils
.
get
DataIcon
(
this
);
return
DBUtils
.
get
TypeImage
(
this
);
}
@Override
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/jdbc/struct/JDBCAttribute.java
浏览文件 @
5bc93abf
...
...
@@ -48,7 +48,7 @@ public abstract class JDBCAttribute extends AbstractAttribute implements DBSObje
@Override
public
DBPImage
getObjectImage
()
{
DBPImage
columnImage
=
DBUtils
.
get
DataIcon
(
this
);
DBPImage
columnImage
=
DBUtils
.
get
TypeImage
(
this
);
JDBCColumnKeyType
keyType
=
getKeyType
();
if
(
keyType
!=
null
)
{
columnImage
=
getOverlayImage
(
columnImage
,
keyType
);
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/local/LocalResultSetColumn.java
浏览文件 @
5bc93abf
...
...
@@ -166,6 +166,6 @@ public class LocalResultSetColumn implements DBCAttributeMetaData, DBPImageProvi
@Nullable
@Override
public
DBPImage
getObjectImage
()
{
return
DBUtils
.
get
DataIcon
(
this
);
return
DBUtils
.
get
TypeImage
(
this
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录