package net.sourceforge.phpdt.sql.actions;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
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.TreeNode;
import net.sourceforge.phpdt.sql.view.bookmark.ViewNode;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+
public class ViewTableDetailsAction extends Action implements IViewActionDelegate {
BookmarkView view;
} else if (node instanceof ViewNode) {
query.append(((ViewNode) node).getName());
}
+ try {
+ IWorkbenchPage page =
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ page.showView(TableView.TABLEVIEW_ID);
+ } catch (PartInitException e) {
+ }
MultiSQLServer server = MultiSQLServer.getInstance();
TableView.getInstance().loadQuery(server.execute(query.toString()));
}