提交 3e0836b5 编写于 作者: S Serge Rider

Lazy editor initialization fix


Former-commit-id: ae7606ba
上级 8af9d159
...@@ -142,6 +142,7 @@ public class NavigatorHandlerObjectOpen extends NavigatorHandlerObjectBase imple ...@@ -142,6 +142,7 @@ public class NavigatorHandlerObjectOpen extends NavigatorHandlerObjectBase imple
return null; return null;
} }
if (!selectedNode.isPersisted()) { if (!selectedNode.isPersisted()) {
log.debug("Node '" + selectedNode.getNodeName() + "' s not persisted. Open not possible.");
return null; return null;
} }
try { try {
......
...@@ -427,6 +427,7 @@ public abstract class NodeListControl extends ObjectListControl<DBNNode> impleme ...@@ -427,6 +427,7 @@ public abstract class NodeListControl extends ObjectListControl<DBNNode> impleme
} else { } else {
original.setSelection(selection); original.setSelection(selection);
} }
selectionChanged(new SelectionChangedEvent(this, selection));
} }
@Override @Override
......
...@@ -45,7 +45,13 @@ public abstract class MultiPageAbstractEditor extends MultiPageEditorPart ...@@ -45,7 +45,13 @@ public abstract class MultiPageAbstractEditor extends MultiPageEditorPart
public void init(IEditorSite site, IEditorInput input) public void init(IEditorSite site, IEditorInput input)
throws PartInitException throws PartInitException
{ {
super.init(site, input); if (getEditorInput() == null) {
super.init(site, input);
} else {
// Pages re-initialization. Do not call init bcause it recreates selection provider
setSite(site);
setInput(input);
}
setPartName(input.getName()); setPartName(input.getName());
setTitleImage(input.getImageDescriptor()); setTitleImage(input.getImageDescriptor());
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册