Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
c8358277
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,发现更多精彩内容 >>
提交
c8358277
编写于
6月 24, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Properties moved to runtime
Former-commit-id:
e73c9f07
上级
8b1dac78
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
42 addition
and
14 deletion
+42
-14
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/DBPPropertyManager.java
....core/src/org/jkiss/dbeaver/model/DBPPropertyManager.java
+30
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/data/DBDValueHandler.java
...ore/src/org/jkiss/dbeaver/model/data/DBDValueHandler.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/data/BaseValueHandler.java
...c/org/jkiss/dbeaver/model/impl/data/BaseValueHandler.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/data/DateTimeValueHandler.java
...g/jkiss/dbeaver/model/impl/data/DateTimeValueHandler.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCContentValueHandler.java
...dbeaver/model/impl/jdbc/data/JDBCContentValueHandler.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/runtime/properties/PropertySourceAbstract.java
...ss/dbeaver/runtime/properties/PropertySourceAbstract.java
+4
-6
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/DBPPropertyManager.java
0 → 100644
浏览文件 @
c8358277
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2015 Serge Rieder (serge@jkiss.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License (version 2)
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package
org.jkiss.dbeaver.model
;
import
org.jkiss.code.Nullable
;
/**
* Property manager
*/
public
interface
DBPPropertyManager
extends
DBPPropertySource
{
void
addProperty
(
DBPPropertyDescriptor
prop
);
void
addProperty
(
@Nullable
String
category
,
Object
id
,
String
name
,
Object
value
);
}
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/data/DBDValueHandler.java
浏览文件 @
c8358277
...
@@ -22,9 +22,9 @@ import org.eclipse.jface.action.IContributionManager;
...
@@ -22,9 +22,9 @@ import org.eclipse.jface.action.IContributionManager;
import
org.jkiss.code.NotNull
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.model.DBPPropertyManager
;
import
org.jkiss.dbeaver.model.exec.*
;
import
org.jkiss.dbeaver.model.exec.*
;
import
org.jkiss.dbeaver.model.struct.DBSTypedObject
;
import
org.jkiss.dbeaver.model.struct.DBSTypedObject
;
import
org.jkiss.dbeaver.runtime.properties.PropertySourceAbstract
;
/**
/**
* DBD Value Handler.
* DBD Value Handler.
...
@@ -138,7 +138,7 @@ public interface DBDValueHandler
...
@@ -138,7 +138,7 @@ public interface DBDValueHandler
* @param propertySource property source
* @param propertySource property source
* @param controller value controller
* @param controller value controller
*/
*/
void
contributeProperties
(
@NotNull
PropertySourceAbstract
propertySource
,
@NotNull
DBDValueController
controller
);
void
contributeProperties
(
@NotNull
DBPPropertyManager
propertySource
,
@NotNull
DBDValueController
controller
);
/**
/**
* Creates value editor.
* Creates value editor.
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/data/BaseValueHandler.java
浏览文件 @
c8358277
...
@@ -19,12 +19,12 @@ package org.jkiss.dbeaver.model.impl.data;
...
@@ -19,12 +19,12 @@ package org.jkiss.dbeaver.model.impl.data;
import
org.eclipse.jface.action.IContributionManager
;
import
org.eclipse.jface.action.IContributionManager
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.dbeaver.model.DBPPropertyManager
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.data.*
;
import
org.jkiss.dbeaver.model.data.*
;
import
org.jkiss.dbeaver.model.exec.DBCException
;
import
org.jkiss.dbeaver.model.exec.DBCException
;
import
org.jkiss.dbeaver.model.exec.DBCLogicalOperator
;
import
org.jkiss.dbeaver.model.exec.DBCLogicalOperator
;
import
org.jkiss.dbeaver.model.struct.DBSTypedObject
;
import
org.jkiss.dbeaver.model.struct.DBSTypedObject
;
import
org.jkiss.dbeaver.runtime.properties.PropertySourceAbstract
;
/**
/**
* Base value handler
* Base value handler
...
@@ -53,7 +53,7 @@ public abstract class BaseValueHandler implements DBDValueHandler {
...
@@ -53,7 +53,7 @@ public abstract class BaseValueHandler implements DBDValueHandler {
}
}
@Override
@Override
public
void
contributeProperties
(
@NotNull
PropertySourceAbstract
propertySource
,
@NotNull
DBDValueController
controller
)
public
void
contributeProperties
(
@NotNull
DBPPropertyManager
propertySource
,
@NotNull
DBDValueController
controller
)
{
{
}
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/data/DateTimeValueHandler.java
浏览文件 @
c8358277
...
@@ -24,6 +24,7 @@ import org.jkiss.code.Nullable;
...
@@ -24,6 +24,7 @@ import org.jkiss.code.Nullable;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.core.CoreMessages
;
import
org.jkiss.dbeaver.core.CoreMessages
;
import
org.jkiss.dbeaver.core.Log
;
import
org.jkiss.dbeaver.core.Log
;
import
org.jkiss.dbeaver.model.DBPPropertyManager
;
import
org.jkiss.dbeaver.model.data.*
;
import
org.jkiss.dbeaver.model.data.*
;
import
org.jkiss.dbeaver.model.exec.DBCException
;
import
org.jkiss.dbeaver.model.exec.DBCException
;
import
org.jkiss.dbeaver.model.exec.DBCSession
;
import
org.jkiss.dbeaver.model.exec.DBCSession
;
...
@@ -34,7 +35,6 @@ import org.jkiss.dbeaver.model.impl.data.formatters.DefaultDataFormatter;
...
@@ -34,7 +35,6 @@ import org.jkiss.dbeaver.model.impl.data.formatters.DefaultDataFormatter;
import
org.jkiss.dbeaver.model.struct.DBSTypedObject
;
import
org.jkiss.dbeaver.model.struct.DBSTypedObject
;
import
org.jkiss.dbeaver.model.DBIcon
;
import
org.jkiss.dbeaver.model.DBIcon
;
import
org.jkiss.dbeaver.ui.DBeaverIcons
;
import
org.jkiss.dbeaver.ui.DBeaverIcons
;
import
org.jkiss.dbeaver.runtime.properties.PropertySourceAbstract
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -125,7 +125,7 @@ public abstract class DateTimeValueHandler extends BaseValueHandler implements D
...
@@ -125,7 +125,7 @@ public abstract class DateTimeValueHandler extends BaseValueHandler implements D
}
}
@Override
@Override
public
void
contributeProperties
(
@NotNull
PropertySourceAbstract
propertySource
,
@NotNull
DBDValueController
controller
)
public
void
contributeProperties
(
@NotNull
DBPPropertyManager
propertySource
,
@NotNull
DBDValueController
controller
)
{
{
super
.
contributeProperties
(
propertySource
,
controller
);
super
.
contributeProperties
(
propertySource
,
controller
);
propertySource
.
addProperty
(
propertySource
.
addProperty
(
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCContentValueHandler.java
浏览文件 @
c8358277
...
@@ -22,6 +22,7 @@ import org.jkiss.code.NotNull;
...
@@ -22,6 +22,7 @@ import org.jkiss.code.NotNull;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.core.CoreMessages
;
import
org.jkiss.dbeaver.core.CoreMessages
;
import
org.jkiss.dbeaver.core.Log
;
import
org.jkiss.dbeaver.core.Log
;
import
org.jkiss.dbeaver.model.DBPPropertyManager
;
import
org.jkiss.dbeaver.model.data.*
;
import
org.jkiss.dbeaver.model.data.*
;
import
org.jkiss.dbeaver.model.exec.DBCException
;
import
org.jkiss.dbeaver.model.exec.DBCException
;
import
org.jkiss.dbeaver.model.exec.DBCSession
;
import
org.jkiss.dbeaver.model.exec.DBCSession
;
...
@@ -31,7 +32,6 @@ import org.jkiss.dbeaver.model.exec.jdbc.JDBCSession;
...
@@ -31,7 +32,6 @@ import org.jkiss.dbeaver.model.exec.jdbc.JDBCSession;
import
org.jkiss.dbeaver.model.impl.data.editors.ContentInlineEditor
;
import
org.jkiss.dbeaver.model.impl.data.editors.ContentInlineEditor
;
import
org.jkiss.dbeaver.model.impl.data.editors.ContentPanelEditor
;
import
org.jkiss.dbeaver.model.impl.data.editors.ContentPanelEditor
;
import
org.jkiss.dbeaver.model.struct.DBSTypedObject
;
import
org.jkiss.dbeaver.model.struct.DBSTypedObject
;
import
org.jkiss.dbeaver.runtime.properties.PropertySourceAbstract
;
import
org.jkiss.dbeaver.utils.ContentUtils
;
import
org.jkiss.dbeaver.utils.ContentUtils
;
import
java.sql.Blob
;
import
java.sql.Blob
;
...
@@ -196,7 +196,7 @@ public class JDBCContentValueHandler extends JDBCAbstractValueHandler {
...
@@ -196,7 +196,7 @@ public class JDBCContentValueHandler extends JDBCAbstractValueHandler {
}
}
@Override
@Override
public
void
contributeProperties
(
@NotNull
PropertySourceAbstract
propertySource
,
@NotNull
DBDValueController
controller
)
public
void
contributeProperties
(
@NotNull
DBPPropertyManager
propertySource
,
@NotNull
DBDValueController
controller
)
{
{
super
.
contributeProperties
(
propertySource
,
controller
);
super
.
contributeProperties
(
propertySource
,
controller
);
try
{
try
{
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/runtime/properties/PropertySourceAbstract.java
浏览文件 @
c8358277
...
@@ -23,6 +23,7 @@ import org.jkiss.code.Nullable;
...
@@ -23,6 +23,7 @@ import org.jkiss.code.Nullable;
import
org.jkiss.dbeaver.core.Log
;
import
org.jkiss.dbeaver.core.Log
;
import
org.jkiss.dbeaver.model.DBPContextProvider
;
import
org.jkiss.dbeaver.model.DBPContextProvider
;
import
org.jkiss.dbeaver.model.DBPPropertyDescriptor
;
import
org.jkiss.dbeaver.model.DBPPropertyDescriptor
;
import
org.jkiss.dbeaver.model.DBPPropertyManager
;
import
org.jkiss.dbeaver.model.DBPPropertySource
;
import
org.jkiss.dbeaver.model.DBPPropertySource
;
import
org.jkiss.dbeaver.model.exec.DBCExecutionContext
;
import
org.jkiss.dbeaver.model.exec.DBCExecutionContext
;
import
org.jkiss.dbeaver.model.runtime.DBRProgressMonitor
;
import
org.jkiss.dbeaver.model.runtime.DBRProgressMonitor
;
...
@@ -39,7 +40,7 @@ import java.util.*;
...
@@ -39,7 +40,7 @@ import java.util.*;
/**
/**
* PropertyCollector
* PropertyCollector
*/
*/
public
abstract
class
PropertySourceAbstract
implements
DBPProperty
Source
,
IPropertySourceMulti
public
abstract
class
PropertySourceAbstract
implements
DBPProperty
Manager
,
IPropertySourceMulti
{
{
static
final
Log
log
=
Log
.
getLog
(
PropertySourceAbstract
.
class
);
static
final
Log
log
=
Log
.
getLog
(
PropertySourceAbstract
.
class
);
...
@@ -63,7 +64,7 @@ public abstract class PropertySourceAbstract implements DBPPropertySource, IProp
...
@@ -63,7 +64,7 @@ public abstract class PropertySourceAbstract implements DBPPropertySource, IProp
this
.
loadLazyProps
=
loadLazyProps
;
this
.
loadLazyProps
=
loadLazyProps
;
}
}
public
PropertySourceAbstract
addProperty
(
DBPPropertyDescriptor
prop
)
public
void
addProperty
(
DBPPropertyDescriptor
prop
)
{
{
if
(
prop
instanceof
ObjectPropertyDescriptor
&&
((
ObjectPropertyDescriptor
)
prop
).
isHidden
())
{
if
(
prop
instanceof
ObjectPropertyDescriptor
&&
((
ObjectPropertyDescriptor
)
prop
).
isHidden
())
{
// Do not add it to property list
// Do not add it to property list
...
@@ -71,15 +72,12 @@ public abstract class PropertySourceAbstract implements DBPPropertySource, IProp
...
@@ -71,15 +72,12 @@ public abstract class PropertySourceAbstract implements DBPPropertySource, IProp
props
.
add
(
prop
);
props
.
add
(
prop
);
}
}
propValues
.
put
(
prop
.
getId
(),
prop
);
propValues
.
put
(
prop
.
getId
(),
prop
);
return
this
;
}
}
public
PropertySourceAbstract
addProperty
(
@Nullable
String
category
,
Object
id
,
String
name
,
Object
value
)
public
void
addProperty
(
@Nullable
String
category
,
Object
id
,
String
name
,
Object
value
)
{
{
props
.
add
(
new
PropertyDescriptorEx
(
category
,
id
,
name
,
null
,
value
==
null
?
null
:
value
.
getClass
(),
false
,
null
,
null
,
false
));
props
.
add
(
new
PropertyDescriptorEx
(
category
,
id
,
name
,
null
,
value
==
null
?
null
:
value
.
getClass
(),
false
,
null
,
null
,
false
));
propValues
.
put
(
id
,
value
);
propValues
.
put
(
id
,
value
);
return
this
;
}
}
public
void
clearProperties
()
public
void
clearProperties
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录