Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
ae85993a
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,发现更多精彩内容 >>
提交
ae85993a
编写于
6月 21, 2015
作者:
J
jurgen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Editor model refactoring
上级
290b82c8
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
50 addition
and
52 deletion
+50
-52
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/navigator/DBNDataSource.java
.../src/org/jkiss/dbeaver/model/navigator/DBNDataSource.java
+2
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/navigator/NavigatorHandlerLinkEditor.java
...aver/ui/actions/navigator/NavigatorHandlerLinkEditor.java
+4
-6
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/navigator/NavigatorHandlerObjectOpen.java
...aver/ui/actions/navigator/NavigatorHandlerObjectOpen.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/DatabaseEditorAdapterFactory.java
...kiss/dbeaver/ui/editors/DatabaseEditorAdapterFactory.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/DatabaseEditorInput.java
...src/org/jkiss/dbeaver/ui/editors/DatabaseEditorInput.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/DatabaseEditorInputFactory.java
.../jkiss/dbeaver/ui/editors/DatabaseEditorInputFactory.java
+2
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/DatabaseEditorListener.java
.../org/jkiss/dbeaver/ui/editors/DatabaseEditorListener.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/IDatabaseEditorInput.java
...rc/org/jkiss/dbeaver/ui/editors/IDatabaseEditorInput.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/entity/EntityEditor.java
...src/org/jkiss/dbeaver/ui/editors/entity/EntityEditor.java
+27
-26
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/entity/EntityEditorInput.java
...rg/jkiss/dbeaver/ui/editors/entity/EntityEditorInput.java
+1
-1
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/entity/FolderEditor.java
...src/org/jkiss/dbeaver/ui/editors/entity/FolderEditor.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/entity/properties/ObjectPropertiesEditor.java
.../ui/editors/entity/properties/ObjectPropertiesEditor.java
+2
-2
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/object/ObjectEditorInput.java
...rg/jkiss/dbeaver/ui/editors/object/ObjectEditorInput.java
+2
-3
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/preferences/TargetPrefPage.java
.../src/org/jkiss/dbeaver/ui/preferences/TargetPrefPage.java
+1
-1
未找到文件。
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/model/navigator/DBNDataSource.java
浏览文件 @
ae85993a
...
...
@@ -21,6 +21,7 @@ import org.eclipse.core.runtime.IAdaptable;
import
org.eclipse.core.runtime.Status
;
import
org.eclipse.swt.graphics.Image
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.code.Nullable
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.model.DBPEvent
;
import
org.jkiss.dbeaver.model.runtime.DBRProcessListener
;
...
...
@@ -121,7 +122,7 @@ public class DBNDataSource extends DBNDatabaseNode implements IAdaptable
}
@Override
public
boolean
initializeNode
(
DBRProgressMonitor
monitor
,
DBRProcessListener
onFinish
)
public
boolean
initializeNode
(
@Nullable
DBRProgressMonitor
monitor
,
DBRProcessListener
onFinish
)
{
if
(
dataSource
==
null
)
{
return
false
;
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/navigator/NavigatorHandlerLinkEditor.java
浏览文件 @
ae85993a
...
...
@@ -40,12 +40,10 @@ public class NavigatorHandlerLinkEditor extends AbstractHandler {
if
(
activePart
instanceof
NavigatorViewBase
)
{
if
(
activeEditor
.
getEditorInput
()
instanceof
IDatabaseEditorInput
)
{
IDatabaseEditorInput
editorInput
=
(
IDatabaseEditorInput
)
activeEditor
.
getEditorInput
();
if
(
editorInput
!=
null
)
{
DBNNode
dbnNode
=
editorInput
.
getTreeNode
();
if
(
dbnNode
!=
null
)
{
NavigatorViewBase
view
=
(
NavigatorViewBase
)
activePart
;
view
.
showNode
(
dbnNode
);
}
DBNNode
dbnNode
=
editorInput
.
getNavigatorNode
();
if
(
dbnNode
!=
null
)
{
NavigatorViewBase
view
=
(
NavigatorViewBase
)
activePart
;
view
.
showNode
(
dbnNode
);
}
}
else
if
(
activeEditor
.
getEditorInput
()
instanceof
ProjectFileEditorInput
)
{
IFile
editorFile
=
((
ProjectFileEditorInput
)
activeEditor
.
getEditorInput
()).
getFile
();
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/navigator/NavigatorHandlerObjectOpen.java
浏览文件 @
ae85993a
...
...
@@ -147,7 +147,7 @@ public class NavigatorHandlerObjectOpen extends NavigatorHandlerObjectBase imple
}
catch
(
PartInitException
e
)
{
continue
;
}
if
(
editorInput
instanceof
EntityEditorInput
&&
((
EntityEditorInput
)
editorInput
).
get
Tree
Node
()
==
selectedNode
)
{
if
(
editorInput
instanceof
EntityEditorInput
&&
((
EntityEditorInput
)
editorInput
).
get
Navigator
Node
()
==
selectedNode
)
{
final
IEditorPart
editor
=
ref
.
getEditor
(
true
);
if
(
editor
instanceof
IFolderContainer
)
{
// Activate default folder
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/DatabaseEditorAdapterFactory.java
浏览文件 @
ae85993a
...
...
@@ -53,7 +53,7 @@ public class DatabaseEditorAdapterFactory implements IAdapterFactory
if
(
adaptableObject
instanceof
IEditorPart
)
{
IEditorInput
editorInput
=
((
IEditorPart
)
adaptableObject
).
getEditorInput
();
if
(
editorInput
instanceof
IDatabaseEditorInput
)
{
DBNNode
node
=
((
IDatabaseEditorInput
)
editorInput
).
get
Tree
Node
();
DBNNode
node
=
((
IDatabaseEditorInput
)
editorInput
).
get
Navigator
Node
();
if
(
node
!=
null
)
{
DBSObject
object
=
((
DBSWrapper
)
node
).
getObject
();
if
(
object
!=
null
&&
adapterType
.
isAssignableFrom
(
object
.
getClass
()))
{
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/DatabaseEditorInput.java
浏览文件 @
ae85993a
...
...
@@ -134,7 +134,7 @@ public abstract class DatabaseEditorInput<NODE extends DBNDatabaseNode> implemen
}
@Override
public
NODE
get
Tree
Node
()
public
NODE
get
Navigator
Node
()
{
return
node
;
}
...
...
@@ -198,7 +198,7 @@ public abstract class DatabaseEditorInput<NODE extends DBNDatabaseNode> implemen
if
(
propertySource
==
null
)
{
propertySource
=
new
PropertySourceEditable
(
getCommandContext
(),
get
Tree
Node
(),
get
Navigator
Node
(),
getDatabaseObject
());
propertySource
.
collectProperties
();
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/DatabaseEditorInputFactory.java
浏览文件 @
ae85993a
...
...
@@ -28,7 +28,6 @@ import org.eclipse.ui.IMemento;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.core.DBeaverCore
;
import
org.jkiss.dbeaver.core.DBeaverUI
;
import
org.jkiss.dbeaver.model.DBPDataSource
;
import
org.jkiss.dbeaver.model.exec.DBCExecutionContext
;
import
org.jkiss.dbeaver.model.navigator.DBNDataSource
;
import
org.jkiss.dbeaver.model.navigator.DBNDatabaseNode
;
...
...
@@ -68,7 +67,7 @@ public class DatabaseEditorInputFactory implements IElementFactory
}
@Override
public
IAdaptable
createElement
(
IMemento
memento
)
public
IAdaptable
createElement
(
IMemento
memento
)
{
// Get the node path.
final
String
inputClass
=
memento
.
getString
(
TAG_CLASS
);
...
...
@@ -174,7 +173,7 @@ public class DatabaseEditorInputFactory implements IElementFactory
// Detached - nothing to save
return
;
}
DBNDatabaseNode
node
=
input
.
get
Tree
Node
();
DBNDatabaseNode
node
=
input
.
get
Navigator
Node
();
memento
.
putString
(
TAG_CLASS
,
input
.
getClass
().
getName
());
memento
.
putString
(
TAG_DATA_SOURCE
,
context
.
getDataSource
().
getContainer
().
getId
());
memento
.
putString
(
TAG_NODE
,
node
.
getNodeItemPath
());
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/DatabaseEditorListener.java
浏览文件 @
ae85993a
...
...
@@ -38,7 +38,7 @@ public class DatabaseEditorListener implements IDBNListener
DatabaseEditorListener
(
IDatabaseEditor
databaseEditor
)
{
this
.
databaseEditor
=
databaseEditor
;
// Acquire datasource
dataSourceContainer
=
databaseEditor
.
getEditorInput
().
get
Tree
Node
().
getDataSourceContainer
();
dataSourceContainer
=
databaseEditor
.
getEditorInput
().
get
Navigator
Node
().
getDataSourceContainer
();
if
(
dataSourceContainer
!=
null
)
{
dataSourceContainer
.
acquire
(
databaseEditor
);
}
...
...
@@ -60,7 +60,7 @@ public class DatabaseEditorListener implements IDBNListener
public
DBNNode
getTreeNode
()
{
return
databaseEditor
.
getEditorInput
().
get
Tree
Node
();
return
databaseEditor
.
getEditorInput
().
get
Navigator
Node
();
}
@Override
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/IDatabaseEditorInput.java
浏览文件 @
ae85993a
...
...
@@ -33,7 +33,7 @@ import java.util.Collection;
*/
public
interface
IDatabaseEditorInput
extends
IEditorInput
,
DBPContextProvider
{
DBNDatabaseNode
get
Tree
Node
();
DBNDatabaseNode
get
Navigator
Node
();
DBSObject
getDatabaseObject
();
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/entity/EntityEditor.java
浏览文件 @
ae85993a
...
...
@@ -152,19 +152,16 @@ public class EntityEditor extends MultiPageDatabaseEditor
GlobalContributorManager
.
getInstance
().
removeContributor
(
entry
.
getValue
(),
entry
.
getKey
());
}
actionContributors
.
clear
();
//final DBPDataSource dataSource = getDataSource();
// if (getCommandContext() != null && getCommandContext().isDirty()) {
// getCommandContext().resetChanges();
// }
if
(
commandListener
!=
null
&&
getCommandContext
()
!=
null
)
{
getCommandContext
().
removeCommandListener
(
commandListener
);
DBECommandContext
commandContext
=
getCommandContext
();
if
(
commandListener
!=
null
&&
commandContext
!=
null
)
{
commandContext
.
removeCommandListener
(
commandListener
);
commandListener
=
null
;
}
super
.
dispose
();
if
(
getDatabaseObject
()
!=
null
)
{
getCommandContext
()
.
resetChanges
();
if
(
getDatabaseObject
()
!=
null
&&
commandContext
!=
null
)
{
commandContext
.
resetChanges
();
// // Remove all non-persisted objects
// for (DBPObject object : getCommandContext().getEditedObjects()) {
// if (object instanceof DBPPersistedObject && !((DBPPersistedObject)object).isPersisted()) {
...
...
@@ -240,8 +237,9 @@ public class EntityEditor extends MultiPageDatabaseEditor
if
(
previewResult
==
IDialogConstants
.
PROCEED_ID
)
{
Throwable
error
=
null
;
final
DBECommandContext
commandContext
=
getCommandContext
();
try
{
getCommandContext
()
.
saveChanges
(
monitorWrapper
);
commandContext
.
saveChanges
(
monitorWrapper
);
}
catch
(
DBException
e
)
{
error
=
e
;
}
...
...
@@ -258,14 +256,14 @@ public class EntityEditor extends MultiPageDatabaseEditor
// Refresh underlying node
// It'll refresh database object and all it's descendants
// So we'll get actual data from database
final
DBNDatabaseNode
treeNode
=
getEditorInput
().
get
Tree
Node
();
final
DBNDatabaseNode
treeNode
=
getEditorInput
().
get
Navigator
Node
();
try
{
DBeaverUI
.
runInProgressService
(
new
DBRRunnableWithProgress
()
{
@Override
public
void
run
(
DBRProgressMonitor
monitor
)
throws
InvocationTargetException
,
InterruptedException
{
try
{
treeNode
.
refreshNode
(
monitor
,
getCommandContext
()
);
treeNode
.
refreshNode
(
monitor
,
commandContext
);
}
catch
(
DBException
e
)
{
throw
new
InvocationTargetException
(
e
);
}
...
...
@@ -301,8 +299,9 @@ public class EntityEditor extends MultiPageDatabaseEditor
public
void
undoChanges
()
{
if
(
getCommandContext
()
!=
null
&&
getCommandContext
().
getUndoCommand
()
!=
null
)
{
if
(!
getDatabaseObject
().
isPersisted
()
&&
getCommandContext
().
getUndoCommands
().
size
()
==
1
)
{
DBECommandContext
commandContext
=
getCommandContext
();
if
(
commandContext
!=
null
&&
commandContext
.
getUndoCommand
()
!=
null
)
{
if
(!
getDatabaseObject
().
isPersisted
()
&&
commandContext
.
getUndoCommands
().
size
()
==
1
)
{
//getSite().getPage().closeEditor(this, true);
//return;
// Undo of last command in command context will close editor
...
...
@@ -316,25 +315,27 @@ public class EntityEditor extends MultiPageDatabaseEditor
return
;
}
}
getCommandContext
()
.
undoCommand
();
commandContext
.
undoCommand
();
firePropertyChange
(
IEditorPart
.
PROP_DIRTY
);
}
}
public
void
redoChanges
()
{
if
(
getCommandContext
()
!=
null
&&
getCommandContext
().
getRedoCommand
()
!=
null
)
{
getCommandContext
().
redoCommand
();
DBECommandContext
commandContext
=
getCommandContext
();
if
(
commandContext
!=
null
&&
commandContext
.
getRedoCommand
()
!=
null
)
{
commandContext
.
redoCommand
();
firePropertyChange
(
IEditorPart
.
PROP_DIRTY
);
}
}
public
int
showChanges
(
boolean
allowSave
)
{
if
(
getCommandContext
()
==
null
)
{
DBECommandContext
commandContext
=
getCommandContext
();
if
(
commandContext
==
null
)
{
return
IDialogConstants
.
CANCEL_ID
;
}
Collection
<?
extends
DBECommand
>
commands
=
getCommandContext
()
.
getFinalCommands
();
Collection
<?
extends
DBECommand
>
commands
=
commandContext
.
getFinalCommands
();
StringBuilder
script
=
new
StringBuilder
();
for
(
DBECommand
command
:
commands
)
{
try
{
...
...
@@ -421,7 +422,7 @@ public class EntityEditor extends MultiPageDatabaseEditor
hasPropertiesEditor
=
addEditorTab
(
defaultEditor
);
}
if
(
hasPropertiesEditor
)
{
DBNNode
node
=
getEditorInput
().
get
Tree
Node
();
DBNNode
node
=
getEditorInput
().
get
Navigator
Node
();
int
propEditorIndex
=
getPageCount
()
-
1
;
setPageText
(
propEditorIndex
,
CoreMessages
.
editors_entity_properties_text
);
setPageToolTip
(
propEditorIndex
,
node
.
getNodeType
()
+
CoreMessages
.
editors_entity_properties_tooltip_suffix
);
...
...
@@ -430,7 +431,7 @@ public class EntityEditor extends MultiPageDatabaseEditor
/*
if (!mainAdded) {
try {
DBNNode node = getEditorInput().get
Tree
Node();
DBNNode node = getEditorInput().get
Navigator
Node();
int index = addPage(new ObjectPropertiesEditor(node), getEditorInput());
setPageText(index, "Properties");
if (node instanceof DBNDatabaseNode) {
...
...
@@ -490,7 +491,7 @@ public class EntityEditor extends MultiPageDatabaseEditor
tabs.addAll(collectTabs(monitor));
}
};
DBNDatabaseNode node = getEditorInput().get
Tree
Node();
DBNDatabaseNode node = getEditorInput().get
Navigator
Node();
try {
if (node.needsInitialization()) {
DBeaverUI.runInProgressService(tabsCollector);
...
...
@@ -577,7 +578,7 @@ public class EntityEditor extends MultiPageDatabaseEditor
getSite
().
getShell
(),
DBeaverPreferences
.
CONFIRM_ENTITY_EDIT_CLOSE
,
ConfirmationDialog
.
QUESTION_WITH_CANCEL
,
getEditorInput
().
get
Tree
Node
().
getNodeName
());
getEditorInput
().
get
Navigator
Node
().
getNodeName
());
if
(
result
==
IDialogConstants
.
YES_ID
)
{
// getWorkbenchPart().getSite().getPage().saveEditor(this, false);
return
ISaveablePart2
.
YES
;
...
...
@@ -648,7 +649,7 @@ public class EntityEditor extends MultiPageDatabaseEditor
List<TabInfo> tabs = new ArrayList<TabInfo>();
// Add all nested folders as tabs
DBNDatabaseNode node = getEditorInput().get
Tree
Node();
DBNDatabaseNode node = getEditorInput().get
Navigator
Node();
if (node instanceof DBNDataSource &&
(node.getDataSourceContainer() == null || !node.getDataSourceContainer().isConnected()))
{
...
...
@@ -776,7 +777,7 @@ public class EntityEditor extends MultiPageDatabaseEditor
if
(
hasPropertiesEditor
)
{
// Update main editor image
setPageImage
(
0
,
getEditorInput
().
get
Tree
Node
().
getNodeIconDefault
());
setPageImage
(
0
,
getEditorInput
().
get
Navigator
Node
().
getNodeIconDefault
());
}
}
...
...
@@ -807,7 +808,7 @@ public class EntityEditor extends MultiPageDatabaseEditor
infoGroup
.
setLayoutData
(
new
GridData
(
GridData
.
FILL_HORIZONTAL
));
infoGroup
.
setLayout
(
new
RowLayout
());
DBNDatabaseNode
node
=
getEditorInput
().
get
Tree
Node
();
DBNDatabaseNode
node
=
getEditorInput
().
get
Navigator
Node
();
List
<
DBNDatabaseNode
>
nodeList
=
new
ArrayList
<
DBNDatabaseNode
>();
for
(
DBNNode
n
=
node
;
n
!=
null
;
n
=
n
.
getParentNode
())
{
...
...
@@ -851,7 +852,7 @@ public class EntityEditor extends MultiPageDatabaseEditor
@Override
public
DBNNode
getRootNode
()
{
return
getEditorInput
().
get
Tree
Node
();
return
getEditorInput
().
get
Navigator
Node
();
}
@Nullable
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/entity/EntityEditorInput.java
浏览文件 @
ae85993a
...
...
@@ -44,7 +44,7 @@ public class EntityEditorInput extends DatabaseEditorInput<DBNDatabaseNode>
{
StringBuilder
toolTip
=
new
StringBuilder
();
for
(
DBNNode
node
=
get
Tree
Node
();
node
!=
null
;
node
=
node
.
getParentNode
())
{
for
(
DBNNode
node
=
get
Navigator
Node
();
node
!=
null
;
node
=
node
.
getParentNode
())
{
if
(
node
instanceof
DBSFolder
)
{
continue
;
}
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/entity/FolderEditor.java
浏览文件 @
ae85993a
...
...
@@ -40,7 +40,7 @@ public class FolderEditor extends SinglePageDatabaseEditor<FolderEditorInput> im
@Override
public
void
createPartControl
(
Composite
parent
)
{
itemControl
=
new
ItemListControl
(
parent
,
SWT
.
NONE
,
this
.
getSite
(),
getEditorInput
().
get
Tree
Node
(),
null
);
itemControl
=
new
ItemListControl
(
parent
,
SWT
.
NONE
,
this
.
getSite
(),
getEditorInput
().
get
Navigator
Node
(),
null
);
itemControl
.
createProgressPanel
();
itemControl
.
loadData
();
getSite
().
setSelectionProvider
(
itemControl
.
getSelectionProvider
());
...
...
@@ -48,7 +48,7 @@ public class FolderEditor extends SinglePageDatabaseEditor<FolderEditorInput> im
@Override
public
DBNNode
getRootNode
()
{
return
getEditorInput
().
get
Tree
Node
();
return
getEditorInput
().
get
Navigator
Node
();
}
@Nullable
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/entity/properties/ObjectPropertiesEditor.java
浏览文件 @
ae85993a
...
...
@@ -88,7 +88,7 @@ public class ObjectPropertiesEditor extends AbstractDatabaseObjectEditor<DBSObje
pageControl
=
new
ObjectEditorPageControl
(
parent
,
SWT
.
SHEET
,
this
);
pageControl
.
setShowDivider
(
true
);
DBNNode
node
=
getEditorInput
().
get
Tree
Node
();
DBNNode
node
=
getEditorInput
().
get
Navigator
Node
();
Composite
container
=
new
Composite
(
pageControl
,
SWT
.
NONE
);
GridLayout
gl
=
new
GridLayout
(
1
,
false
);
...
...
@@ -379,7 +379,7 @@ public class ObjectPropertiesEditor extends AbstractDatabaseObjectEditor<DBSObje
private
void
makeDatabaseEditorTabs
(
final
IDatabaseEditor
part
,
final
List
<
FolderInfo
>
tabList
)
{
final
DBNDatabaseNode
node
=
part
.
getEditorInput
().
get
Tree
Node
();
final
DBNDatabaseNode
node
=
part
.
getEditorInput
().
get
Navigator
Node
();
final
DBSObject
object
=
node
.
getObject
();
// Collect tabs from navigator tree model
...
...
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/editors/object/ObjectEditorInput.java
浏览文件 @
ae85993a
...
...
@@ -18,7 +18,6 @@
package
org.jkiss.dbeaver.ui.editors.object
;
import
org.eclipse.jface.resource.ImageDescriptor
;
import
org.eclipse.ui.IEditorDescriptor
;
import
org.jkiss.dbeaver.model.navigator.DBNDatabaseObject
;
import
org.jkiss.dbeaver.ui.editors.DatabaseEditorInput
;
...
...
@@ -35,7 +34,7 @@ public class ObjectEditorInput extends DatabaseEditorInput<DBNDatabaseObject>
@Override
public
ImageDescriptor
getImageDescriptor
()
{
DBNDatabaseObject
node
=
get
Tree
Node
();
DBNDatabaseObject
node
=
get
Navigator
Node
();
// IEditorDescriptor editorDescriptor = node.getEditorDescriptor();
// if (editorDescriptor != null) {
// return editorDescriptor.getImageDescriptor();
...
...
@@ -47,7 +46,7 @@ public class ObjectEditorInput extends DatabaseEditorInput<DBNDatabaseObject>
@Override
public
String
getToolTipText
()
{
return
get
Tree
Node
().
getMeta
().
getDescription
();
return
get
Navigator
Node
().
getMeta
().
getDescription
();
}
}
\ No newline at end of file
plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/preferences/TargetPrefPage.java
浏览文件 @
ae85993a
...
...
@@ -113,7 +113,7 @@ public abstract class TargetPrefPage extends PreferencePage implements IWorkbenc
if
(
containerNode
==
null
)
{
IDatabaseEditorInput
dbInput
=
(
IDatabaseEditorInput
)
element
.
getAdapter
(
IDatabaseEditorInput
.
class
);
if
(
dbInput
!=
null
)
{
DBNNode
dbNode
=
dbInput
.
get
Tree
Node
();
DBNNode
dbNode
=
dbInput
.
get
Navigator
Node
();
if
(
dbNode
instanceof
DBNDataSource
)
{
containerNode
=
(
DBNDataSource
)
dbNode
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录