Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
e3c5b157
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,发现更多精彩内容 >>
提交
e3c5b157
编写于
6月 05, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Code cleanup
上级
3f9912b7
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
47 addition
and
139 deletion
+47
-139
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/project/DBPProject.java
....core/src/org/jkiss/dbeaver/model/project/DBPProject.java
+0
-29
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/runtime/RuntimeUtils.java
...aver.core/src/org/jkiss/dbeaver/runtime/RuntimeUtils.java
+1
-46
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/runtime/jobs/EventProcessorJob.java
...src/org/jkiss/dbeaver/runtime/jobs/EventProcessorJob.java
+46
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/tools/transfer/stream/IStreamDataExporterDescriptor.java
.../tools/transfer/stream/IStreamDataExporterDescriptor.java
+0
-39
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/tools/transfer/stream/StreamConsumerSettings.java
...dbeaver/tools/transfer/stream/StreamConsumerSettings.java
+0
-23
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/project/DBPProject.java
已删除
100644 → 0
浏览文件 @
3f9912b7
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2015 Serge Rieder (serge@jkiss.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License (version 2)
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package
org.jkiss.dbeaver.model.project
;
import
org.jkiss.dbeaver.model.DBPNamedObject
;
/**
* Project
*/
public
interface
DBPProject
extends
DBPNamedObject
{
}
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/runtime/RuntimeUtils.java
浏览文件 @
e3c5b157
...
...
@@ -31,20 +31,12 @@ import org.eclipse.jface.preference.IPreferenceStore;
import
org.eclipse.swt.graphics.Image
;
import
org.eclipse.swt.graphics.ImageData
;
import
org.eclipse.swt.program.Program
;
import
org.eclipse.swt.widgets.Shell
;
import
org.eclipse.ui.IWorkbenchPage
;
import
org.eclipse.ui.PartInitException
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.core.CoreMessages
;
import
org.jkiss.dbeaver.core.DBeaverCore
;
import
org.jkiss.dbeaver.core.DBeaverUI
;
import
org.jkiss.dbeaver.core.Log
;
import
org.jkiss.dbeaver.model.runtime.DBRProcessDescriptor
;
import
org.jkiss.dbeaver.model.runtime.DBRProgressMonitor
;
import
org.jkiss.dbeaver.model.runtime.DBRRunnableWithProgress
;
import
org.jkiss.dbeaver.model.runtime.DBRShellCommand
;
import
org.jkiss.dbeaver.ui.UIUtils
;
import
org.jkiss.dbeaver.ui.views.process.ShellProcessView
;
import
org.jkiss.utils.ArrayUtils
;
import
org.jkiss.utils.CommonUtils
;
...
...
@@ -401,43 +393,6 @@ public class RuntimeUtils {
return
false
;
}
public
static
DBRProcessDescriptor
processCommand
(
final
DBRShellCommand
command
,
final
Map
<
String
,
Object
>
variables
)
{
final
Shell
shell
=
DBeaverUI
.
getActiveWorkbenchShell
();
final
DBRProcessDescriptor
processDescriptor
=
new
DBRProcessDescriptor
(
command
,
variables
);
// Direct execute
try
{
processDescriptor
.
execute
();
}
catch
(
DBException
e
)
{
UIUtils
.
showErrorDialog
(
shell
,
"Execute process"
,
processDescriptor
.
getName
(),
e
);
}
if
(
command
.
isShowProcessPanel
())
{
shell
.
getDisplay
().
asyncExec
(
new
Runnable
()
{
@Override
public
void
run
()
{
try
{
final
ShellProcessView
processView
=
(
ShellProcessView
)
DBeaverUI
.
getActiveWorkbenchWindow
().
getActivePage
().
showView
(
ShellProcessView
.
VIEW_ID
,
ShellProcessView
.
getNextId
(),
IWorkbenchPage
.
VIEW_VISIBLE
);
processView
.
initProcess
(
processDescriptor
);
}
catch
(
PartInitException
e
)
{
log
.
error
(
e
);
}
}
});
}
if
(
command
.
isWaitProcessFinish
())
{
processDescriptor
.
waitFor
();
}
return
processDescriptor
;
}
public
static
String
getNativeBinaryName
(
String
binName
)
{
return
DBeaverCore
.
getInstance
().
getLocalSystem
().
isWindows
()
?
binName
+
".exe"
:
binName
;
...
...
@@ -528,7 +483,7 @@ public class RuntimeUtils {
if
(
program
!=
null
)
{
final
ImageData
imageData
=
program
.
getImageData
();
if
(
imageData
!=
null
)
{
programInfo
.
image
=
new
Image
(
DBeaverUI
.
getDisplay
()
,
imageData
);
programInfo
.
image
=
new
Image
(
null
,
imageData
);
}
}
programMap
.
put
(
fileExtension
,
programInfo
);
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/runtime/jobs/EventProcessorJob.java
浏览文件 @
e3c5b157
...
...
@@ -18,13 +18,20 @@
package
org.jkiss.dbeaver.runtime.jobs
;
import
org.eclipse.swt.widgets.Shell
;
import
org.eclipse.ui.IWorkbenchPage
;
import
org.eclipse.ui.PartInitException
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.core.DBeaverUI
;
import
org.jkiss.dbeaver.core.Log
;
import
org.jkiss.dbeaver.model.DBPConnectionEventType
;
import
org.jkiss.dbeaver.model.DBPConnectionInfo
;
import
org.jkiss.dbeaver.model.runtime.DBRProcessDescriptor
;
import
org.jkiss.dbeaver.model.runtime.DBRShellCommand
;
import
org.jkiss.dbeaver.registry.DataSourceDescriptor
;
import
org.jkiss.dbeaver.runtime.AbstractJob
;
import
org.jkiss.dbeaver.runtime.RuntimeUtils
;
import
org.jkiss.dbeaver.ui.UIUtils
;
import
org.jkiss.dbeaver.ui.views.process.ShellProcessView
;
import
org.jkiss.utils.CommonUtils
;
import
java.util.HashMap
;
...
...
@@ -35,6 +42,8 @@ import java.util.Map;
*/
public
abstract
class
EventProcessorJob
extends
AbstractJob
{
static
final
Log
log
=
Log
.
getLog
(
EventProcessorJob
.
class
);
public
static
final
String
VARIABLE_HOST
=
"host"
;
public
static
final
String
VARIABLE_PORT
=
"port"
;
public
static
final
String
VARIABLE_SERVER
=
"server"
;
...
...
@@ -68,11 +77,46 @@ public abstract class EventProcessorJob extends AbstractJob {
variables
.
put
(
VARIABLE_PASSWORD
,
info
.
getUserPassword
());
variables
.
put
(
VARIABLE_URL
,
info
.
getUrl
());
DBRProcessDescriptor
process
=
RuntimeUtils
.
processCommand
(
command
,
variables
);
DBRProcessDescriptor
process
=
processCommand
(
command
,
variables
);
if
(
process
!=
null
)
{
container
.
addChildProcess
(
process
);
}
}
}
private
DBRProcessDescriptor
processCommand
(
DBRShellCommand
command
,
Map
<
String
,
Object
>
variables
)
{
final
Shell
shell
=
DBeaverUI
.
getActiveWorkbenchShell
();
final
DBRProcessDescriptor
processDescriptor
=
new
DBRProcessDescriptor
(
command
,
variables
);
// Direct execute
try
{
processDescriptor
.
execute
();
}
catch
(
DBException
e
)
{
UIUtils
.
showErrorDialog
(
shell
,
"Execute process"
,
processDescriptor
.
getName
(),
e
);
}
if
(
command
.
isShowProcessPanel
())
{
shell
.
getDisplay
().
asyncExec
(
new
Runnable
()
{
@Override
public
void
run
()
{
try
{
final
ShellProcessView
processView
=
(
ShellProcessView
)
DBeaverUI
.
getActiveWorkbenchWindow
().
getActivePage
().
showView
(
ShellProcessView
.
VIEW_ID
,
ShellProcessView
.
getNextId
(),
IWorkbenchPage
.
VIEW_VISIBLE
);
processView
.
initProcess
(
processDescriptor
);
}
catch
(
PartInitException
e
)
{
log
.
error
(
e
);
}
}
});
}
if
(
command
.
isWaitProcessFinish
())
{
processDescriptor
.
waitFor
();
}
return
processDescriptor
;
}
}
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/tools/transfer/stream/IStreamDataExporterDescriptor.java
已删除
100644 → 0
浏览文件 @
3f9912b7
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2015 Serge Rieder (serge@jkiss.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License (version 2)
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package
org.jkiss.dbeaver.tools.transfer.stream
;
import
org.eclipse.ui.views.properties.IPropertyDescriptor
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.model.data.DBDDisplayFormat
;
import
org.jkiss.dbeaver.tools.transfer.IDataTransferProcessor
;
import
java.util.List
;
/**
* Stream exporter descriptor
*/
public
interface
IStreamDataExporterDescriptor
extends
IDataTransferProcessor
{
DBDDisplayFormat
getExportFormat
();
String
getFileExtension
();
List
<
IPropertyDescriptor
>
getProperties
();
IStreamDataExporter
createExporter
()
throws
DBException
;
}
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/tools/transfer/stream/StreamConsumerSettings.java
浏览文件 @
e3c5b157
...
...
@@ -186,29 +186,6 @@ public class StreamConsumerSettings implements IDataTransferSettings {
if
(!
CommonUtils
.
isEmpty
(
dialogSettings
.
get
(
"formatterProfile"
)))
{
formatterProfile
=
DataFormatterRegistry
.
getInstance
().
getCustomProfile
(
dialogSettings
.
get
(
"formatterProfile"
));
}
/*
IDialogSettings[] expSections = dialogSettings.getSections();
if (expSections != null && expSections.length > 0) {
for (IDialogSettings expSection : expSections) {
expId = expSection.getName();
IStreamDataExporterDescriptor exporter = DBeaverCore.getInstance().getDataTransferRegistry().getDataExporter(expId);
if (exporter != null) {
Map<Object, Object> expProps = new HashMap<Object, Object>();
exporterPropsHistory.put(exporter, expProps);
for (IPropertyDescriptor prop : exporter.getProperties()) {
Object value = expSection.get(prop.getId().toString());
if (value != null) {
if ("extractImages".equals(prop.getId())) {
value = Boolean.parseBoolean((String) value);
}
expProps.put(prop.getId(), value);
}
}
}
}
}
setExporterDescriptor(dataExporter);
*/
}
@Override
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录