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.Messages;
11 import net.sourceforge.phpdt.sql.bookmarks.Bookmark;
12 import net.sourceforge.phpdt.sql.view.BookmarkView;
14 public class SetSchemaAction extends Action implements IViewActionDelegate {
16 public void init(IViewPart view) {
17 this.view = (BookmarkView) view;
20 public void run(IAction action) {
25 Bookmark bookmark = view.getCurrentBookmark();
26 InputDialog dialog = new InputDialog(view.getSite().getShell(),
27 Messages.getString("SetSchemaAction.SetSchema"), Messages.getString("SetSchemaAction.PleaseEnterName"), //$NON-NLS-1$ //$NON-NLS-2$
28 bookmark.getSchema(), null);
30 String value = dialog.getValue();
32 bookmark.setSchema(value);
36 public void selectionChanged(IAction action, ISelection selection) {