Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
0f1fd5b6
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
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,发现更多精彩内容 >>
提交
0f1fd5b6
编写于
6月 25, 2013
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Word wrap in text editors
Former-commit-id:
d9e7b623
上级
87b89881
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
50 addition
and
0 deletion
+50
-0
plugins/org.jkiss.dbeaver.core.application/plugin.xml
plugins/org.jkiss.dbeaver.core.application/plugin.xml
+1
-0
plugins/org.jkiss.dbeaver.core/plugin.properties
plugins/org.jkiss.dbeaver.core/plugin.properties
+2
-0
plugins/org.jkiss.dbeaver.core/plugin.xml
plugins/org.jkiss.dbeaver.core/plugin.xml
+13
-0
plugins/org.jkiss.dbeaver.core/plugin_ru.properties
plugins/org.jkiss.dbeaver.core/plugin_ru.properties
+2
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/text/handlers/ToggleWordWrapHandler.java
...eaver/ui/editors/text/handlers/ToggleWordWrapHandler.java
+32
-0
未找到文件。
plugins/org.jkiss.dbeaver.core.application/plugin.xml
浏览文件 @
0f1fd5b6
...
...
@@ -68,6 +68,7 @@
<menu
id=
"edit"
label=
"%menu.edit"
>
<command
commandId=
"org.jkiss.dbeaver.ui.editors.sql.comment.single"
><visibleWhen
checkEnabled=
"true"
/></command>
<command
commandId=
"org.jkiss.dbeaver.ui.editors.sql.comment.multi"
><visibleWhen
checkEnabled=
"true"
/></command>
<command
commandId=
"org.jkiss.dbeaver.ui.editors.sql.word.wrap"
><visibleWhen
checkEnabled=
"true"
/></command>
<command
commandId=
"org.eclipse.ui.edit.text.upperCase"
><visibleWhen
checkEnabled=
"true"
/></command>
<command
commandId=
"org.eclipse.ui.edit.text.lowerCase"
><visibleWhen
checkEnabled=
"true"
/></command>
</menu>
...
...
plugins/org.jkiss.dbeaver.core/plugin.properties
浏览文件 @
0f1fd5b6
...
...
@@ -113,6 +113,8 @@ command.org.jkiss.dbeaver.ui.editors.sql.comment.single.name=Toggle Line Comment
command.org.jkiss.dbeaver.ui.editors.sql.comment.single.description
=
Add or remove single line comment
command.org.jkiss.dbeaver.ui.editors.sql.comment.multi.name
=
Toggle Block Comment
command.org.jkiss.dbeaver.ui.editors.sql.comment.multi.description
=
Add or remove multi line comment
command.org.jkiss.dbeaver.ui.editors.sql.word.wrap.name
=
Toggle Word Wrap
command.org.jkiss.dbeaver.ui.editors.sql.word.wrap.description
=
Toggles text editor soft word wrap
command.org.jkiss.dbeaver.core.export.data.name
=
Export Data
command.org.jkiss.dbeaver.core.export.data.description
=
Export data to file(s) or database table(s)
command.org.jkiss.dbeaver.core.import.data.name
=
Import Data
...
...
plugins/org.jkiss.dbeaver.core/plugin.xml
浏览文件 @
0f1fd5b6
...
...
@@ -206,6 +206,7 @@
<command
id=
"org.jkiss.dbeaver.ui.editors.sql.save.file"
name=
"%command.org.jkiss.dbeaver.ui.editors.sql.save.file.name"
description=
"%command.org.jkiss.dbeaver.ui.editors.sql.save.file.description"
categoryId=
"org.jkiss.dbeaver.core.sql"
/>
<command
id=
"org.jkiss.dbeaver.ui.editors.sql.comment.single"
name=
"%command.org.jkiss.dbeaver.ui.editors.sql.comment.single.name"
description=
"%command.org.jkiss.dbeaver.ui.editors.sql.comment.single.description"
categoryId=
"org.jkiss.dbeaver.core.sql"
/>
<command
id=
"org.jkiss.dbeaver.ui.editors.sql.comment.multi"
name=
"%command.org.jkiss.dbeaver.ui.editors.sql.comment.multi.name"
description=
"%command.org.jkiss.dbeaver.ui.editors.sql.comment.multi.description"
categoryId=
"org.jkiss.dbeaver.core.sql"
/>
<command
id=
"org.jkiss.dbeaver.ui.editors.sql.word.wrap"
name=
"%command.org.jkiss.dbeaver.ui.editors.sql.word.wrap.name"
description=
"%command.org.jkiss.dbeaver.ui.editors.sql.word.wrap.description"
categoryId=
"org.jkiss.dbeaver.core.sql"
/>
<command
id=
"org.jkiss.dbeaver.ui.editors.sql.export.data"
name=
"%command.org.jkiss.dbeaver.ui.editors.sql.export.data.name"
description=
"%command.org.jkiss.dbeaver.ui.editors.sql.export.data.description"
categoryId=
"org.jkiss.dbeaver.core.sql"
/>
<command
id=
"org.jkiss.dbeaver.core.export.data"
name=
"%command.org.jkiss.dbeaver.core.export.data.name"
description=
"%command.org.jkiss.dbeaver.core.export.data.description"
categoryId=
"org.jkiss.dbeaver.core.util"
/>
<command
id=
"org.jkiss.dbeaver.core.import.data"
name=
"%command.org.jkiss.dbeaver.core.import.data.name"
description=
"%command.org.jkiss.dbeaver.core.import.data.description"
categoryId=
"org.jkiss.dbeaver.core.util"
/>
...
...
@@ -800,6 +801,13 @@
</with>
</enabledWhen>
</handler>
<handler
commandId=
"org.jkiss.dbeaver.ui.editors.sql.word.wrap"
class=
"org.jkiss.dbeaver.ui.editors.text.handlers.ToggleWordWrapHandler"
>
<enabledWhen>
<with
variable=
"activeEditor"
>
<adapt
type=
"org.eclipse.ui.texteditor.ITextEditor"
/>
</with>
</enabledWhen>
</handler>
<!-- Entity editor handlers -->
<handler
commandId=
"org.eclipse.ui.file.revert"
class=
"org.jkiss.dbeaver.ui.editors.entity.handlers.RevertChangesHandler"
>
...
...
@@ -1618,6 +1626,11 @@
contextId=
"org.jkiss.dbeaver.ui.editors.sql"
schemeId=
"org.eclipse.ui.defaultAcceleratorConfiguration"
sequence=
"CTRL+SHIFT+/"
/>
<key
commandId=
"org.jkiss.dbeaver.ui.editors.sql.word.wrap"
contextId=
"org.jkiss.dbeaver.ui.editors.sql"
schemeId=
"org.eclipse.ui.defaultAcceleratorConfiguration"
sequence=
"CTRL+ALT+E"
/>
<key
commandId=
"org.jkiss.dbeaver.ui.editors.text.content.format"
contextId=
"org.eclipse.ui.contexts.window"
schemeId=
"org.eclipse.ui.defaultAcceleratorConfiguration"
sequence=
"CTRL+ALT+F"
/>
</extension>
...
...
plugins/org.jkiss.dbeaver.core/plugin_ru.properties
浏览文件 @
0f1fd5b6
...
...
@@ -269,6 +269,8 @@ command.org.jkiss.dbeaver.ui.editors.sql.comment.single.name=\u041E\u0434\u043D\
command.org.jkiss.dbeaver.ui.editors.sql.comment.single.description=
\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u
044C/
\u0443\u0434\u0430\u
043B
\u0438\u0442\u
044C
\u
043E
\u0434\u
043D
\u
043E
\u0441\u0442\u0440\u
043E
\u0447\u
043D
\u
044B
\u0439
\u
043A
\u
043E
\u
043C
\u0435\u
043D
\u0442\u0430\u0440\u0438\u0439
command.org.jkiss.dbeaver.ui.editors.sql.comment.multi.name=
\u0411\u
043B
\u
043E
\u0447\u
043D
\u
044B
\u0439
\u
043A
\u
043E
\u
043C
\u0435\u
043D
\u0442\u0430\u0440\u0438\u0439
command.org.jkiss.dbeaver.ui.editors.sql.comment.multi.description=
\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u
044C/
\u0443\u0434\u0430\u
043B
\u0438\u0442\u
044C
\u
043C
\u
043D
\u
043E
\u0433\u
043E
\u0441\u0442\u0440\u
043E
\u0447\u
043D
\u
044B
\u0439
\u
043A
\u
043E
\u
043C
\u0435\u
043D
\u0442\u0430\u0440\u0438\u0439
command.org.jkiss.dbeaver.ui.editors.sql.word.wrap.name=
\u0412\u
043A
\u
043B/
\u0432\u
044B
\u
043A
\u
043B
\u
043F
\u0435\u0440\u0435\u
043D
\u
043E
\u0441
\u0441\u0442\u0440\u
043E
\u
043A
command.org.jkiss.dbeaver.ui.editors.sql.word.wrap.description
=
\u0412\u
043A
\u
043B
\u
044E
\u0447\u0438\u0442\u
044C/
\u0432\u
044B
\u
043A
\u
043B
\u
044E
\u0447\u0438\u0442\u
044C
\u
043F
\u0435\u0440\u0435\u
043D
\u
043E
\u0441
\u0441\u0442\u0440\u
043E
\u
043A
\u0432
\u0442\u0435\u
043A
\u0441\u0442\u
043E
\u0432\u
043E
\u
043C
\u0440\u0435\u0434\u0430\u
043A
\u0442\u
043E
\u0440\u0435
dataTransfer.producer.database.name=
\u0422\u0430\u0431\u
043B
\u0438\u0446\u0430
dataTransfer.producer.database.description=
\u0422\u0430\u0431\u
043B
\u0438\u0446\u0430
\u0431\u0430\u0437\u
044B
\u0434\u0430\u
043D
\u
043D
\u
044B
\u0445
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/text/handlers/ToggleWordWrapHandler.java
0 → 100644
浏览文件 @
0f1fd5b6
package
org.jkiss.dbeaver.ui.editors.text.handlers
;
import
org.eclipse.core.commands.ExecutionEvent
;
import
org.eclipse.swt.custom.StyledText
;
import
org.eclipse.swt.widgets.Control
;
import
org.eclipse.ui.IWorkbenchPart
;
import
org.eclipse.ui.handlers.HandlerUtil
;
import
org.eclipse.ui.texteditor.ITextEditor
;
public
class
ToggleWordWrapHandler
extends
AbstractTextHandler
{
public
Object
execute
(
ExecutionEvent
event
)
{
// get active editor where word wrap will be toggled
IWorkbenchPart
activePart
=
HandlerUtil
.
getActivePart
(
event
);
if
(
activePart
instanceof
ITextEditor
)
{
ITextEditor
editor
=
(
ITextEditor
)
activePart
;
// editor (ITextEditor) adapter returns StyledText
Object
text
=
editor
.
getAdapter
(
Control
.
class
);
if
(
text
instanceof
StyledText
)
{
StyledText
styledText
=
(
StyledText
)
text
;
// toggle wrapping
styledText
.
setWordWrap
(!
styledText
.
getWordWrap
());
}
}
return
null
;
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录