1 | public class RenameTableAction extends AbstractRefactoringAction↵ | | 1 | public class RenameViewAction extends AbstractRefactoringAction↵
|
2 | {↵ | | 2 | {↵
|
3 | private static final long serialVersionUID = 8970571253545997433L;↵ | | 3 | private static final long serialVersionUID = -2969231566456501942L;↵
|
|
4 | /**↵ | | 4 | /**↵
|
5 | * Internationalized strings for this class.↵ | | 5 | * Internationalized strings for this class.↵
|
6 | */↵ | | 6 | */↵
|
7 | private static final StringManager s_stringMgr =↵ | | 7 | private static final StringManager s_stringMgr =↵
|
8 | StringManagerFactory.getStringManager(RenameTableAction.class);↵ | | 8 | StringManagerFactory.getStringManager(RenameTableAction.class);↵
|
|
9 | private static interface i18n↵ | | 9 | private static interface i18n↵
|
10 | {↵ | | 10 | {↵
|
11 | String ACTION_PART = s_stringMgr.getString("RenameTableAction.actionPart");↵ | | 11 | String ACTION_PART = s_stringMgr.getString("RenameViewAction.actionPart");↵
|
|
12 | String OBJECT_PART = s_stringMgr.getString("Shared.tableObject");↵ | | 12 | String OBJECT_PART = s_stringMgr.getString("Shared.viewObject");↵
|
|
13 | String SINGLE_OBJECT_MESSAGE =↵ | | 13 | String SINGLE_OBJECT_MESSAGE =↵
|
14 | s_stringMgr.getString("Shared.singleObjectMessage", OBJECT_PART, ACTION_PART);↵ | | 14 | s_stringMgr.getString("Shared.singleObjectMessage", OBJECT_PART, ACTION_PART);↵
|
15 | }↵ | | 15 | }↵
|
|
16 | public RenameTableAction(IApplication app, Resources rsrc)↵ | | 16 | public RenameViewAction(IApplication app, Resources rsrc)↵
|
17 | {↵ | | 17 | {↵
|
18 | super(app, rsrc);↵ | | 18 | super(app, rsrc);↵
|
19 | }↵ | | 19 | }↵
|
|
| | | 20 | /**↵
|
| | | 21 | * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#getCommand(net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo[])↵
|
| | | 22 | */↵
|
20 | @Override↵ | | 23 | @Override↵
|
21 | protected ICommand getCommand(IDatabaseObjectInfo[] info)↵ | | 24 | protected ICommand getCommand(IDatabaseObjectInfo[] info)↵
|
22 | {↵ | | 25 | {↵
|
23 | return new RenameTableCommand(_session, info);↵ | | 26 | return new RenameViewCommand(_session, info);↵
|
24 | }↵ | | 27 | }↵
|
|
25 | @Override↵ | | 28 | ↵
|
26 | protected String getErrorMessage()↵ | | |
|
27 | {↵ | | |
|
28 | return i18n.SINGLE_OBJECT_MESSAGE;↵ | | |
|
29 | }↵ | | |
|
| | | 29 | /**↵
|
| | | 30 | * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#getErrorMessage()↵
|
| | | 31 | */↵
|
| | | 32 | @Override↵
|
| | | 33 | protected String getErrorMessage()↵
|
| | | 34 | {↵
|
| | | 35 | return i18n.SINGLE_OBJECT_MESSAGE;↵
|
| | | 36 | }↵
|
|
| | | 37 | /**↵
|
| | | 38 | * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#isMultipleObjectAction()↵
|
| | | 39 | */↵
|
30 | @Override↵ | | 40 | @Override↵
|
31 | protected boolean isMultipleObjectAction()↵ | | 41 | protected boolean isMultipleObjectAction()↵
|
32 | {↵ | | 42 | {↵
|
33 | return false;↵ | | 43 | return false;↵
|
34 | | | 44 |
|