1 56 57 package org.objectstyle.cayenne.modeler.action; 58 59 import java.awt.event.ActionEvent ; 60 61 import org.objectstyle.cayenne.map.ProcedureParameter; 62 import org.objectstyle.cayenne.modeler.Application; 63 import org.objectstyle.cayenne.project.ProjectPath; 64 65 70 public class RemoveProcedureParameterAction extends RemoveAction { 71 private final static String ACTION_NAME = "Remove Parameter"; 72 73 public static String getActionName() { 74 return ACTION_NAME; 75 } 76 77 public RemoveProcedureParameterAction(Application application) { 78 super(ACTION_NAME, application); 79 } 80 81 84 public boolean enableForPath(ProjectPath path) { 85 if (path == null) { 86 return false; 87 } 88 Object lastObject = path.getObject(); 89 90 return lastObject instanceof ProcedureParameter; 91 } 92 93 public void performAction(ActionEvent e) { 94 if (getProjectController().getCurrentProcedure() != null) { 95 removeProcedureParameter(); 96 } 97 } 98 } 99 | Popular Tags |