Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
227a2692
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,发现更多精彩内容 >>
提交
227a2692
编写于
4月 24, 2021
作者:
S
serge-rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#10692 Remove redundant toolbars and preferences
上级
b89822ac
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
11 addition
and
84 deletion
+11
-84
plugins/org.jkiss.dbeaver.core/plugin.xml
plugins/org.jkiss.dbeaver.core/plugin.xml
+4
-6
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/DBeaverPreferences.java
...beaver.core/src/org/jkiss/dbeaver/DBeaverPreferences.java
+0
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/core/DBeaverPreferencesInitializer.java
...org/jkiss/dbeaver/core/DBeaverPreferencesInitializer.java
+0
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/UIPropertyTester.java
...re/src/org/jkiss/dbeaver/ui/actions/UIPropertyTester.java
+0
-46
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/preferences/PrefPageDatabaseEditors.java
...jkiss/dbeaver/ui/preferences/PrefPageDatabaseEditors.java
+7
-27
未找到文件。
plugins/org.jkiss.dbeaver.core/plugin.xml
浏览文件 @
227a2692
...
...
@@ -44,12 +44,6 @@
namespace=
"org.jkiss.dbeaver.core.object"
properties=
"canOpen,canCreate,canPaste,canDelete,canRename,canMoveUp,canMoveDown,canFilter,canFilterObject,hasFilter"
type=
"org.jkiss.dbeaver.model.navigator.DBNNode"
/>
<propertyTester
class=
"org.jkiss.dbeaver.ui.actions.UIPropertyTester"
id=
"org.jkiss.dbeaver.ui.actions.UIPropertyTester"
namespace=
"org.jkiss.dbeaver.core.ui"
properties=
"toolbarVisible"
type=
"java.lang.Object"
/>
<propertyTester
class=
"org.jkiss.dbeaver.ui.actions.DataSourcePropertyTester"
id=
"org.jkiss.dbeaver.ui.actions.DataSourcePropertyTester"
...
...
@@ -580,6 +574,7 @@
</command>
</toolbar>
<!--
<toolbar id="dbeaver-edit" label="%toolbar.dbeaver-edit.label">
<command commandId="org.eclipse.ui.file.save"/>
<command commandId="org.eclipse.ui.file.revert" icon="platform:/plugin/org.jkiss.dbeaver.ui/icons/file/reset.png"/>
...
...
@@ -587,6 +582,7 @@
<command commandId="org.eclipse.ui.edit.redo"/>
<command commandId="org.eclipse.ui.file.refresh"/>
</toolbar>
-->
<toolbar
id=
"dbeaver-connection-selector"
label=
"%toolbar.dbeaver-datasource-selector.label"
>
<visibleWhen><reference
definitionId=
"org.jkiss.dbeaver.core.ui.datasource.editor"
/></visibleWhen>
...
...
@@ -1184,6 +1180,7 @@
</perspective>
</extension>
<!--
<extension point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension targetID="org.jkiss.dbeaver.core.perspective">
<hiddenToolBarItem id="org.eclipse.ui.file.save"/>
...
...
@@ -1193,5 +1190,6 @@
<hiddenToolBarItem id="org.eclipse.ui.file.refresh"/>
</perspectiveExtension>
</extension>
-->
</plugin>
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/DBeaverPreferences.java
浏览文件 @
227a2692
...
...
@@ -30,9 +30,6 @@ public final class DBeaverPreferences
public
static
final
String
SECURITY_USE_BOUNCY_CASTLE
=
"security.jce.bc"
;
//$NON-NLS-1$
public
static
final
String
TOOLBARS_SHOW_GENERAL_ALWAYS
=
"toolbars.show.general.always"
;
//$NON-NLS-1$
public
static
final
String
TOOLBARS_SHOW_EDIT
=
"toolbars.show.edit"
;
//$NON-NLS-1$
public
static
final
String
TEXT_EDIT_UNDO_LEVEL
=
"text.edit.undo.level"
;
//$NON-NLS-1$
public
static
final
String
CONFIRM_EXIT
=
"exit"
;
//$NON-NLS-1$
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/core/DBeaverPreferencesInitializer.java
浏览文件 @
227a2692
...
...
@@ -52,8 +52,6 @@ public class DBeaverPreferencesInitializer extends AbstractPreferenceInitializer
PrefUtils
.
setDefaultPreferenceValue
(
store
,
DBeaverPreferences
.
SECURITY_USE_BOUNCY_CASTLE
,
true
);
PrefUtils
.
setDefaultPreferenceValue
(
store
,
DBeaverPreferences
.
NAVIGATOR_EDITOR_FULL_NAME
,
false
);
PrefUtils
.
setDefaultPreferenceValue
(
store
,
DBeaverPreferences
.
TOOLBARS_SHOW_GENERAL_ALWAYS
,
false
);
PrefUtils
.
setDefaultPreferenceValue
(
store
,
DBeaverPreferences
.
TOOLBARS_SHOW_EDIT
,
false
);
PrefUtils
.
setDefaultPreferenceValue
(
store
,
DBeaverPreferences
.
TEXT_EDIT_UNDO_LEVEL
,
200
);
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/UIPropertyTester.java
已删除
100644 → 0
浏览文件 @
b89822ac
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2021 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.jkiss.dbeaver.ui.actions
;
import
org.eclipse.core.expressions.PropertyTester
;
import
org.jkiss.dbeaver.DBeaverPreferences
;
import
org.jkiss.dbeaver.runtime.DBWorkbench
;
import
org.jkiss.dbeaver.ui.IActionConstants
;
/**
* UIPropertyTester
*/
public
class
UIPropertyTester
extends
PropertyTester
{
public
static
final
String
NAMESPACE
=
"org.jkiss.dbeaver.core.ui"
;
// Toolbar visible on all perspectives
public
static
final
String
PROP_TOOLBAR_VISIBLE
=
"toolbarVisible"
;
@Override
public
boolean
test
(
Object
receiver
,
String
property
,
Object
[]
args
,
Object
expectedValue
)
{
switch
(
property
)
{
case
PROP_TOOLBAR_VISIBLE:
if
(
IActionConstants
.
TOOLBAR_DATABASE
.
equals
(
expectedValue
))
{
return
DBWorkbench
.
getPlatform
().
getPreferenceStore
().
getBoolean
(
DBeaverPreferences
.
TOOLBARS_SHOW_GENERAL_ALWAYS
);
}
else
if
(
IActionConstants
.
TOOLBAR_EDIT
.
equals
(
expectedValue
))
{
return
DBWorkbench
.
getPlatform
().
getPreferenceStore
().
getBoolean
(
DBeaverPreferences
.
TOOLBARS_SHOW_EDIT
);
}
}
return
false
;
}
}
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/preferences/PrefPageDatabaseEditors.java
浏览文件 @
227a2692
...
...
@@ -41,17 +41,13 @@ import org.jkiss.utils.CommonUtils;
public
class
PrefPageDatabaseEditors
extends
AbstractPrefPage
implements
IWorkbenchPreferencePage
,
IWorkbenchPropertyPage
{
public
static
final
String
PAGE_ID
=
"org.jkiss.dbeaver.preferences.editors"
;
//$NON-NLS-1$
private
Button
syncEditorDataSourceWithNavigator
;
private
Button
showGeneralToolbarEverywhere
;
private
Button
showEditToolbar
;
//private Spinner toolbarDatabaseSelectorWidth;
//private Spinner toolbarSchemaSelectorWidth;
private
Button
keepEditorsOnRestart
;
private
Button
refreshEditorOnOpen
;
private
Button
editorFullName
;
private
Button
showTableGrid
;
private
Button
showPreviewOnSave
;
private
Button
syncEditorDataSourceWithNavigator
;
private
Combo
booleanStyleSelector
;
...
...
@@ -72,16 +68,6 @@ public class PrefPageDatabaseEditors extends AbstractPrefPage implements IWorkbe
{
Composite
composite
=
UIUtils
.
createPlaceholder
(
parent
,
1
,
5
);
{
Group
toolbarsGroup
=
UIUtils
.
createControlGroup
(
composite
,
CoreMessages
.
pref_page_database_general_group_toolbars
,
2
,
SWT
.
NONE
,
0
);
syncEditorDataSourceWithNavigator
=
UIUtils
.
createCheckbox
(
toolbarsGroup
,
CoreMessages
.
pref_page_database_general_label_sync_editor_connection_with_navigator
,
CoreMessages
.
pref_page_database_general_label_sync_editor_connection_with_navigator_tip
,
false
,
2
);
showGeneralToolbarEverywhere
=
UIUtils
.
createCheckbox
(
toolbarsGroup
,
CoreMessages
.
pref_page_database_general_label_show_general_toolbar_everywhere
,
CoreMessages
.
pref_page_database_general_label_show_general_toolbar_everywhere_tip
,
false
,
2
);
showEditToolbar
=
UIUtils
.
createCheckbox
(
toolbarsGroup
,
CoreMessages
.
pref_page_database_general_label_show_edit_toolbar
,
CoreMessages
.
pref_page_database_general_label_show_edit_toolbar_tip
,
false
,
2
);
//toolbarDatabaseSelectorWidth = UIUtils.createLabelSpinner(toolbarsGroup, CoreMessages.pref_page_database_general_label_database_selector_width, CoreMessages.pref_page_database_general_label_database_selector_width_tip, 20, 10, 200);
//toolbarSchemaSelectorWidth = UIUtils.createLabelSpinner(toolbarsGroup, CoreMessages.pref_page_database_general_label_schema_selector_width, CoreMessages.pref_page_database_general_label_schema_selector_width_tip, 20, 10, 200);
}
{
Group
groupEditors
=
UIUtils
.
createControlGroup
(
composite
,
CoreMessages
.
pref_page_ui_general_group_editors
,
1
,
GridData
.
VERTICAL_ALIGN_BEGINNING
,
0
);
...
...
@@ -94,6 +80,8 @@ public class PrefPageDatabaseEditors extends AbstractPrefPage implements IWorkbe
editorFullName
=
UIUtils
.
createCheckbox
(
groupEditors
,
CoreMessages
.
pref_page_ui_general_show_full_name_in_editor
,
false
);
showTableGrid
=
UIUtils
.
createCheckbox
(
groupEditors
,
CoreMessages
.
pref_page_ui_general_show_table_grid
,
false
);
showPreviewOnSave
=
UIUtils
.
createCheckbox
(
groupEditors
,
CoreMessages
.
pref_page_ui_general_show_preview_on_save
,
false
);
syncEditorDataSourceWithNavigator
=
UIUtils
.
createCheckbox
(
groupEditors
,
CoreMessages
.
pref_page_database_general_label_sync_editor_connection_with_navigator
,
CoreMessages
.
pref_page_database_general_label_sync_editor_connection_with_navigator_tip
,
false
,
2
);
}
{
...
...
@@ -114,17 +102,12 @@ public class PrefPageDatabaseEditors extends AbstractPrefPage implements IWorkbe
{
DBPPreferenceStore
store
=
DBWorkbench
.
getPlatform
().
getPreferenceStore
();
syncEditorDataSourceWithNavigator
.
setSelection
(
store
.
getBoolean
(
NavigatorPreferences
.
NAVIGATOR_SYNC_EDITOR_DATASOURCE
));
showGeneralToolbarEverywhere
.
setSelection
(
store
.
getBoolean
(
DBeaverPreferences
.
TOOLBARS_SHOW_GENERAL_ALWAYS
));
showEditToolbar
.
setSelection
(
store
.
getBoolean
(
DBeaverPreferences
.
TOOLBARS_SHOW_EDIT
));
//toolbarDatabaseSelectorWidth.setSelection(store.getInt(DBeaverPreferences.TOOLBARS_DATABASE_SELECTOR_WIDTH));
//toolbarSchemaSelectorWidth.setSelection(store.getInt(DBeaverPreferences.TOOLBARS_SCHEMA_SELECTOR_WIDTH));
keepEditorsOnRestart
.
setSelection
(
store
.
getBoolean
(
DBeaverPreferences
.
UI_KEEP_DATABASE_EDITORS
));
refreshEditorOnOpen
.
setSelection
(
store
.
getBoolean
(
NavigatorPreferences
.
NAVIGATOR_REFRESH_EDITORS_ON_OPEN
));
editorFullName
.
setSelection
(
store
.
getBoolean
(
DBeaverPreferences
.
NAVIGATOR_EDITOR_FULL_NAME
));
showTableGrid
.
setSelection
(
store
.
getBoolean
(
NavigatorPreferences
.
NAVIGATOR_EDITOR_SHOW_TABLE_GRID
));
showPreviewOnSave
.
setSelection
(
store
.
getBoolean
(
NavigatorPreferences
.
NAVIGATOR_SHOW_SQL_PREVIEW
));
syncEditorDataSourceWithNavigator
.
setSelection
(
store
.
getBoolean
(
NavigatorPreferences
.
NAVIGATOR_SYNC_EDITOR_DATASOURCE
));
booleanStyleSelector
.
select
(
BooleanRenderer
.
getDefaultStyle
().
ordinal
());
}
...
...
@@ -134,16 +117,13 @@ public class PrefPageDatabaseEditors extends AbstractPrefPage implements IWorkbe
{
DBPPreferenceStore
store
=
DBWorkbench
.
getPlatform
().
getPreferenceStore
();
store
.
setValue
(
NavigatorPreferences
.
NAVIGATOR_SYNC_EDITOR_DATASOURCE
,
syncEditorDataSourceWithNavigator
.
getSelection
());
store
.
setValue
(
DBeaverPreferences
.
TOOLBARS_SHOW_GENERAL_ALWAYS
,
showGeneralToolbarEverywhere
.
getSelection
());
store
.
setValue
(
DBeaverPreferences
.
TOOLBARS_SHOW_EDIT
,
showEditToolbar
.
getSelection
());
//store.setValue(DBeaverPreferences.TOOLBARS_DATABASE_SELECTOR_WIDTH, toolbarDatabaseSelectorWidth.getSelection());
//store.setValue(DBeaverPreferences.TOOLBARS_SCHEMA_SELECTOR_WIDTH, toolbarSchemaSelectorWidth.getSelection());
store
.
setValue
(
DBeaverPreferences
.
UI_KEEP_DATABASE_EDITORS
,
keepEditorsOnRestart
.
getSelection
());
store
.
setValue
(
DBeaverPreferences
.
UI_KEEP_DATABASE_EDITORS
,
keepEditorsOnRestart
.
getSelection
());
store
.
setValue
(
NavigatorPreferences
.
NAVIGATOR_REFRESH_EDITORS_ON_OPEN
,
refreshEditorOnOpen
.
getSelection
());
store
.
setValue
(
DBeaverPreferences
.
NAVIGATOR_EDITOR_FULL_NAME
,
editorFullName
.
getSelection
());
store
.
setValue
(
NavigatorPreferences
.
NAVIGATOR_EDITOR_SHOW_TABLE_GRID
,
showTableGrid
.
getSelection
());
store
.
setValue
(
NavigatorPreferences
.
NAVIGATOR_SHOW_SQL_PREVIEW
,
showPreviewOnSave
.
getSelection
());
store
.
setValue
(
NavigatorPreferences
.
NAVIGATOR_SYNC_EDITOR_DATASOURCE
,
syncEditorDataSourceWithNavigator
.
getSelection
());
BooleanRenderer
.
setDefaultStyle
(
CommonUtils
.
fromOrdinal
(
BooleanRenderer
.
Style
.
class
,
booleanStyleSelector
.
getSelectionIndex
()));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录