Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
e041f4fe
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,发现更多精彩内容 >>
提交
e041f4fe
编写于
9月 13, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Driver files download wizard & driver editor dialog
上级
6422df6a
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
118 addition
and
63 deletion
+118
-63
plugins/org.jkiss.dbeaver.core.application/src/org/jkiss/dbeaver/core/application/about/AboutBoxDialog.java
.../jkiss/dbeaver/core/application/about/AboutBoxDialog.java
+4
-8
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DriverDescriptor.java
...core/src/org/jkiss/dbeaver/registry/DriverDescriptor.java
+8
-6
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DriverFileDescriptor.java
.../src/org/jkiss/dbeaver/registry/DriverFileDescriptor.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/UIUtils.java
....jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/UIUtils.java
+7
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/connection/ConnectionPageGeneral.java
.../dbeaver/ui/dialogs/connection/ConnectionPageGeneral.java
+1
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/connection/EditObjectFilterDialog.java
...dbeaver/ui/dialogs/connection/EditObjectFilterDialog.java
+1
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/data/ValueViewDialog.java
...rc/org/jkiss/dbeaver/ui/dialogs/data/ValueViewDialog.java
+11
-15
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverDownloadAutoPage.java
...iss/dbeaver/ui/dialogs/driver/DriverDownloadAutoPage.java
+59
-10
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverDownloadDialog.java
...jkiss/dbeaver/ui/dialogs/driver/DriverDownloadDialog.java
+12
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverDownloadWizard.java
...jkiss/dbeaver/ui/dialogs/driver/DriverDownloadWizard.java
+2
-0
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverEditDialog.java
...org/jkiss/dbeaver/ui/dialogs/driver/DriverEditDialog.java
+8
-10
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/preferences/TargetPrefPage.java
.../src/org/jkiss/dbeaver/ui/preferences/TargetPrefPage.java
+3
-6
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/DBPDriverFile.java
...aver.model/src/org/jkiss/dbeaver/model/DBPDriverFile.java
+1
-1
未找到文件。
plugins/org.jkiss.dbeaver.core.application/src/org/jkiss/dbeaver/core/application/about/AboutBoxDialog.java
浏览文件 @
e041f4fe
...
...
@@ -152,28 +152,24 @@ public class AboutBoxDialog extends Dialog
gd
.
horizontalAlignment
=
GridData
.
CENTER
;
authorLabel
.
setLayoutData
(
gd
);
Link
siteLink
=
new
Link
(
group
,
SWT
.
NONE
);
siteLink
.
setText
(
UIUtils
.
makeAnchor
(
product
.
getProperty
(
PRODUCT_PROP_WEBSITE
)));
siteLink
.
setBackground
(
background
);
siteLink
.
addSelectionListener
(
new
SelectionAdapter
()
{
Link
siteLink
=
UIUtils
.
createLink
(
group
,
UIUtils
.
makeAnchor
(
product
.
getProperty
(
PRODUCT_PROP_WEBSITE
)),
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
RuntimeUtils
.
launchProgram
(
e
.
text
);
}
});
siteLink
.
setBackground
(
background
);
gd
=
new
GridData
();
gd
.
horizontalAlignment
=
GridData
.
CENTER
;
siteLink
.
setLayoutData
(
gd
);
Link
emailLink
=
new
Link
(
group
,
SWT
.
NONE
);
emailLink
.
setText
(
UIUtils
.
makeAnchor
(
product
.
getProperty
(
PRODUCT_PROP_EMAIL
)));
emailLink
.
setBackground
(
background
);
emailLink
.
addSelectionListener
(
new
SelectionAdapter
()
{
Link
emailLink
=
UIUtils
.
createLink
(
group
,
UIUtils
.
makeAnchor
(
product
.
getProperty
(
PRODUCT_PROP_EMAIL
)),
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
RuntimeUtils
.
launchProgram
(
"mailto:"
+
e
.
text
);
//$NON-NLS-1$
}
});
emailLink
.
setBackground
(
background
);
gd
=
new
GridData
();
gd
.
horizontalAlignment
=
GridData
.
CENTER
;
emailLink
.
setLayoutData
(
gd
);
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DriverDescriptor.java
浏览文件 @
e041f4fe
...
...
@@ -825,10 +825,10 @@ public class DriverDescriptor extends AbstractDescriptor implements DBPDriver
public
void
loadDriver
(
DBRRunnableContext
runnableContext
)
throws
DBException
{
this
.
loadDriver
(
runnableContext
,
false
);
this
.
loadDriver
(
runnableContext
,
false
,
false
);
}
public
void
loadDriver
(
DBRRunnableContext
runnableContext
,
boolean
forceReload
)
public
void
loadDriver
(
DBRRunnableContext
runnableContext
,
boolean
forceReload
,
boolean
omitDownload
)
throws
DBException
{
if
(
isLoaded
&&
!
forceReload
)
{
...
...
@@ -836,7 +836,7 @@ public class DriverDescriptor extends AbstractDescriptor implements DBPDriver
}
isLoaded
=
false
;
loadLibraries
(
runnableContext
);
loadLibraries
(
runnableContext
,
omitDownload
);
if
(!
acceptDriverLicenses
(
runnableContext
))
{
throw
new
DBException
(
"You have to accept driver '"
+
getFullName
()
+
"' license to be able to connect"
);
...
...
@@ -872,12 +872,14 @@ public class DriverDescriptor extends AbstractDescriptor implements DBPDriver
}
}
private
void
loadLibraries
(
DBRRunnableContext
runnableContext
)
private
void
loadLibraries
(
DBRRunnableContext
runnableContext
,
boolean
omitDownload
)
throws
DBException
{
this
.
classLoader
=
null
;
validateFilesPresence
(
runnableContext
);
if
(!
omitDownload
)
{
validateFilesPresence
(
runnableContext
);
}
List
<
URL
>
libraryURLs
=
new
ArrayList
<
URL
>();
// Load libraries
...
...
@@ -920,7 +922,7 @@ public class DriverDescriptor extends AbstractDescriptor implements DBPDriver
final
List
<
DriverFileDescriptor
>
downloadCandidates
=
new
ArrayList
<
DriverFileDescriptor
>();
for
(
DriverFileDescriptor
file
:
files
)
{
if
(
file
.
isDisabled
()
||
!
file
.
is
Local
())
{
if
(
file
.
isDisabled
()
||
!
file
.
is
Downloadable
())
{
// Nothing we can do about it
continue
;
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/registry/DriverFileDescriptor.java
浏览文件 @
e041f4fe
...
...
@@ -138,7 +138,7 @@ public class DriverFileDescriptor implements DBPDriverFile
}
@Override
public
boolean
is
Local
()
public
boolean
is
Downloadable
()
{
return
isRepositoryArtifact
()
||
isMavenArtifact
();
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/UIUtils.java
浏览文件 @
e041f4fe
...
...
@@ -1226,6 +1226,13 @@ public class UIUtils {
return
saveRunner
.
getResult
();
}
public
static
Link
createLink
(
Composite
parent
,
String
text
,
SelectionListener
listener
)
{
Link
link
=
new
Link
(
parent
,
SWT
.
NONE
);
link
.
setText
(
text
);
link
.
addSelectionListener
(
listener
);
return
link
;
}
public
static
CellEditor
createPropertyEditor
(
Composite
parent
,
DBPPropertySource
source
,
DBPPropertyDescriptor
property
)
{
if
(
source
==
null
)
{
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/connection/ConnectionPageGeneral.java
浏览文件 @
e041f4fe
...
...
@@ -425,9 +425,7 @@ class ConnectionPageGeneral extends ActiveWizardPage<ConnectionWizard> {
for
(
int
i
=
0
;
i
<
filters
.
size
();
i
++)
{
final
FilterInfo
filterInfo
=
filters
.
get
(
i
);
filterInfo
.
link
=
new
Link
(
filtersGroup
,
SWT
.
NONE
);
filterInfo
.
link
.
setText
(
"<a>"
+
filterInfo
.
title
+
"</a>"
);
filterInfo
.
link
.
addSelectionListener
(
new
SelectionAdapter
()
{
filterInfo
.
link
=
UIUtils
.
createLink
(
filtersGroup
,
"<a>"
+
filterInfo
.
title
+
"</a>"
,
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
EditObjectFilterDialog
dialog
=
new
EditObjectFilterDialog
(
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/connection/EditObjectFilterDialog.java
浏览文件 @
e041f4fe
...
...
@@ -81,9 +81,7 @@ public class EditObjectFilterDialog extends HelpEnabledDialog {
enableButton
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
));
enableButton
.
setSelection
(
filter
.
isEnabled
());
if
(!
globalFilter
)
{
Link
globalLink
=
new
Link
(
topPanel
,
SWT
.
NONE
);
globalLink
.
setText
(
CoreMessages
.
dialog_filter_global_link
);
globalLink
.
addSelectionListener
(
new
SelectionAdapter
()
{
Link
globalLink
=
UIUtils
.
createLink
(
topPanel
,
CoreMessages
.
dialog_filter_global_link
,
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
setReturnCode
(
SHOW_GLOBAL_FILTERS_ID
);
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/data/ValueViewDialog.java
浏览文件 @
e041f4fe
...
...
@@ -17,12 +17,10 @@
*/
package
org.jkiss.dbeaver.ui.dialogs.data
;
import
org.eclipse.jface.action.IContributionManager
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.dbeaver.Log
;
import
org.eclipse.core.runtime.IStatus
;
import
org.eclipse.core.runtime.Status
;
import
org.eclipse.core.runtime.jobs.Job
;
import
org.eclipse.jface.action.IContributionManager
;
import
org.eclipse.jface.dialogs.Dialog
;
import
org.eclipse.jface.dialogs.IDialogConstants
;
import
org.eclipse.jface.dialogs.IDialogSettings
;
...
...
@@ -39,8 +37,10 @@ import org.eclipse.swt.layout.GridData;
import
org.eclipse.swt.widgets.*
;
import
org.eclipse.ui.IWorkbenchPartSite
;
import
org.eclipse.ui.IWorkbenchWindow
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.core.CoreMessages
;
import
org.jkiss.dbeaver.core.DBeaverCore
;
import
org.jkiss.dbeaver.core.DBeaverUI
;
...
...
@@ -52,8 +52,8 @@ import org.jkiss.dbeaver.model.exec.DBCSession;
import
org.jkiss.dbeaver.model.navigator.DBNDatabaseNode
;
import
org.jkiss.dbeaver.model.runtime.DBRProgressMonitor
;
import
org.jkiss.dbeaver.model.runtime.DBRRunnableWithProgress
;
import
org.jkiss.dbeaver.model.struct.*
;
import
org.jkiss.dbeaver.model.runtime.VoidProgressMonitor
;
import
org.jkiss.dbeaver.model.struct.*
;
import
org.jkiss.dbeaver.runtime.jobs.DataSourceJob
;
import
org.jkiss.dbeaver.ui.DBeaverIcons
;
import
org.jkiss.dbeaver.ui.UIIcon
;
...
...
@@ -61,8 +61,6 @@ import org.jkiss.dbeaver.ui.UIUtils;
import
org.jkiss.dbeaver.ui.actions.navigator.NavigatorHandlerObjectOpen
;
import
org.jkiss.dbeaver.ui.controls.ColumnInfoPanel
;
import
org.jkiss.dbeaver.ui.data.*
;
import
org.jkiss.dbeaver.ui.data.IAttributeController
;
import
org.jkiss.dbeaver.ui.data.IValueController
;
import
org.jkiss.dbeaver.ui.data.managers.BaseValueManager
;
import
org.jkiss.dbeaver.ui.dialogs.struct.EditDictionaryDialog
;
import
org.jkiss.dbeaver.ui.editors.data.DatabaseDataEditor
;
...
...
@@ -439,11 +437,10 @@ public abstract class ValueViewDialog extends Dialog implements IValueEditorStan
final
DBSEntityAssociation
association
=
(
DBSEntityAssociation
)
refConstraint
;
final
DBSEntity
refTable
=
association
.
getReferencedConstraint
().
getParentObject
();
Composite
labelGroup
=
UIUtils
.
createPlaceholder
(
parent
,
2
);
labelGroup
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
|
GridData
.
FILL_HORIZONTAL
));
Link
dictLabel
=
new
Link
(
labelGroup
,
SWT
.
NONE
);
dictLabel
.
setLayoutData
(
new
GridData
(
GridData
.
HORIZONTAL_ALIGN_BEGINNING
));
dictLabel
.
setText
(
NLS
.
bind
(
CoreMessages
.
dialog_value_view_label_dictionary
,
refTable
.
getName
()));
dictLabel
.
addSelectionListener
(
new
SelectionAdapter
()
{
labelGroup
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
));
Link
dictLabel
=
UIUtils
.
createLink
(
labelGroup
,
NLS
.
bind
(
CoreMessages
.
dialog_value_view_label_dictionary
,
refTable
.
getName
()),
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
// Open
...
...
@@ -465,11 +462,9 @@ public abstract class ValueViewDialog extends Dialog implements IValueEditorStan
});
}
});
dictLabel
.
setLayoutData
(
new
GridData
(
GridData
.
HORIZONTAL_ALIGN_BEGINNING
));
Link
hintLabel
=
new
Link
(
labelGroup
,
SWT
.
NONE
);
hintLabel
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
|
GridData
.
HORIZONTAL_ALIGN_END
));
hintLabel
.
setText
(
"(<a>Define Description</a>)"
);
hintLabel
.
addSelectionListener
(
new
SelectionAdapter
()
{
Link
hintLabel
=
UIUtils
.
createLink
(
labelGroup
,
"(<a>Define Description</a>)"
,
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
EditDictionaryDialog
dialog
=
new
EditDictionaryDialog
(
getShell
(),
"Dictionary structure"
,
refTable
);
...
...
@@ -478,6 +473,7 @@ public abstract class ValueViewDialog extends Dialog implements IValueEditorStan
}
}
});
hintLabel
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
|
GridData
.
HORIZONTAL_ALIGN_END
));
}
editorSelector
=
new
Table
(
parent
,
SWT
.
BORDER
|
SWT
.
SINGLE
|
SWT
.
FULL_SELECTION
|
SWT
.
H_SCROLL
|
SWT
.
V_SCROLL
);
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverDownloadAutoPage.java
浏览文件 @
e041f4fe
...
...
@@ -20,15 +20,17 @@ 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.Button
;
import
org.eclipse.swt.widgets.Composite
;
import
org.eclipse.swt.widgets.Text
;
import
org.eclipse.swt.widgets.*
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.registry.DriverDescriptor
;
import
org.jkiss.dbeaver.registry.DriverFileDescriptor
;
import
org.jkiss.dbeaver.tools.transfer.wizard.DataTransferWizard
;
import
org.jkiss.dbeaver.ui.UIUtils
;
import
org.jkiss.dbeaver.ui.dialogs.ActiveWizardPage
;
import
org.jkiss.utils.CommonUtils
;
class
DriverDownloadAutoPage
extends
WizardPage
{
...
...
@@ -42,13 +44,17 @@ class DriverDownloadAutoPage extends WizardPage {
@Override
public
void
createControl
(
Composite
parent
)
{
DriverDownloadWizard
wizard
=
(
DriverDownloadWizard
)
getWizard
();
DriverDescriptor
driver
=
wizard
.
getDriver
();
setMessage
(
"Download "
+
driver
.
getFullName
()
+
" driver files"
);
StringBuilder
message
=
new
StringBuilder
();
message
.
append
(
"Download "
).
append
(
wizard
.
getDriver
().
getFullName
()).
append
(
" driver files:\n"
);
for
(
DriverFileDescriptor
file
:
wizard
.
getDriver
().
getDriverFiles
())
{
message
.
append
(
"\t-"
).
append
(
file
.
getPath
()).
append
(
"\n"
);
message
.
append
(
""
).
append
(
driver
.
getFullName
())
.
append
(
" driver files are missing.\nDBeaver can download these files automatically.\n\nFiles required by driver:"
);
for
(
DriverFileDescriptor
file
:
driver
.
getDriverFiles
())
{
message
.
append
(
"\n\t-"
).
append
(
file
.
getPath
());
}
message
.
append
(
"\n\nOr you can obtain driver files by yourself and add them in driver editor."
);
initializeDialogUnits
(
parent
);
Composite
composite
=
UIUtils
.
createPlaceholder
(
parent
,
1
);
...
...
@@ -56,11 +62,54 @@ class DriverDownloadAutoPage extends WizardPage {
Text
infoText
=
new
Text
(
composite
,
SWT
.
MULTI
|
SWT
.
READ_ONLY
|
SWT
.
WRAP
);
infoText
.
setText
(
message
.
toString
());
infoText
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_
BOTH
));
infoText
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_
HORIZONTAL
));
setControl
(
composite
);
//UIUtils.createHorizontalLine(composite);
UIUtils
.
createPlaceholder
(
composite
,
1
).
setLayoutData
(
new
GridData
(
GridData
.
FILL_BOTH
));
{
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
)
{
setMessage
(
"Download "
+
wizard
.
getDriver
().
getFullName
()
+
" driver files"
);
}
});
// 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
(
webGroup
,
"Vendor's website: <a href=\""
+
driver
.
getWebURL
()
+
"\">"
+
driver
.
getWebURL
()
+
"</a>"
,
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
super
.
widgetSelected
(
e
);
}
});
link
.
setLayoutData
(
new
GridData
(
GridData
.
VERTICAL_ALIGN_BEGINNING
|
GridData
.
HORIZONTAL_ALIGN_END
));
}
}
setControl
(
composite
);
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverDownloadDialog.java
浏览文件 @
e041f4fe
...
...
@@ -23,7 +23,9 @@ import org.eclipse.swt.widgets.Button;
import
org.eclipse.swt.widgets.Composite
;
import
org.eclipse.ui.IWorkbenchWindow
;
import
org.jkiss.dbeaver.core.CoreMessages
;
import
org.jkiss.dbeaver.core.DBeaverUI
;
import
org.jkiss.dbeaver.registry.DriverDescriptor
;
import
org.jkiss.dbeaver.ui.UIUtils
;
import
org.jkiss.utils.CommonUtils
;
/**
...
...
@@ -54,4 +56,14 @@ public class DriverDownloadDialog extends WizardDialog
finishButton
.
setText
(
"Open Download Page"
);
}
}
@Override
protected
void
buttonPressed
(
int
buttonId
)
{
if
(
buttonId
==
EDIT_DRIVER_BUTTON_ID
)
{
cancelPressed
();
DriverEditDialog
dialog
=
new
DriverEditDialog
(
DBeaverUI
.
getActiveWorkbenchShell
(),
driver
);
dialog
.
open
();
}
super
.
buttonPressed
(
buttonId
);
}
}
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverDownloadWizard.java
浏览文件 @
e041f4fe
...
...
@@ -72,4 +72,6 @@ public class DriverDownloadWizard extends Wizard implements IExportWizard {
return
true
;
}
}
\ No newline at end of file
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/dialogs/driver/DriverEditDialog.java
浏览文件 @
e041f4fe
...
...
@@ -17,12 +17,10 @@
*/
package
org.jkiss.dbeaver.ui.dialogs.driver
;
import
org.eclipse.core.runtime.IStatus
;
import
org.eclipse.jface.dialogs.IDialogSettings
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.Log
;
import
org.eclipse.core.runtime.IProgressMonitor
;
import
org.eclipse.core.runtime.IStatus
;
import
org.eclipse.jface.dialogs.IDialogConstants
;
import
org.eclipse.jface.dialogs.IDialogSettings
;
import
org.eclipse.jface.dialogs.ProgressMonitorDialog
;
import
org.eclipse.jface.operation.IRunnableWithProgress
;
import
org.eclipse.jface.viewers.CellLabelProvider
;
...
...
@@ -37,15 +35,18 @@ import org.eclipse.swt.events.SelectionEvent;
import
org.eclipse.swt.layout.GridData
;
import
org.eclipse.swt.layout.GridLayout
;
import
org.eclipse.swt.widgets.*
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.core.CoreMessages
;
import
org.jkiss.dbeaver.core.DBeaverUI
;
import
org.jkiss.dbeaver.model.DBIcon
;
import
org.jkiss.dbeaver.model.DBPDataSource
;
import
org.jkiss.dbeaver.model.DBPDriverFile
;
import
org.jkiss.dbeaver.registry.DataSourceProviderDescriptor
;
import
org.jkiss.dbeaver.registry.DriverDescriptor
;
import
org.jkiss.dbeaver.registry.DriverFileDescriptor
;
import
org.jkiss.dbeaver.runtime.RuntimeUtils
;
import
org.jkiss.dbeaver.
model.DBIcon
;
import
org.jkiss.dbeaver.
runtime.properties.PropertySourceCustom
;
import
org.jkiss.dbeaver.ui.DBeaverIcons
;
import
org.jkiss.dbeaver.ui.IHelpContextIds
;
import
org.jkiss.dbeaver.ui.UIIcon
;
...
...
@@ -55,7 +56,6 @@ import org.jkiss.dbeaver.ui.controls.ConnectionPropertiesControl;
import
org.jkiss.dbeaver.ui.controls.ListContentProvider
;
import
org.jkiss.dbeaver.ui.dialogs.HelpEnabledDialog
;
import
org.jkiss.dbeaver.ui.dialogs.StandardErrorDialog
;
import
org.jkiss.dbeaver.runtime.properties.PropertySourceCustom
;
import
org.jkiss.dbeaver.ui.properties.PropertyTreeViewer
;
import
org.jkiss.dbeaver.utils.GeneralUtils
;
import
org.jkiss.utils.ArrayUtils
;
...
...
@@ -220,9 +220,7 @@ public class DriverEditDialog extends HelpEnabledDialog
gl
.
horizontalSpacing
=
5
;
UIUtils
.
createControlLabel
(
ph
,
CoreMessages
.
dialog_edit_driver_label_website
);
Link
urlLabel
=
new
Link
(
ph
,
SWT
.
NONE
);
urlLabel
.
setText
(
"<a>"
+
driver
.
getWebURL
()
+
"</a>"
);
//$NON-NLS-1$ //$NON-NLS-2$
urlLabel
.
addSelectionListener
(
new
SelectionAdapter
()
{
Link
urlLabel
=
UIUtils
.
createLink
(
ph
,
"<a>"
+
driver
.
getWebURL
()
+
"</a>"
,
new
SelectionAdapter
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
...
...
@@ -711,7 +709,7 @@ public class DriverEditDialog extends HelpEnabledDialog
provider
.
getRegistry
().
saveDrivers
();
try
{
driver
.
loadDriver
(
DBeaverUI
.
getDefaultRunnableContext
(),
true
);
driver
.
loadDriver
(
DBeaverUI
.
getDefaultRunnableContext
(),
true
,
true
);
}
catch
(
Throwable
ex
)
{
UIUtils
.
showErrorDialog
(
getShell
(),
CoreMessages
.
dialog_edit_driver_dialog_driver_error_title
,
CoreMessages
.
dialog_edit_driver_dialog_driver_error_message
,
ex
);
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/preferences/TargetPrefPage.java
浏览文件 @
e041f4fe
...
...
@@ -34,9 +34,9 @@ import org.eclipse.ui.IWorkbench;
import
org.eclipse.ui.IWorkbenchPreferencePage
;
import
org.eclipse.ui.IWorkbenchPropertyPage
;
import
org.eclipse.ui.dialogs.PreferencesUtil
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.core.CoreMessages
;
import
org.jkiss.dbeaver.core.DBeaverCore
;
import
org.jkiss.dbeaver.Log
;
import
org.jkiss.dbeaver.model.DBPContextProvider
;
import
org.jkiss.dbeaver.model.DBPPreferenceStore
;
import
org.jkiss.dbeaver.model.exec.DBCExecutionContext
;
...
...
@@ -198,11 +198,7 @@ public abstract class TargetPrefPage extends PreferencePage implements IWorkbenc
private
Link
createLink
(
Composite
composite
,
String
text
)
{
Link
link
=
new
Link
(
composite
,
SWT
.
NONE
);
link
.
setFont
(
composite
.
getFont
());
link
.
setText
(
"<A>"
+
text
+
"</A>"
);
//$NON-NLS-1$//$NON-NLS-2$
link
.
addSelectionListener
(
new
SelectionListener
()
{
Link
link
=
UIUtils
.
createLink
(
composite
,
"<A>"
+
text
+
"</A>"
,
new
SelectionListener
()
{
@Override
public
void
widgetSelected
(
SelectionEvent
e
)
{
...
...
@@ -215,6 +211,7 @@ public abstract class TargetPrefPage extends PreferencePage implements IWorkbenc
widgetSelected
(
e
);
}
});
link
.
setFont
(
composite
.
getFont
());
return
link
;
}
...
...
plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/DBPDriverFile.java
浏览文件 @
e041f4fe
...
...
@@ -57,7 +57,7 @@ public interface DBPDriverFile
boolean
isDisabled
();
boolean
is
Local
();
boolean
is
Downloadable
();
@Nullable
File
getLocalFile
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录