Search in sources :

Example 1 with CreateProcedureUndoableEdit

use of org.apache.cayenne.modeler.undo.CreateProcedureUndoableEdit in project cayenne by apache.

the class CreateProcedureAction method performAction.

public void performAction(ActionEvent e) {
    ProjectController mediator = getProjectController();
    DataMap map = mediator.getCurrentDataMap();
    Procedure procedure = new Procedure();
    procedure.setName(NameBuilder.builder(procedure, map).name());
    createProcedure(map, procedure);
    application.getUndoManager().addEdit(new CreateProcedureUndoableEdit(map, procedure));
}
Also used : Procedure(org.apache.cayenne.map.Procedure) ProjectController(org.apache.cayenne.modeler.ProjectController) CreateProcedureUndoableEdit(org.apache.cayenne.modeler.undo.CreateProcedureUndoableEdit) DataMap(org.apache.cayenne.map.DataMap)

Aggregations

DataMap (org.apache.cayenne.map.DataMap)1 Procedure (org.apache.cayenne.map.Procedure)1 ProjectController (org.apache.cayenne.modeler.ProjectController)1 CreateProcedureUndoableEdit (org.apache.cayenne.modeler.undo.CreateProcedureUndoableEdit)1