Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
63341161
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,发现更多精彩内容 >>
提交
63341161
编写于
6月 22, 2018
作者:
S
serge-rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
SQL editor: side toolbar UI fix
上级
e2ac0220
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
21 addition
and
2 deletion
+21
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java
....core/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java
+13
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditorBase.java
...e/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditorBase.java
+8
-0
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java
浏览文件 @
63341161
...
...
@@ -45,6 +45,7 @@ import org.eclipse.swt.graphics.Image;
import
org.eclipse.swt.graphics.Point
;
import
org.eclipse.swt.layout.FillLayout
;
import
org.eclipse.swt.layout.GridData
;
import
org.eclipse.swt.layout.GridLayout
;
import
org.eclipse.swt.widgets.*
;
import
org.eclipse.ui.*
;
import
org.eclipse.ui.actions.CompoundContributionItem
;
...
...
@@ -142,6 +143,7 @@ public class SQLEditor extends SQLEditorBase implements
private
static
Image
IMG_OUTPUT_ALERT
=
DBeaverIcons
.
getImage
(
UIIcon
.
SQL_PAGE_OUTPUT_ALERT
);
private
static
final
String
TOOLBAR_CONTRIBUTION_ID
=
"toolbar:org.jkiss.dbeaver.ui.editors.sql.toolbar.side"
;
private
static
final
String
TOOLBAR_GROUP_TOP
=
"top"
;
private
static
final
String
TOOLBAR_GROUP_ADDITIONS
=
IWorkbenchActionConstants
.
MB_ADDITIONS
;
public
static
final
String
VAR_CONNECTION_NAME
=
"connectionName"
;
...
...
@@ -561,7 +563,17 @@ public class SQLEditor extends SQLEditorBase implements
}
private
void
createSideBar
(
Composite
sqlEditorPanel
)
{
Composite
ph
=
new
Composite
(
sqlEditorPanel
,
SWT
.
NONE
);
ph
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_VERTICAL
));
GridLayout
layout
=
new
GridLayout
(
1
,
false
);
layout
.
horizontalSpacing
=
0
;
layout
.
verticalSpacing
=
0
;
layout
.
marginWidth
=
3
;
layout
.
marginHeight
=
3
;
ph
.
setLayout
(
layout
);
sideToolBar
=
new
ToolBarManager
(
SWT
.
VERTICAL
);
sideToolBar
.
add
(
new
Separator
(
TOOLBAR_GROUP_TOP
));
sideToolBar
.
add
(
ActionUtils
.
makeCommandContribution
(
getSite
(),
CoreCommands
.
CMD_EXECUTE_STATEMENT
));
sideToolBar
.
add
(
ActionUtils
.
makeCommandContribution
(
getSite
(),
CoreCommands
.
CMD_EXECUTE_STATEMENT_NEW
));
sideToolBar
.
add
(
ActionUtils
.
makeCommandContribution
(
getSite
(),
CoreCommands
.
CMD_EXECUTE_SCRIPT
));
...
...
@@ -577,9 +589,8 @@ public class SQLEditor extends SQLEditorBase implements
}
sideToolBar
.
update
(
true
);
ToolBar
toolBar
=
sideToolBar
.
createControl
(
sqlEditorPanel
);
ToolBar
toolBar
=
sideToolBar
.
createControl
(
ph
);
GridData
gd
=
new
GridData
(
GridData
.
FILL_VERTICAL
|
GridData
.
VERTICAL_ALIGN_BEGINNING
);
gd
.
verticalIndent
=
5
;
toolBar
.
setLayoutData
(
gd
);
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditorBase.java
浏览文件 @
63341161
...
...
@@ -283,6 +283,14 @@ public abstract class SQLEditorBase extends BaseTextEditor implements IErrorVisu
super
.
updatePartControl
(
input
);
}
protected
IOverviewRuler
createOverviewRuler
(
ISharedTextColors
sharedColors
)
{
if
(
isOverviewRulerVisible
())
{
return
super
.
createOverviewRuler
(
sharedColors
);
}
else
{
return
new
OverviewRuler
(
getAnnotationAccess
(),
0
,
sharedColors
);
}
}
@Override
protected
boolean
isOverviewRulerVisible
()
{
return
false
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录