Search in sources :

Example 6 with ConfirmRemoveDialog

use of org.apache.cayenne.modeler.dialog.ConfirmRemoveDialog in project cayenne by apache.

the class RemoveProcedureParameterAction method performAction.

@Override
public void performAction(ActionEvent e, boolean allowAsking) {
    ConfirmRemoveDialog dialog = getConfirmDeleteDialog(allowAsking);
    ProcedureParameter[] params = getProjectController().getCurrentProcedureParameters();
    if (params.length > 0) {
        if ((params.length == 1 && dialog.shouldDelete("procedure parameter", params[0].getName())) || (params.length > 1 && dialog.shouldDelete("selected procedure parameters"))) {
            removeProcedureParameters();
        }
    }
}
Also used : ProcedureParameter(org.apache.cayenne.map.ProcedureParameter) ConfirmRemoveDialog(org.apache.cayenne.modeler.dialog.ConfirmRemoveDialog)

Aggregations

ConfirmRemoveDialog (org.apache.cayenne.modeler.dialog.ConfirmRemoveDialog)6 DbEntity (org.apache.cayenne.map.DbEntity)3 ObjEntity (org.apache.cayenne.map.ObjEntity)3 ProjectController (org.apache.cayenne.modeler.ProjectController)3 RemoveUndoableEdit (org.apache.cayenne.modeler.undo.RemoveUndoableEdit)2 CompoundEdit (javax.swing.undo.CompoundEdit)1 ConfigurationNode (org.apache.cayenne.configuration.ConfigurationNode)1 DbAttribute (org.apache.cayenne.map.DbAttribute)1 DbRelationship (org.apache.cayenne.map.DbRelationship)1 Embeddable (org.apache.cayenne.map.Embeddable)1 EmbeddableAttribute (org.apache.cayenne.map.EmbeddableAttribute)1 Entity (org.apache.cayenne.map.Entity)1 ObjAttribute (org.apache.cayenne.map.ObjAttribute)1 ObjRelationship (org.apache.cayenne.map.ObjRelationship)1 ProcedureParameter (org.apache.cayenne.map.ProcedureParameter)1 ObjCallbackMethod (org.apache.cayenne.modeler.editor.ObjCallbackMethod)1 RemoveAttributeUndoableEdit (org.apache.cayenne.modeler.undo.RemoveAttributeUndoableEdit)1 RemoveCompoundUndoableEdit (org.apache.cayenne.modeler.undo.RemoveCompoundUndoableEdit)1 RemoveRelationshipUndoableEdit (org.apache.cayenne.modeler.undo.RemoveRelationshipUndoableEdit)1