Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
076f159f
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,发现更多精彩内容 >>
提交
076f159f
编写于
12月 30, 2020
作者:
S
Serge Rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#10819 HANA UI fixes
上级
a05bfd35
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
32 addition
and
84 deletion
+32
-84
plugins/org.jkiss.dbeaver.ext.hana.ui/META-INF/MANIFEST.MF
plugins/org.jkiss.dbeaver.ext.hana.ui/META-INF/MANIFEST.MF
+0
-1
plugins/org.jkiss.dbeaver.ext.hana.ui/OSGI-INF/l10n/bundle.properties
...jkiss.dbeaver.ext.hana.ui/OSGI-INF/l10n/bundle.properties
+1
-0
plugins/org.jkiss.dbeaver.ext.hana.ui/src/org/jkiss/dbeaver/ext/hana/ui/HANAActivator.java
...a.ui/src/org/jkiss/dbeaver/ext/hana/ui/HANAActivator.java
+0
-57
plugins/org.jkiss.dbeaver.ext.hana.ui/src/org/jkiss/dbeaver/ext/hana/ui/views/HANAConnectionPage.java
...g/jkiss/dbeaver/ext/hana/ui/views/HANAConnectionPage.java
+31
-26
未找到文件。
plugins/org.jkiss.dbeaver.ext.hana.ui/META-INF/MANIFEST.MF
浏览文件 @
076f159f
...
...
@@ -4,7 +4,6 @@ Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.jkiss.dbeaver.ext.hana.ui;singleton:=true
Bundle-Version: 1.0.1.qualifier
Bundle-Release-Date: 20201019
Bundle-Activator: org.jkiss.dbeaver.ext.hana.ui.HANAActivator
Require-Bundle: org.eclipse.ui,
org.jkiss.dbeaver.ext.hana,
org.jkiss.dbeaver.ui.editors.connection,
...
...
plugins/org.jkiss.dbeaver.ext.hana.ui/OSGI-INF/l10n/bundle.properties
浏览文件 @
076f159f
Bundle-Vendor
=
DBeaver Corp
Bundle-Name
=
DBeaver HANA UI
hana.dialog.connection.header
=
SAP HANA Connection Settings
\ No newline at end of file
plugins/org.jkiss.dbeaver.ext.hana.ui/src/org/jkiss/dbeaver/ext/hana/ui/HANAActivator.java
已删除
100644 → 0
浏览文件 @
a05bfd35
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2020 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.ext.hana.ui
;
import
org.eclipse.jface.resource.ImageDescriptor
;
import
org.eclipse.ui.plugin.AbstractUIPlugin
;
import
org.osgi.framework.BundleContext
;
/**
* The activator class controls the plug-in life cycle
*/
public
class
HANAActivator
extends
AbstractUIPlugin
{
// The plug-in ID
public
static
final
String
PLUGIN_ID
=
"org.jkiss.dbeaver.ext.hana.ui"
;
// The shared instance
private
static
HANAActivator
plugin
;
public
HANAActivator
()
{
}
@Override
public
void
start
(
BundleContext
context
)
throws
Exception
{
super
.
start
(
context
);
plugin
=
this
;
}
@Override
public
void
stop
(
BundleContext
context
)
throws
Exception
{
plugin
=
null
;
super
.
stop
(
context
);
}
public
static
HANAActivator
getDefault
()
{
return
plugin
;
}
public
static
ImageDescriptor
getImageDescriptor
(
String
path
)
{
return
imageDescriptorFromPlugin
(
PLUGIN_ID
,
path
);
}
}
plugins/org.jkiss.dbeaver.ext.hana.ui/src/org/jkiss/dbeaver/ext/hana/ui/views/HANAConnectionPage.java
浏览文件 @
076f159f
...
...
@@ -16,21 +16,14 @@
*/
package
org.jkiss.dbeaver.ext.hana.ui.views
;
import
java.util.Locale
;
import
java.util.Map.Entry
;
import
org.eclipse.jface.dialogs.IDialogPage
;
import
org.eclipse.jface.resource.ImageDescriptor
;
import
org.eclipse.swt.SWT
;
import
org.eclipse.swt.events.SelectionAdapter
;
import
org.eclipse.swt.events.SelectionEvent
;
import
org.eclipse.swt.graphics.Image
;
import
org.eclipse.swt.layout.GridData
;
import
org.eclipse.swt.layout.GridLayout
;
import
org.eclipse.swt.widgets.Combo
;
import
org.eclipse.swt.widgets.Composite
;
import
org.eclipse.swt.widgets.Label
;
import
org.eclipse.swt.widgets.Text
;
import
org.jkiss.dbeaver.ext.hana.ui.HANAActivator
;
import
org.eclipse.swt.widgets.*
;
import
org.jkiss.dbeaver.ext.hana.ui.internal.HANAEdition
;
import
org.jkiss.dbeaver.ext.hana.ui.internal.HANAMessages
;
import
org.jkiss.dbeaver.model.DBPDataSourceContainer
;
...
...
@@ -41,6 +34,9 @@ import org.jkiss.dbeaver.ui.dialogs.connection.ConnectionPageWithAuth;
import
org.jkiss.dbeaver.ui.dialogs.connection.DriverPropertiesDialogPage
;
import
org.jkiss.utils.CommonUtils
;
import
java.util.Locale
;
import
java.util.Map.Entry
;
/*
* when edition==GENERIC, don't show/touch any driver properties for
* - compatibility with previous configuration
...
...
@@ -73,23 +69,25 @@ public class HANAConnectionPage extends ConnectionPageWithAuth implements ICompo
private
String
instanceValue
;
private
String
databaseValue
;
private
static
ImageDescriptor
logoImage
=
HANAActivator
.
getImageDescriptor
(
"icons/sap_hana_logo.png"
);
//$NON-NLS-1$
private
DriverPropertiesDialogPage
driverPropsPage
;
private
final
Image
logoImage
;
public
HANAConnectionPage
()
{
driverPropsPage
=
new
DriverPropertiesDialogPage
(
this
);
logoImage
=
createImage
(
"icons/sap_hana_logo.png"
);
//$NON-NLS-1$
}
@Override
public
void
dispose
()
{
super
.
dispose
();
UIUtils
.
dispose
(
logoImage
);
}
@Override
public
void
createControl
(
Composite
composite
)
{
setImageDescriptor
(
logoImage
);
public
Image
getImage
()
{
return
logoImage
;
}
@Override
public
void
createControl
(
Composite
composite
)
{
Composite
settingsGroup
=
new
Composite
(
composite
,
SWT
.
NONE
);
settingsGroup
.
setLayout
(
new
GridLayout
(
1
,
false
));
settingsGroup
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_BOTH
));
...
...
@@ -105,14 +103,13 @@ public class HANAConnectionPage extends ConnectionPageWithAuth implements ICompo
hostText
=
UIUtils
.
createLabelText
(
addrGroup
,
HANAMessages
.
label_host
,
""
);
portText
=
UIUtils
.
createLabelText
(
addrGroup
,
HANAMessages
.
label_port
,
""
);
GridData
gd
=
new
GridData
(
GridData
.
VERTICAL_ALIGN_BEGINNING
);
gd
.
widthHint
=
UIUtils
.
getFontHeight
(
portText
)
*
5
;
portText
.
setLayoutData
(
gd
);
portText
.
setLayoutData
(
new
GridData
(
GridData
.
HORIZONTAL_ALIGN_BEGINNING
));
((
GridData
)
portText
.
getLayoutData
()).
widthHint
=
UIUtils
.
getFontHeight
(
portText
)
*
5
;
portText
.
addVerifyListener
(
UIUtils
.
getIntegerVerifyListener
(
Locale
.
getDefault
()));
instanceLabel
=
UIUtils
.
createControlLabel
(
addrGroup
,
HANAMessages
.
label_instance
);
instanceText
=
new
Text
(
addrGroup
,
SWT
.
BORDER
);
instanceText
.
setLayoutData
(
gd
);
instanceText
.
setLayoutData
(
new
GridData
(
GridData
.
VERTICAL_ALIGN_BEGINNING
)
);
instanceText
.
addVerifyListener
(
UIUtils
.
getIntegerVerifyListener
(
Locale
.
getDefault
()));
instanceText
.
setToolTipText
(
HANAMessages
.
tooltip_instance
);
databaseLabel
=
UIUtils
.
createControlLabel
(
addrGroup
,
HANAMessages
.
label_database
);
...
...
@@ -224,7 +221,7 @@ public class HANAConnectionPage extends ConnectionPageWithAuth implements ICompo
@Override
public
IDialogPage
[]
getSubPages
(
boolean
extrasOnly
,
boolean
forceCreate
)
{
return
new
IDialogPage
[]
{
driverPropsPage
};
return
new
IDialogPage
[]
{
new
DriverPropertiesDialogPage
(
this
)
};
}
private
void
editionUpdated
()
{
...
...
@@ -241,12 +238,6 @@ public class HANAConnectionPage extends ConnectionPageWithAuth implements ICompo
edition
=
HANAEdition
.
fromTitle
(
editionCombo
.
getText
());
// restore / set calculated new values
instanceLabel
.
setVisible
(
edition
!=
HANAEdition
.
GENERIC
);
instanceText
.
setVisible
(
edition
!=
HANAEdition
.
GENERIC
);
databaseLabel
.
setVisible
(
edition
!=
HANAEdition
.
GENERIC
);
databaseText
.
setVisible
(
edition
!=
HANAEdition
.
GENERIC
);
portText
.
setEditable
(
edition
==
HANAEdition
.
GENERIC
||
edition
==
HANAEdition
.
EXPRESS
);
UIUtils
.
fixReadonlyTextBackground
(
portText
);
switch
(
edition
)
{
...
...
@@ -291,6 +282,20 @@ public class HANAConnectionPage extends ConnectionPageWithAuth implements ICompo
databaseText
.
setEditable
(
false
);
}
UIUtils
.
fixReadonlyTextBackground
(
databaseText
);
toggleControlVisibility
(
instanceLabel
);
toggleControlVisibility
(
instanceText
);
toggleControlVisibility
(
databaseLabel
);
toggleControlVisibility
(
databaseText
);
((
Composite
)
getControl
()).
layout
(
true
,
true
);
}
private
void
toggleControlVisibility
(
Control
control
)
{
control
.
setVisible
(
edition
!=
HANAEdition
.
GENERIC
);
Object
layoutData
=
control
.
getLayoutData
();
if
(
layoutData
instanceof
GridData
)
{
((
GridData
)
layoutData
).
exclude
=
(
edition
==
HANAEdition
.
GENERIC
);
}
}
private
void
instanceUpdated
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录