Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
92f2993a
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,发现更多精彩内容 >>
提交
92f2993a
编写于
6月 24, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Properties model refactoring (get rid of jface)
上级
b58c6b3d
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
17 addition
and
32 deletion
+17
-32
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/itemlist/ObjectListControl.java
...jkiss/dbeaver/ui/controls/itemlist/ObjectListControl.java
+2
-5
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/properties/DataSourcePropertyFilter.java
...jkiss/dbeaver/ui/properties/DataSourcePropertyFilter.java
+3
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/properties/IPropertyFilter.java
.../src/org/jkiss/dbeaver/ui/properties/IPropertyFilter.java
+7
-12
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/properties/ObjectAttributeDescriptor.java
...kiss/dbeaver/ui/properties/ObjectAttributeDescriptor.java
+2
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/properties/ObjectPropertyGroupDescriptor.java
.../dbeaver/ui/properties/ObjectPropertyGroupDescriptor.java
+1
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/properties/PropertyDescriptorDelegate.java
...iss/dbeaver/ui/properties/PropertyDescriptorDelegate.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/properties/PropertySourceAbstract.java
...g/jkiss/dbeaver/ui/properties/PropertySourceAbstract.java
+1
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/properties/ProxyPropertyDescriptor.java
.../jkiss/dbeaver/ui/properties/ProxyPropertyDescriptor.java
+0
-4
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/itemlist/ObjectListControl.java
浏览文件 @
92f2993a
...
...
@@ -43,10 +43,7 @@ import org.jkiss.dbeaver.ui.DBeaverIcons;
import
org.jkiss.dbeaver.ui.UIUtils
;
import
org.jkiss.dbeaver.ui.controls.ObjectViewerRenderer
;
import
org.jkiss.dbeaver.ui.controls.ProgressPageControl
;
import
org.jkiss.dbeaver.ui.properties.DataSourcePropertyFilter
;
import
org.jkiss.dbeaver.ui.properties.ObjectAttributeDescriptor
;
import
org.jkiss.dbeaver.ui.properties.ObjectPropertyDescriptor
;
import
org.jkiss.dbeaver.ui.properties.PropertySourceAbstract
;
import
org.jkiss.dbeaver.ui.properties.*
;
import
org.jkiss.utils.ArrayUtils
;
import
org.jkiss.utils.CommonUtils
;
...
...
@@ -368,7 +365,7 @@ public abstract class ObjectListControl<OBJECT_TYPE> extends ProgressPageControl
}
}
IFilter
propertyFilter
=
new
DataSourcePropertyFilter
(
I
Property
Filter
propertyFilter
=
new
DataSourcePropertyFilter
(
ObjectListControl
.
this
instanceof
IDataSourceContainerProvider
?
((
IDataSourceContainerProvider
)
ObjectListControl
.
this
).
getDataSourceContainer
()
:
null
);
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/properties/DataSourcePropertyFilter.java
浏览文件 @
92f2993a
...
...
@@ -17,17 +17,17 @@
*/
package
org.jkiss.dbeaver.ui.properties
;
import
org.eclipse.jface.viewers.IFilter
;
import
org.jkiss.dbeaver.DBeaverPreferences
;
import
org.jkiss.dbeaver.core.DBeaverCore
;
import
org.jkiss.dbeaver.model.DBPDataSource
;
import
org.jkiss.dbeaver.model.DBPPreferenceStore
;
import
org.jkiss.dbeaver.model.DBPPropertyDescriptor
;
import
org.jkiss.dbeaver.model.struct.DBSDataSourceContainer
;
/**
* Datasource property filter
*/
public
class
DataSourcePropertyFilter
implements
IFilter
{
public
class
DataSourcePropertyFilter
implements
I
Property
Filter
{
private
final
boolean
showExpensive
;
...
...
@@ -49,7 +49,7 @@ public class DataSourcePropertyFilter implements IFilter {
}
@Override
public
boolean
select
(
Object
toTest
)
public
boolean
select
(
DBPPropertyDescriptor
toTest
)
{
if
(
toTest
instanceof
ObjectPropertyDescriptor
)
{
ObjectPropertyDescriptor
prop
=
(
ObjectPropertyDescriptor
)
toTest
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/properties/
PropertyView
Filter.java
→
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/properties/
IProperty
Filter.java
浏览文件 @
92f2993a
...
...
@@ -17,19 +17,14 @@
*/
package
org.jkiss.dbeaver.ui.properties
;
import
org.eclipse.jface.viewers.IFilter
;
import
org.eclipse.ui.views.properties.IPropertyDescriptor
;
import
org.jkiss.dbeaver.model.DBPPropertyDescriptor
;
/**
*
Standard filter for property view
*
Interface for filters. Can accept or reject items.
*/
public
class
PropertyViewFilter
implements
IFilter
{
public
static
final
PropertyViewFilter
INSTANCE
=
new
PropertyViewFilter
();
@Override
public
boolean
select
(
Object
toTest
)
{
return
toTest
instanceof
IPropertyDescriptor
&&
!
"name"
.
equals
(((
IPropertyDescriptor
)
toTest
).
getId
());
}
public
interface
IPropertyFilter
{
/**
* Determines if the given property passes this filter.
*/
boolean
select
(
DBPPropertyDescriptor
toTest
);
}
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/properties/ObjectAttributeDescriptor.java
浏览文件 @
92f2993a
...
...
@@ -17,7 +17,6 @@
*/
package
org.jkiss.dbeaver.ui.properties
;
import
org.eclipse.jface.viewers.IFilter
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.dbeaver.core.Log
;
import
org.jkiss.dbeaver.model.DBPPropertySource
;
...
...
@@ -152,14 +151,14 @@ public abstract class ObjectAttributeDescriptor {
public
static
List
<
ObjectPropertyDescriptor
>
extractAnnotations
(
DBPPropertySource
source
,
Class
<?>
theClass
,
IFilter
filter
)
I
Property
Filter
filter
)
{
List
<
ObjectPropertyDescriptor
>
annoProps
=
new
ArrayList
<
ObjectPropertyDescriptor
>();
extractAnnotations
(
source
,
null
,
theClass
,
annoProps
,
filter
);
return
annoProps
;
}
static
void
extractAnnotations
(
DBPPropertySource
source
,
ObjectPropertyGroupDescriptor
parent
,
Class
<?>
theClass
,
List
<
ObjectPropertyDescriptor
>
annoProps
,
IFilter
filter
)
static
void
extractAnnotations
(
DBPPropertySource
source
,
ObjectPropertyGroupDescriptor
parent
,
Class
<?>
theClass
,
List
<
ObjectPropertyDescriptor
>
annoProps
,
I
Property
Filter
filter
)
{
Method
[]
methods
=
theClass
.
getMethods
();
for
(
Method
method
:
methods
)
{
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/properties/ObjectPropertyGroupDescriptor.java
浏览文件 @
92f2993a
...
...
@@ -17,7 +17,6 @@
*/
package
org.jkiss.dbeaver.ui.properties
;
import
org.eclipse.jface.viewers.IFilter
;
import
org.jkiss.dbeaver.model.DBPPropertySource
;
import
org.jkiss.dbeaver.model.meta.PropertyGroup
;
import
org.jkiss.dbeaver.model.runtime.DBRProgressMonitor
;
...
...
@@ -41,7 +40,7 @@ public class ObjectPropertyGroupDescriptor extends ObjectAttributeDescriptor
ObjectPropertyGroupDescriptor
parent
,
Method
getter
,
PropertyGroup
groupInfo
,
IFilter
filter
)
I
Property
Filter
filter
)
{
super
(
source
,
parent
,
getter
,
groupInfo
.
id
(),
groupInfo
.
order
());
this
.
groupInfo
=
groupInfo
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/properties/PropertyDescriptorDelegate.java
浏览文件 @
92f2993a
...
...
@@ -40,7 +40,7 @@ public class PropertyDescriptorDelegate implements IPropertyDescriptor
@Override
public
CellEditor
createPropertyEditor
(
Composite
parent
)
{
return
UIUtils
.
createCellEditor
(
parent
,
propSource
,
source
);
return
UIUtils
.
createCellEditor
(
parent
,
propSource
.
getEditableValue
()
,
source
);
}
@Override
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/properties/PropertySourceAbstract.java
浏览文件 @
92f2993a
...
...
@@ -19,7 +19,6 @@ package org.jkiss.dbeaver.ui.properties;
import
org.eclipse.core.runtime.jobs.IJobChangeEvent
;
import
org.eclipse.core.runtime.jobs.JobChangeAdapter
;
import
org.eclipse.jface.viewers.IFilter
;
import
org.eclipse.swt.widgets.Shell
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.core.Log
;
...
...
@@ -285,7 +284,7 @@ public abstract class PropertySourceAbstract implements DBPPropertySource, IProp
propValues
.
clear
();
final
Object
editableValue
=
getEditableValue
();
IFilter
filter
;
I
Property
Filter
filter
;
if
(
editableValue
instanceof
DBSObject
)
{
filter
=
new
DataSourcePropertyFilter
(((
DBSObject
)
editableValue
).
getDataSource
());
}
else
if
(
editableValue
instanceof
DBPContextProvider
)
{
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/properties/ProxyPropertyDescriptor.java
浏览文件 @
92f2993a
...
...
@@ -17,10 +17,6 @@
*/
package
org.jkiss.dbeaver.ui.properties
;
import
org.eclipse.jface.viewers.CellEditor
;
import
org.eclipse.jface.viewers.ILabelProvider
;
import
org.eclipse.swt.widgets.Composite
;
import
org.eclipse.ui.views.properties.IPropertyDescriptor
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.dbeaver.model.DBPPropertyDescriptor
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录