import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart;
+import net.sourceforge.phpdt.sql.Messages;
import net.sourceforge.phpdt.sql.sql.MultiSQLServer;
import net.sourceforge.phpdt.sql.view.BookmarkView;
import net.sourceforge.phpdt.sql.view.TableView;
+import net.sourceforge.phpdt.sql.view.bookmark.BookmarkNode;
import net.sourceforge.phpdt.sql.view.bookmark.TableNode;
import net.sourceforge.phpdt.sql.view.bookmark.TreeNode;
import net.sourceforge.phpdt.sql.view.bookmark.ViewNode;
public void run() {
TreeNode node = (TreeNode) view.getCurrent();
StringBuffer query = new StringBuffer();
- query.append("METADATA:");
+ query.append(Messages.getString("MetaDataKey")+Messages.getString("MetaDataKeySeparator")); //$NON-NLS-1$ //$NON-NLS-2$
if (node instanceof TableNode) {
query.append(((TableNode) node).getName());
} else if (node instanceof ViewNode) {
query.append(((ViewNode) node).getName());
}
MultiSQLServer server = MultiSQLServer.getInstance();
- TableView.getInstance().loadQuery(server.execute(query.toString()));
+ BookmarkNode current = view.getCurrentBookmark();
+
+ TableView.getInstance().loadQuery(current, server.execute(current.getConnection(), query.toString()));
}
public void selectionChanged(IAction action, ISelection selection) {
}