Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
28b60e66
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,发现更多精彩内容 >>
提交
28b60e66
编写于
9月 13, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Driver files download wizard & driver editor dialog
上级
e041f4fe
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
43 addition
and
34 deletion
+43
-34
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DriverDescriptor.java
...core/src/org/jkiss/dbeaver/registry/DriverDescriptor.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/runtime/RuntimeUtils.java
...aver.core/src/org/jkiss/dbeaver/runtime/RuntimeUtils.java
+9
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/UIUtils.java
....jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/UIUtils.java
+6
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverDownloadAutoPage.java
...iss/dbeaver/ui/dialogs/driver/DriverDownloadAutoPage.java
+26
-31
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DriverDescriptor.java
浏览文件 @
28b60e66
...
...
@@ -22,7 +22,6 @@ import org.eclipse.core.runtime.IStatus;
import
org.eclipse.core.runtime.Platform
;
import
org.eclipse.jface.dialogs.ErrorDialog
;
import
org.eclipse.jface.dialogs.IDialogConstants
;
import
org.eclipse.swt.program.Program
;
import
org.eclipse.swt.widgets.Composite
;
import
org.eclipse.swt.widgets.Shell
;
import
org.jkiss.code.NotNull
;
...
...
@@ -41,6 +40,7 @@ import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import
org.jkiss.dbeaver.model.runtime.DBRRunnableContext
;
import
org.jkiss.dbeaver.model.runtime.DBRRunnableWithProgress
;
import
org.jkiss.dbeaver.model.runtime.OSDescriptor
;
import
org.jkiss.dbeaver.runtime.RuntimeUtils
;
import
org.jkiss.dbeaver.ui.UIUtils
;
import
org.jkiss.dbeaver.ui.dialogs.AcceptLicenseDialog
;
import
org.jkiss.dbeaver.ui.dialogs.ConfirmationDialog
;
...
...
@@ -958,7 +958,7 @@ public class DriverDescriptor extends AbstractDescriptor implements DBPDriver
@Override
public
void
run
()
{
// Open vendor's web site
Program
.
launch
(
fileSource
.
getUrl
());
RuntimeUtils
.
openWebBrowser
(
fileSource
.
getUrl
());
// Open driver editor
DriverEditDialog
dialog
=
new
DriverEditDialog
(
DBeaverUI
.
getActiveWorkbenchShell
(),
DriverDescriptor
.
this
);
dialog
.
open
();
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/runtime/RuntimeUtils.java
浏览文件 @
28b60e66
...
...
@@ -174,6 +174,15 @@ public class RuntimeUtils {
Program
.
launch
(
path
);
}
public
static
void
openWebBrowser
(
String
url
)
{
url
=
url
.
trim
();
if
(!
url
.
startsWith
(
"http://"
)
&&
!
url
.
startsWith
(
"https://"
)
&&
!
url
.
startsWith
(
"ftp://"
))
{
url
=
"http://"
+
url
;
}
Program
.
launch
(
url
);
}
public
static
File
getPlatformFile
(
String
platformURL
)
throws
IOException
{
URL
url
=
new
URL
(
platformURL
);
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/UIUtils.java
浏览文件 @
28b60e66
...
...
@@ -968,7 +968,12 @@ public class UIUtils {
public
static
void
showPreferencesFor
(
Shell
shell
,
Object
element
,
String
defPageID
)
{
PreferenceDialog
propDialog
=
PreferencesUtil
.
createPropertyDialogOn
(
shell
,
element
,
defPageID
,
null
,
null
,
PreferencesUtil
.
OPTION_NONE
);
PreferenceDialog
propDialog
;
if
(
element
==
null
)
{
propDialog
=
PreferencesUtil
.
createPreferenceDialogOn
(
shell
,
defPageID
,
new
String
[]
{
defPageID
},
null
,
PreferencesUtil
.
OPTION_NONE
);
}
else
{
propDialog
=
PreferencesUtil
.
createPropertyDialogOn
(
shell
,
element
,
defPageID
,
null
,
null
,
PreferencesUtil
.
OPTION_NONE
);
}
if
(
propDialog
!=
null
)
{
propDialog
.
open
();
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverDownloadAutoPage.java
浏览文件 @
28b60e66
...
...
@@ -17,19 +17,21 @@
*/
package
org.jkiss.dbeaver.ui.dialogs.driver
;
import
org.eclipse.jface.dialogs.IDialogConstants
;
import
org.eclipse.jface.wizard.WizardPage
;
import
org.eclipse.swt.SWT
;
import
org.eclipse.swt.events.SelectionAdapter
;
import
org.eclipse.swt.events.SelectionEvent
;
import
org.eclipse.swt.layout.GridData
;
import
org.eclipse.swt.widgets.*
;
import
org.eclipse.swt.widgets.Composite
;
import
org.eclipse.swt.widgets.Link
;
import
org.eclipse.swt.widgets.Text
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.core.DBeaverUI
;
import
org.jkiss.dbeaver.registry.DriverDescriptor
;
import
org.jkiss.dbeaver.registry.DriverFileDescriptor
;
import
org.jkiss.dbeaver.
tools.transfer.wizard.DataTransferWizard
;
import
org.jkiss.dbeaver.
runtime.RuntimeUtils
;
import
org.jkiss.dbeaver.ui.UIUtils
;
import
org.jkiss.dbeaver.ui.
dialogs.ActiveWizardPage
;
import
org.jkiss.dbeaver.ui.
preferences.PrefPageDrivers
;
import
org.jkiss.utils.CommonUtils
;
class
DriverDownloadAutoPage
extends
WizardPage
{
...
...
@@ -44,7 +46,7 @@ class DriverDownloadAutoPage extends WizardPage {
@Override
public
void
createControl
(
Composite
parent
)
{
DriverDownloadWizard
wizard
=
(
DriverDownloadWizard
)
getWizard
();
DriverDescriptor
driver
=
wizard
.
getDriver
();
final
DriverDescriptor
driver
=
wizard
.
getDriver
();
setMessage
(
"Download "
+
driver
.
getFullName
()
+
" driver files"
);
...
...
@@ -70,43 +72,36 @@ class DriverDownloadAutoPage extends WizardPage {
{
Composite
linksGroup
=
UIUtils
.
createPlaceholder
(
composite
,
2
);
linksGroup
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
));
Composite
configGroup
=
UIUtils
.
createPlaceholder
(
linksGroup
,
1
);
configGroup
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
));
// Maven/repo config
UIUtils
.
createLink
(
configGroup
,
"<a>Repository configuration</a>"
,
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
}
});
// Proxy config
UIUtils
.
createLink
(
configGroup
,
"<a>Proxy configration</a>"
,
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
}
});
Composite
webGroup
=
UIUtils
.
createPlaceholder
(
linksGroup
,
1
);
webGroup
.
setLayoutData
(
new
GridData
(
GridData
.
VERTICAL_ALIGN_BEGINNING
|
GridData
.
FILL_HORIZONTAL
|
GridData
.
HORIZONTAL_ALIGN_END
));
// Vendor site
if
(!
CommonUtils
.
isEmpty
(
driver
.
getWebURL
()))
{
Link
link
=
UIUtils
.
createLink
(
web
Group
,
links
Group
,
"Vendor's website: <a href=\""
+
driver
.
getWebURL
()
+
"\">"
+
driver
.
getWebURL
()
+
"</a>"
,
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
super
.
widgetSelected
(
e
);
RuntimeUtils
.
openWebBrowser
(
driver
.
getWebURL
()
);
}
});
link
.
setLayoutData
(
new
GridData
(
GridData
.
VERTICAL_ALIGN_BEGINNING
|
GridData
.
HORIZONTAL_ALIGN_END
));
link
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
|
GridData
.
VERTICAL_ALIGN_BEGINNING
|
GridData
.
HORIZONTAL_ALIGN_BEGINNING
));
}
else
{
UIUtils
.
createPlaceholder
(
linksGroup
,
1
).
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
));
}
Link
link
=
UIUtils
.
createLink
(
linksGroup
,
"<a>Download configuration</a>"
,
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
UIUtils
.
showPreferencesFor
(
DBeaverUI
.
getActiveWorkbenchShell
(),
null
,
PrefPageDrivers
.
PAGE_ID
);
}
});
link
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
|
GridData
.
VERTICAL_ALIGN_BEGINNING
|
GridData
.
HORIZONTAL_ALIGN_END
));
}
setControl
(
composite
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录