Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
6da32a20
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,发现更多精彩内容 >>
未验证
提交
6da32a20
编写于
7月 02, 2021
作者:
S
ShadelessFox
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#13083 Allow changing prefix for client commands
上级
a29e562d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
38 addition
and
2 deletion
+38
-2
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java
...s.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java
+1
-0
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/internal/SQLEditorMessages.java
...ss/dbeaver/ui/editors/sql/internal/SQLEditorMessages.java
+2
-0
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/internal/SQLEditorMessages.properties
...aver/ui/editors/sql/internal/SQLEditorMessages.properties
+2
-0
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/internal/SQLEditorMessages_ru.properties
...r/ui/editors/sql/internal/SQLEditorMessages_ru.properties
+4
-2
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/preferences/PrefPageSQLExecute.java
...beaver/ui/editors/sql/preferences/PrefPageSQLExecute.java
+29
-0
未找到文件。
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java
浏览文件 @
6da32a20
...
...
@@ -2685,6 +2685,7 @@ public class SQLEditor extends SQLEditorBase implements
case
ModelPreferences
.
SQL_ANONYMOUS_PARAMETERS_ENABLED
:
case
ModelPreferences
.
SQL_VARIABLES_ENABLED
:
case
ModelPreferences
.
SQL_NAMED_PARAMETERS_PREFIX
:
case
ModelPreferences
.
SQL_CONTROL_COMMAND_PREFIX
:
reloadSyntaxRules
();
return
;
case
SQLPreferenceConstants
.
RESULT_SET_ORIENTATION
:
...
...
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/internal/SQLEditorMessages.java
浏览文件 @
6da32a20
...
...
@@ -234,6 +234,8 @@ public class SQLEditorMessages extends NLS {
public
static
String
pref_page_sql_editor_checkbox_enable_sql_anonymous_parameters
;
public
static
String
pref_page_sql_editor_text_anonymous_parameter_mark
;
public
static
String
pref_page_sql_editor_text_named_parameter_prefix
;
public
static
String
pref_page_sql_editor_text_control_command_prefix
;
public
static
String
pref_page_sql_editor_text_explanation_link
;
public
static
String
pref_page_sql_editor_combo_item_each_line_autocommit
;
public
static
String
pref_page_sql_editor_combo_item_each_spec_line
;
public
static
String
pref_page_sql_editor_combo_item_ignore
;
...
...
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/internal/SQLEditorMessages.properties
浏览文件 @
6da32a20
...
...
@@ -111,6 +111,8 @@ pref_page_sql_editor_label_sound_on_query_end = Beep after query finish
pref_page_sql_editor_label_sql_timeout
=
SQL statement timeout
pref_page_sql_editor_text_anonymous_parameter_mark
=
Anonymous parameter mark
pref_page_sql_editor_text_named_parameter_prefix
=
Named parameter prefix
pref_page_sql_editor_text_control_command_prefix
=
Control command prefix
pref_page_sql_editor_text_explanation_link
=
See how to use <a href="params">parameters</a> and <a href="commands">commands</a> in our wiki
pref_page_sql_editor_text_statement_delimiter
=
Statements delimiter
pref_page_sql_editor_title_pattern
=
Script title pattern
...
...
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/internal/SQLEditorMessages_ru.properties
浏览文件 @
6da32a20
...
...
@@ -141,10 +141,12 @@ pref_page_sql_editor_checkbox_bind_embedded_write_tip = \u041D\u0430\u043F\u0438
pref_page_sql_editor_title_pattern
=
\u0428\u0430\u0431\u
043B
\u
043E
\u
043D
\u0437\u0430\u0433\u
043E
\u
043B
\u
043E
\u0432\u
043A
\u0430
\u0441\u0446\u0435\u
043D
\u0430\u0440\u0438\u
044F
pref_page_sql_editor_label_sound_on_query_end
=
\u0417\u0432\u0443\u
043A
\u
043E
\u0432\u
043E
\u0439
\u0441\u0438\u0433\u
043D
\u0430\u
043B
\u
043F
\u
043E
\u0441\u
043B
\u0435
\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u
043D
\u0438\u
044F
\u0437\u0430\u
043F
\u0440\u
043E
\u0441\u0430
pref_page_sql_editor_text_anonymous_parameter_mark
=
\u0410\u
043D
\u
043E
\u
043D
\u0438\u
043C
\u
043D
\u0430\u
044F
\u
043C
\u0435\u0442\u
043A
\u0430
\u
043F
\u0430\u0440\u0430\u
043C
\u0435\u0442\u0440\u0430
pref_page_sql_editor_text_named_parameter_prefix
=
\u0418\u
043C
\u0435\u
043D
\u
043D
\u
043E
\u0432\u0430\u
043D
\u
044B
\u0439
\u
043F
\u0430\u0440\u0430\u
043C
\u0435\u0442\u0440
\u
043F
\u0440\u0435\u0444\u0438\u
043A
\u0441\u0430
pref_page_sql_editor_text_named_parameter_prefix
=
\u0418\u
043C
\u0435\u
043D
\u
043E
\u0432\u0430\u
043D
\u
043D
\u
044B
\u0439
\u
043F
\u0430\u0440\u0430\u
043C
\u0435\u0442\u0440
\u
043F
\u0440\u0435\u0444\u0438\u
043A
\u0441\u0430
pref_page_sql_editor_text_control_command_prefix
=
\u
041F
\u0440\u0435\u0444\u0438\u
043A
\u0441
\u
043A
\u
043E
\u
043D
\u0442\u0440\u
043E
\u
043B
\u
044C
\u
043D
\u
044B
\u0445
\u
043A
\u
043E
\u
043C
\u0430\u
043D
\u0434
pref_page_sql_editor_text_explanation_link
=
\u
041F
\u
043E
\u0441\u
043C
\u
043E
\u0442\u0440\u0438\u0442\u0435
,
\u
043A
\u0430\u
043A
\u0438\u0441\u
043F
\u
043E
\u
043B
\u
044C
\u0437\u
043E
\u0432\u0430\u0442\u
044C <a href="params">
\u
043F
\u0430\u0440\u0430\u
043C
\u0435\u0442\u0440\u
044B</a>
\u0438
<a href="commands">
\u
043A
\u
043E
\u
043C
\u0430\u
043D
\u0434\u
044B</a>,
\n
\u0432
\u
043D
\u0430\u0448\u0435\u0439
\u0434\u
043E
\u
043A
\u0443\u
043C
\u0435\u
043D
\u0442\u0430\u0446\u0438\u0438
pref_page_sql_editor_checkbox_blank_line_delimiter
=
\u
041F
\u0443\u0441\u0442\u
044B
\u0435
\u0441\u0442\u0440\u
043E
\u
043A
\u0438
\u0440\u0430\u0437\u0434\u0435\u
043B
\u
044F
\u
044E
\u0442
\u0437\u0430\u
043F
\u0440\u
043E
\u0441\u
044B
pref_page_sql_editor_checkbox_blank_line_delimiter_tip
=
\u0418\u
043F
\u
043E
\u
043B
\u
044C
\u0437\u
043E
\u0432\u0430\u0442\u
044C
\u
043F
\u0443\u0441\u0442\u
044B
\u0435
\u0441\u0442\u0440\u
043E
\u
043A
\u0438
\u0432
\u
043A
\u0430\u0447\u0435\u0441\u0442\u0432\u0435
\u0440\u0430\u0437\u0434\u0435\u
043B
\u0438\u0442\u0435\u
043B
\u0435\u0439
\u
043F
\u0440\u0438
\u
043F
\u0430\u0440\u0441\u0438\u
043D
\u0433\u0435
\u0437\u0430\u
043F
\u0440\u
043E
\u0441\u
043E
\u0432
pref_page_sql_editor_checkbox_blank_line_delimiter_tip
=
\u0418\u04
41\u
04
3F
\u
043E
\u
043B
\u
044C
\u0437\u
043E
\u0432\u0430\u0442\u
044C
\u
043F
\u0443\u0441\u0442\u
044B
\u0435
\u0441\u0442\u0440\u
043E
\u
043A
\u0438
\u0432
\u
043A
\u0430\u0447\u0435\u0441\u0442\u0432\u0435
\u0440\u0430\u0437\u0434\u0435\u
043B
\u0438\u0442\u0435\u
043B
\u0435\u0439
\u
043F
\u0440\u0438
\u
043F
\u0430\u0440\u0441\u0438\u
043D
\u0433\u0435
\u0437\u0430\u
043F
\u0440\u
043E
\u0441\u
043E
\u0432
pref_page_sql_editor_checkbox_enable_sql_anonymous_parameters
=
\u0410\u
043D
\u
043E
\u
043D
\u0438\u
043C
\u
043D
\u
044B
\u0435
\u
043F
\u0430\u0440\u0430\u
043C
\u0435\u0442\u0440\u
044B SQL
pref_page_sql_editor_checkbox_enable_sql_parameters
=
\u
041E
\u0431\u0440\u0430\u0431\u0430\u0442\u
044B
\u0432\u0430\u0442\u
044C
\u
043F
\u0430\u0440\u0430\u
043C
\u0435\u0442\u0440\u
044B SQL
pref_page_sql_editor_checkbox_ignore_native_delimiter
=
\u0418\u0433\u
043D
\u
043E
\u0440\u0438\u0440\u
043E
\u0432\u0430\u0442\u
044C
\u0440\u0430\u0437\u0434\u0435\u
043B
\u0438\u0442\u0435\u
043B
\u0438
\u0437\u0430\u
043F
\u0440\u
043E
\u0441\u0430
\u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430
...
...
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/preferences/PrefPageSQLExecute.java
浏览文件 @
6da32a20
...
...
@@ -18,6 +18,8 @@
package
org.jkiss.dbeaver.ui.editors.sql.preferences
;
import
org.eclipse.swt.SWT
;
import
org.eclipse.swt.events.SelectionAdapter
;
import
org.eclipse.swt.events.SelectionEvent
;
import
org.eclipse.swt.layout.GridData
;
import
org.eclipse.swt.widgets.*
;
import
org.jkiss.dbeaver.Log
;
...
...
@@ -31,6 +33,7 @@ import org.jkiss.dbeaver.ui.editors.sql.SQLPreferenceConstants;
import
org.jkiss.dbeaver.ui.editors.sql.internal.SQLEditorMessages
;
import
org.jkiss.dbeaver.ui.internal.UIMessages
;
import
org.jkiss.dbeaver.ui.preferences.TargetPrefPage
;
import
org.jkiss.dbeaver.utils.HelpUtils
;
import
org.jkiss.dbeaver.utils.PrefUtils
;
import
org.jkiss.utils.CommonUtils
;
...
...
@@ -65,6 +68,7 @@ public class PrefPageSQLExecute extends TargetPrefPage
private
Button
enableSQLAnonymousParameters
;
private
Text
anonymousParameterMarkText
;
private
Text
namedParameterPrefixText
;
private
Text
controlCommandPrefixText
;
private
Button
enableParametersInDDL
;
private
Button
enableVariables
;
...
...
@@ -96,6 +100,7 @@ public class PrefPageSQLExecute extends TargetPrefPage
store
.
contains
(
ModelPreferences
.
SQL_ANONYMOUS_PARAMETERS_ENABLED
)
||
store
.
contains
(
ModelPreferences
.
SQL_ANONYMOUS_PARAMETERS_MARK
)
||
store
.
contains
(
ModelPreferences
.
SQL_NAMED_PARAMETERS_PREFIX
)
||
store
.
contains
(
ModelPreferences
.
SQL_CONTROL_COMMAND_PREFIX
)
||
store
.
contains
(
ModelPreferences
.
SQL_VARIABLES_ENABLED
)
||
store
.
contains
(
SQLPreferenceConstants
.
RESET_CURSOR_ON_EXECUTE
)
||
...
...
@@ -182,8 +187,29 @@ public class PrefPageSQLExecute extends TargetPrefPage
anonymousParameterMarkText
.
setTextLimit
(
1
);
namedParameterPrefixText
=
UIUtils
.
createLabelText
(
paramsGroup
,
SQLEditorMessages
.
pref_page_sql_editor_text_named_parameter_prefix
,
""
,
SWT
.
BORDER
,
new
GridData
(
32
,
SWT
.
DEFAULT
));
namedParameterPrefixText
.
setTextLimit
(
1
);
controlCommandPrefixText
=
UIUtils
.
createLabelText
(
paramsGroup
,
SQLEditorMessages
.
pref_page_sql_editor_text_control_command_prefix
,
""
,
SWT
.
BORDER
,
new
GridData
(
32
,
SWT
.
DEFAULT
));
controlCommandPrefixText
.
setTextLimit
(
1
);
enableParametersInDDL
=
UIUtils
.
createCheckbox
(
paramsGroup
,
SQLEditorMessages
.
pref_page_sql_editor_enable_parameters_in_ddl
,
SQLEditorMessages
.
pref_page_sql_editor_enable_parameters_in_ddl_tip
,
false
,
2
);
enableVariables
=
UIUtils
.
createCheckbox
(
paramsGroup
,
SQLEditorMessages
.
pref_page_sql_editor_enable_variables
,
SQLEditorMessages
.
pref_page_sql_editor_enable_variables_tip
,
false
,
2
);
GridData
gd
=
new
GridData
(
GridData
.
FILL_HORIZONTAL
);
gd
.
horizontalSpan
=
2
;
UIUtils
.
createLink
(
paramsGroup
,
SQLEditorMessages
.
pref_page_sql_editor_text_explanation_link
,
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
switch
(
e
.
text
)
{
case
"params"
:
UIUtils
.
launchProgram
(
HelpUtils
.
getHelpExternalReference
(
"SQL-Execution#dynamic-parameter-bindings"
));
break
;
case
"commands"
:
UIUtils
.
launchProgram
(
HelpUtils
.
getHelpExternalReference
(
"Client-Side-Scripting"
));
break
;
default
:
break
;
}
}
}).
setLayoutData
(
gd
);
}
// Delimiters
...
...
@@ -225,6 +251,7 @@ public class PrefPageSQLExecute extends TargetPrefPage
enableSQLAnonymousParameters
.
setSelection
(
store
.
getBoolean
(
ModelPreferences
.
SQL_ANONYMOUS_PARAMETERS_ENABLED
));
anonymousParameterMarkText
.
setText
(
store
.
getString
(
ModelPreferences
.
SQL_ANONYMOUS_PARAMETERS_MARK
));
namedParameterPrefixText
.
setText
(
store
.
getString
(
ModelPreferences
.
SQL_NAMED_PARAMETERS_PREFIX
));
controlCommandPrefixText
.
setText
(
store
.
getString
(
ModelPreferences
.
SQL_CONTROL_COMMAND_PREFIX
));
enableParametersInDDL
.
setSelection
(
store
.
getBoolean
(
ModelPreferences
.
SQL_PARAMETERS_IN_DDL_ENABLED
));
enableVariables
.
setSelection
(
store
.
getBoolean
(
ModelPreferences
.
SQL_VARIABLES_ENABLED
));
}
catch
(
Exception
e
)
{
...
...
@@ -258,6 +285,7 @@ public class PrefPageSQLExecute extends TargetPrefPage
store
.
setValue
(
ModelPreferences
.
SQL_ANONYMOUS_PARAMETERS_ENABLED
,
enableSQLAnonymousParameters
.
getSelection
());
store
.
setValue
(
ModelPreferences
.
SQL_ANONYMOUS_PARAMETERS_MARK
,
anonymousParameterMarkText
.
getText
());
store
.
setValue
(
ModelPreferences
.
SQL_NAMED_PARAMETERS_PREFIX
,
namedParameterPrefixText
.
getText
());
store
.
setValue
(
ModelPreferences
.
SQL_CONTROL_COMMAND_PREFIX
,
controlCommandPrefixText
.
getText
());
store
.
setValue
(
ModelPreferences
.
SQL_PARAMETERS_IN_DDL_ENABLED
,
enableParametersInDDL
.
getSelection
());
store
.
setValue
(
ModelPreferences
.
SQL_VARIABLES_ENABLED
,
enableVariables
.
getSelection
());
}
catch
(
Exception
e
)
{
...
...
@@ -289,6 +317,7 @@ public class PrefPageSQLExecute extends TargetPrefPage
store
.
setToDefault
(
ModelPreferences
.
SQL_PARAMETERS_IN_DDL_ENABLED
);
store
.
setToDefault
(
ModelPreferences
.
SQL_ANONYMOUS_PARAMETERS_ENABLED
);
store
.
setToDefault
(
ModelPreferences
.
SQL_ANONYMOUS_PARAMETERS_MARK
);
store
.
setToDefault
(
ModelPreferences
.
SQL_CONTROL_COMMAND_PREFIX
);
store
.
setToDefault
(
ModelPreferences
.
SQL_VARIABLES_ENABLED
);
store
.
setToDefault
(
ModelPreferences
.
SQL_NAMED_PARAMETERS_PREFIX
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录