1 package net.sourceforge.phpdt.sql.actions;
3 import org.eclipse.jface.action.Action;
4 import org.eclipse.jface.action.IAction;
5 import org.eclipse.jface.dialogs.InputDialog;
6 import org.eclipse.jface.viewers.ISelection;
7 import org.eclipse.ui.IViewActionDelegate;
8 import org.eclipse.ui.IViewPart;
10 import net.sourceforge.phpdt.sql.bookmarks.Bookmark;
11 import net.sourceforge.phpdt.sql.view.BookmarkView;
13 public class SetSchemaAction extends Action implements IViewActionDelegate {
15 public void init(IViewPart view) {
16 this.view = (BookmarkView) view;
19 public void run(IAction action) {
24 Bookmark bookmark = view.getCurrentBookmark();
25 InputDialog dialog = new InputDialog(view.getSite().getShell(),
26 "Set Schema", "Please enter the name of new schema:",
27 bookmark.getSchema(), null);
29 String value = dialog.getValue();
31 bookmark.setSchema(value);
35 public void selectionChanged(IAction action, ISelection selection) {