Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
107f7086
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,发现更多精彩内容 >>
提交
107f7086
编写于
2月 14, 2013
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Integer values verifier fix (use locale)
上级
0d06519e
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
27 addition
and
28 deletion
+27
-28
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCNumberValueHandler.java
.../dbeaver/model/impl/jdbc/data/JDBCNumberValueHandler.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/UIUtils.java
....jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/UIUtils.java
+18
-20
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/CustomNumberCellEditor.java
...org/jkiss/dbeaver/ui/controls/CustomNumberCellEditor.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/perspective/DataSourceManagementToolbar.java
...s/dbeaver/ui/perspective/DataSourceManagementToolbar.java
+2
-4
plugins/org.jkiss.dbeaver.mysql/src/org/jkiss/dbeaver/ext/mysql/views/MySQLConnectionPage.java
...rg/jkiss/dbeaver/ext/mysql/views/MySQLConnectionPage.java
+3
-1
plugins/org.jkiss.dbeaver.oracle/src/org/jkiss/dbeaver/ext/oracle/views/OracleConnectionPage.java
.../jkiss/dbeaver/ext/oracle/views/OracleConnectionPage.java
+2
-1
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/impl/jdbc/data/JDBCNumberValueHandler.java
浏览文件 @
107f7086
...
...
@@ -240,7 +240,7 @@ public class JDBCNumberValueHandler extends JDBCAbstractValueHandler {
case
java
.
sql
.
Types
.
SMALLINT
:
case
java
.
sql
.
Types
.
TINYINT
:
case
java
.
sql
.
Types
.
BIT
:
editor
.
addVerifyListener
(
UIUtils
.
getIntegerVerifyListener
());
editor
.
addVerifyListener
(
UIUtils
.
getIntegerVerifyListener
(
locale
));
break
;
default
:
editor
.
addVerifyListener
(
UIUtils
.
getNumberVerifyListener
(
locale
));
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/UIUtils.java
浏览文件 @
107f7086
...
...
@@ -73,29 +73,27 @@ public class UIUtils {
static
final
Log
log
=
LogFactory
.
getLog
(
UIUtils
.
class
);
public
static
final
char
PARAGRAPH_CHAR
=
(
char
)
182
;
private
static
DecimalFormatSymbols
DEFAULT_SYMBOLS
=
DecimalFormatSymbols
.
getInstance
();
private
static
final
VerifyListener
INTEGER_VERIFY_LISTENER
=
new
VerifyListener
()
{
@Override
public
void
verifyText
(
VerifyEvent
e
)
{
for
(
int
i
=
0
;
i
<
e
.
text
.
length
();
i
++)
{
char
ch
=
e
.
text
.
charAt
(
i
);
if
(!
Character
.
isDigit
(
ch
)
&&
ch
!=
DEFAULT_SYMBOLS
.
getMinusSign
()
&&
ch
!=
DEFAULT_SYMBOLS
.
getGroupingSeparator
())
{
e
.
doit
=
false
;
return
;
public
static
VerifyListener
getIntegerVerifyListener
(
Locale
locale
)
{
final
DecimalFormatSymbols
symbols
=
DecimalFormatSymbols
.
getInstance
(
locale
);
return
new
VerifyListener
()
{
@Override
public
void
verifyText
(
VerifyEvent
e
)
{
for
(
int
i
=
0
;
i
<
e
.
text
.
length
();
i
++)
{
char
ch
=
e
.
text
.
charAt
(
i
);
if
(!
Character
.
isDigit
(
ch
)
&&
ch
!=
symbols
.
getMinusSign
()
&&
ch
!=
symbols
.
getGroupingSeparator
())
{
e
.
doit
=
false
;
return
;
}
}
e
.
doit
=
true
;
}
e
.
doit
=
true
;
}
};
public
static
VerifyListener
getIntegerVerifyListener
()
{
return
INTEGER_VERIFY_LISTENER
;
};
}
public
static
VerifyListener
getNumberVerifyListener
(
Locale
locale
)
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/controls/CustomNumberCellEditor.java
浏览文件 @
107f7086
...
...
@@ -55,7 +55,7 @@ public class CustomNumberCellEditor extends TextCellEditor {
{
text
.
addVerifyListener
(
UIUtils
.
getNumberVerifyListener
(
Locale
.
getDefault
()));
}
else
{
text
.
addVerifyListener
(
UIUtils
.
getIntegerVerifyListener
());
text
.
addVerifyListener
(
UIUtils
.
getIntegerVerifyListener
(
Locale
.
getDefault
()
));
}
return
text
;
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/perspective/DataSourceManagementToolbar.java
浏览文件 @
107f7086
...
...
@@ -69,9 +69,7 @@ import org.jkiss.utils.CommonUtils;
import
java.lang.ref.SoftReference
;
import
java.lang.reflect.InvocationTargetException
;
import
java.text.MessageFormat
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.*
;
import
java.util.List
;
/**
...
...
@@ -787,7 +785,7 @@ public class DataSourceManagementToolbar implements DBPRegistryListener, DBPEven
}
//resultSetSize.setDigits(7);
resultSetSize
.
setLayoutData
(
gd
);
resultSetSize
.
addVerifyListener
(
UIUtils
.
getIntegerVerifyListener
());
resultSetSize
.
addVerifyListener
(
UIUtils
.
getIntegerVerifyListener
(
Locale
.
getDefault
()
));
resultSetSize
.
addFocusListener
(
new
FocusListener
()
{
@Override
public
void
focusGained
(
FocusEvent
e
)
...
...
plugins/org.jkiss.dbeaver.mysql/src/org/jkiss/dbeaver/ext/mysql/views/MySQLConnectionPage.java
浏览文件 @
107f7086
...
...
@@ -36,6 +36,8 @@ import org.jkiss.dbeaver.ui.controls.ClientHomesSelector;
import
org.jkiss.dbeaver.ui.dialogs.connection.ConnectionPageAdvanced
;
import
org.jkiss.utils.CommonUtils
;
import
java.util.Locale
;
/**
* MySQLConnectionPage
*/
...
...
@@ -134,7 +136,7 @@ public class MySQLConnectionPage extends ConnectionPageAdvanced
gd
=
new
GridData
(
GridData
.
VERTICAL_ALIGN_BEGINNING
);
gd
.
widthHint
=
40
;
portText
.
setLayoutData
(
gd
);
portText
.
addVerifyListener
(
UIUtils
.
getIntegerVerifyListener
());
portText
.
addVerifyListener
(
UIUtils
.
getIntegerVerifyListener
(
Locale
.
getDefault
()
));
portText
.
addModifyListener
(
textListener
);
Label
dbLabel
=
UIUtils
.
createControlLabel
(
addrGroup
,
MySQLMessages
.
dialog_connection_database
);
...
...
plugins/org.jkiss.dbeaver.oracle/src/org/jkiss/dbeaver/ext/oracle/views/OracleConnectionPage.java
浏览文件 @
107f7086
...
...
@@ -43,6 +43,7 @@ import org.jkiss.dbeaver.utils.ContentUtils;
import
org.jkiss.utils.CommonUtils
;
import
java.io.File
;
import
java.util.Locale
;
import
java.util.Map
;
/**
...
...
@@ -196,7 +197,7 @@ public class OracleConnectionPage extends ConnectionPageAdvanced
gd
=
new
GridData
(
GridData
.
VERTICAL_ALIGN_BEGINNING
);
gd
.
widthHint
=
40
;
portText
.
setLayoutData
(
gd
);
portText
.
addVerifyListener
(
UIUtils
.
getIntegerVerifyListener
());
portText
.
addVerifyListener
(
UIUtils
.
getIntegerVerifyListener
(
Locale
.
getDefault
()
));
portText
.
addModifyListener
(
controlModifyListener
);
UIUtils
.
createControlLabel
(
targetContainer
,
OracleMessages
.
dialog_connection_database
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录