提交 baa5e0d4 编写于 作者: J jurgen

Code cleanup

Former-commit-id: 290b82c8
上级 6ef4e7c4
......@@ -19,7 +19,6 @@ package org.jkiss.dbeaver.model.impl.net;
import com.jcraft.jsch.*;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.SWT;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.DBeaverPreferences;
import org.jkiss.dbeaver.core.DBeaverCore;
......@@ -28,7 +27,6 @@ import org.jkiss.dbeaver.model.DBPConnectionInfo;
import org.jkiss.dbeaver.model.net.DBWHandlerConfiguration;
import org.jkiss.dbeaver.model.net.DBWTunnel;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.ui.UIUtils;
import org.jkiss.utils.CommonUtils;
import org.jkiss.utils.SecurityUtils;
......@@ -228,7 +226,7 @@ public class SSHTunnelImpl implements DBWTunnel {
@Override
public void showMessage(String message)
{
UIUtils.showMessageBox(null, "SSH Tunnel", message, SWT.ICON_INFORMATION);
log.info(message);
}
}
......
......@@ -108,6 +108,9 @@ public class BookmarksHandlerImpl extends AbstractResourceHandler {
throw new DBException("Can't find datasource '" + storage.getDataSourceId() + "'"); //$NON-NLS-2$
}
final DBNDataSource dsNode = (DBNDataSource)DBeaverCore.getInstance().getNavigatorModel().getNodeByObject(dataSourceContainer);
if (dsNode == null) {
throw new DBException("Can't find datasource node for '" + dataSourceContainer.getName() + "'"); //$NON-NLS-2$
}
dsNode.initializeNode(null, new DBRProcessListener() {
@Override
public void onProcessFinish(IStatus status)
......@@ -223,12 +226,15 @@ public class BookmarksHandlerImpl extends AbstractResourceHandler {
for (DBNNode parent = node; !(parent instanceof DBNDataSource); parent = parent.getParentNode()) {
nodePath.add(0, parent.getNodeName());
}
String dsId = null;
if (node.getObject() != null && node.getObject().getDataSource() != null) {
dsId = node.getObject().getDataSource().getContainer().getId();
}
BookmarkStorage storage = new BookmarkStorage(
title,
node.getNodeType() + " " + node.getNodeName(), //$NON-NLS-1$
node.getNodeIconDefault(),
node.getObject().getDataSource().getContainer().getId(),
dsId,
nodePath);
try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册