Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
817698b9
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,发现更多精彩内容 >>
提交
817698b9
编写于
9月 13, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Driver files download wizard
上级
6194e14f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
64 addition
and
7 deletion
+64
-7
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/maven/MavenRepository.java
...src/org/jkiss/dbeaver/registry/maven/MavenRepository.java
+4
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/EnterNameDialog.java
...ore/src/org/jkiss/dbeaver/ui/dialogs/EnterNameDialog.java
+5
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/preferences/PrefPageDrivers.java
...src/org/jkiss/dbeaver/ui/preferences/PrefPageDrivers.java
+55
-7
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/maven/MavenRepository.java
浏览文件 @
817698b9
...
...
@@ -79,6 +79,10 @@ public class MavenRepository
saveCache
();
}
public
String
getId
()
{
return
id
;
}
public
String
getName
()
{
return
name
;
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/EnterNameDialog.java
浏览文件 @
817698b9
...
...
@@ -42,6 +42,11 @@ public class EnterNameDialog extends Dialog {
this
.
propertyValue
=
propertyValue
;
}
@Override
protected
boolean
isResizable
()
{
return
true
;
}
public
String
getResult
()
{
return
result
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/preferences/PrefPageDrivers.java
浏览文件 @
817698b9
...
...
@@ -36,11 +36,16 @@ import org.jkiss.dbeaver.model.DBPPreferenceStore;
import
org.jkiss.dbeaver.registry.DriverDescriptor
;
import
org.jkiss.dbeaver.registry.encode.EncryptionException
;
import
org.jkiss.dbeaver.registry.encode.SecuredPasswordEncrypter
;
import
org.jkiss.dbeaver.registry.maven.MavenRegistry
;
import
org.jkiss.dbeaver.registry.maven.MavenRepository
;
import
org.jkiss.dbeaver.ui.UIUtils
;
import
org.jkiss.dbeaver.ui.dialogs.EnterNameDialog
;
import
org.jkiss.dbeaver.utils.PrefUtils
;
import
org.jkiss.utils.CommonUtils
;
import
java.net.MalformedURLException
;
import
java.net.URL
;
/**
* PrefPageDrivers
*/
...
...
@@ -58,6 +63,7 @@ public class PrefPageDrivers extends PreferencePage implements IWorkbenchPrefere
private
Text
customDriversHome
;
private
List
sourceList
;
private
Table
mavenRepoTable
;
@Override
public
void
init
(
IWorkbench
workbench
)
...
...
@@ -75,7 +81,7 @@ public class PrefPageDrivers extends PreferencePage implements IWorkbenchPrefere
{
Composite
composite
=
UIUtils
.
createPlaceholder
(
parent
,
1
,
5
);
Group
proxyObjects
=
UIUtils
.
createControlGroup
(
composite
,
CoreMessages
.
pref_page_ui_general_group_http_proxy
,
2
,
GridData
.
VERTICAL_ALIGN_BEGINNING
,
300
);
Group
proxyObjects
=
UIUtils
.
createControlGroup
(
composite
,
CoreMessages
.
pref_page_ui_general_group_http_proxy
,
4
,
GridData
.
FILL_HORIZONTAL
|
GridData
.
VERTICAL_ALIGN_BEGINNING
,
300
);
proxyHostText
=
UIUtils
.
createLabelText
(
proxyObjects
,
CoreMessages
.
pref_page_ui_general_label_proxy_host
,
null
);
//$NON-NLS-2$
proxyPortSpinner
=
UIUtils
.
createLabelSpinner
(
proxyObjects
,
CoreMessages
.
pref_page_ui_general_spinner_proxy_port
,
0
,
0
,
65535
);
proxyUserText
=
UIUtils
.
createLabelText
(
proxyObjects
,
CoreMessages
.
pref_page_ui_general_label_proxy_user
,
null
);
//$NON-NLS-2$
...
...
@@ -84,13 +90,50 @@ public class PrefPageDrivers extends PreferencePage implements IWorkbenchPrefere
{
Group
drivers
=
UIUtils
.
createControlGroup
(
composite
,
CoreMessages
.
pref_page_drivers_group_location
,
2
,
GridData
.
FILL_HORIZONTAL
,
300
);
customDriversHome
=
UIUtils
.
createOutputFolderChooser
(
drivers
,
"Local folder"
,
null
);
Label
sourcesLabel
=
UIUtils
.
createControlLabel
(
drivers
,
"Drivers' sources"
);
sourcesLabel
.
setLayoutData
(
new
GridData
(
GridData
.
VERTICAL_ALIGN_BEGINNING
));
Composite
sourcePH
=
UIUtils
.
createPlaceholder
(
drivers
,
2
,
5
);
sourcePH
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_BOTH
));
sourceList
=
new
List
(
sourcePH
,
SWT
.
BORDER
|
SWT
.
SINGLE
);
}
{
Group
mavenGroup
=
UIUtils
.
createControlGroup
(
composite
,
"Maven repositories"
,
2
,
GridData
.
FILL_HORIZONTAL
,
300
);
mavenRepoTable
=
new
Table
(
mavenGroup
,
SWT
.
BORDER
|
SWT
.
FULL_SELECTION
);
UIUtils
.
createTableColumn
(
mavenRepoTable
,
SWT
.
LEFT
,
"Id"
);
UIUtils
.
createTableColumn
(
mavenRepoTable
,
SWT
.
LEFT
,
"URL"
);
mavenRepoTable
.
setHeaderVisible
(
true
);
GridData
gd
=
new
GridData
(
GridData
.
FILL_BOTH
);
gd
.
heightHint
=
60
;
mavenRepoTable
.
setLayoutData
(
gd
);
Composite
buttonsPH
=
UIUtils
.
createPlaceholder
(
mavenGroup
,
1
);
UIUtils
.
createToolButton
(
buttonsPH
,
"Add"
,
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
String
urlString
=
EnterNameDialog
.
chooseName
(
getShell
(),
"Enter Maven repository URL"
,
"http://"
);
if
(
urlString
!=
null
)
{
try
{
URL
url
=
new
URL
(
urlString
);
new
TableItem
(
mavenRepoTable
,
SWT
.
NONE
).
setText
(
new
String
[]{
url
.
getHost
(),
urlString
});
}
catch
(
MalformedURLException
e1
)
{
UIUtils
.
showErrorDialog
(
getShell
(),
"Bad URL"
,
"Bad Maven repository URL"
,
e1
);
}
}
}
});
final
Button
removeButton
=
UIUtils
.
createToolButton
(
buttonsPH
,
"Remove"
,
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
mavenRepoTable
.
remove
(
mavenRepoTable
.
getSelectionIndices
());
mavenRepoTable
.
notifyListeners
(
SWT
.
Selection
,
new
Event
());
}
});
removeButton
.
setEnabled
(
false
);
}
{
Group
repoGroup
=
UIUtils
.
createControlGroup
(
composite
,
"File repositories"
,
2
,
GridData
.
FILL_HORIZONTAL
,
300
);
sourceList
=
new
List
(
repoGroup
,
SWT
.
BORDER
|
SWT
.
SINGLE
);
sourceList
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_BOTH
));
Composite
buttonsPH
=
UIUtils
.
createPlaceholder
(
sourcePH
,
1
);
Composite
buttonsPH
=
UIUtils
.
createPlaceholder
(
repoGroup
,
1
);
UIUtils
.
createToolButton
(
buttonsPH
,
"Add"
,
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
...
...
@@ -183,6 +226,11 @@ public class PrefPageDrivers extends PreferencePage implements IWorkbenchPrefere
for
(
String
source
:
DriverDescriptor
.
getDriversSources
())
{
sourceList
.
add
(
source
);
}
for
(
MavenRepository
repo
:
MavenRegistry
.
getInstance
().
getRepositories
())
{
new
TableItem
(
mavenRepoTable
,
SWT
.
NONE
).
setText
(
new
String
[]{
repo
.
getId
(),
repo
.
getUrl
()});
}
UIUtils
.
packColumns
(
mavenRepoTable
,
true
);
super
.
performDefaults
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录