提交 3ae574e7 编写于 作者: S serge-rider

Refresh fix: do not refresh not-persisted objects


Former-commit-id: d02a6471
上级 6b9e4883
......@@ -302,14 +302,19 @@ public abstract class DBNDatabaseNode extends DBNNode implements DBSWrapper, DBP
}
DBSObject object = getObject();
if (object instanceof DBPRefreshableObject) {
DBSObject newObject = ((DBPRefreshableObject) object).refreshObject(monitor);
if (newObject == null) {
if (parentNode instanceof DBNDatabaseNode) {
((DBNDatabaseNode) parentNode).removeChildItem(object);
if (object.isPersisted()) {
DBSObject newObject = ((DBPRefreshableObject) object).refreshObject(monitor);
if (newObject == null) {
if (parentNode instanceof DBNDatabaseNode) {
((DBNDatabaseNode) parentNode).removeChildItem(object);
}
return null;
} else {
refreshNodeContent(monitor, newObject, source);
return this;
}
return null;
} else {
refreshNodeContent(monitor, newObject, source);
// Not persisted node - nothing to refresh
return this;
}
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册