Search in sources :

Example 6 with ObjCallbackMethod

use of org.apache.cayenne.modeler.editor.ObjCallbackMethod in project cayenne by apache.

the class RemoveCallbackMethodAction method removeCallbackMethods.

/**
 * base logic for callback method removing
 */
private void removeCallbackMethods() {
    ProjectController mediator = getProjectController();
    CallbackType callbackType = mediator.getCurrentCallbackType();
    ObjCallbackMethod[] callbackMethods = mediator.getCurrentCallbackMethods();
    for (ObjCallbackMethod callbackMethod : callbackMethods) {
        removeCallbackMethod(callbackType, callbackMethod.getName());
    }
    Application.getInstance().getUndoManager().addEdit(new RemoveCallbackMethodUndoableEdit(callbackType, callbackMethods));
}
Also used : CallbackType(org.apache.cayenne.modeler.editor.CallbackType) RemoveCallbackMethodUndoableEdit(org.apache.cayenne.modeler.undo.RemoveCallbackMethodUndoableEdit) ProjectController(org.apache.cayenne.modeler.ProjectController) ObjCallbackMethod(org.apache.cayenne.modeler.editor.ObjCallbackMethod)

Aggregations

ObjCallbackMethod (org.apache.cayenne.modeler.editor.ObjCallbackMethod)6 ProjectController (org.apache.cayenne.modeler.ProjectController)3 CallbackType (org.apache.cayenne.modeler.editor.CallbackType)3 RemoveCallbackMethodUndoableEdit (org.apache.cayenne.modeler.undo.RemoveCallbackMethodUndoableEdit)3 DataChannelDescriptor (org.apache.cayenne.configuration.DataChannelDescriptor)2 DataNodeDescriptor (org.apache.cayenne.configuration.DataNodeDescriptor)2 DataMap (org.apache.cayenne.map.DataMap)2 DbAttribute (org.apache.cayenne.map.DbAttribute)2 DbEntity (org.apache.cayenne.map.DbEntity)2 DbRelationship (org.apache.cayenne.map.DbRelationship)2 Embeddable (org.apache.cayenne.map.Embeddable)2 EmbeddableAttribute (org.apache.cayenne.map.EmbeddableAttribute)2 ObjAttribute (org.apache.cayenne.map.ObjAttribute)2 ObjEntity (org.apache.cayenne.map.ObjEntity)2 ObjRelationship (org.apache.cayenne.map.ObjRelationship)2 Procedure (org.apache.cayenne.map.Procedure)2 ProcedureParameter (org.apache.cayenne.map.ProcedureParameter)2 QueryDescriptor (org.apache.cayenne.map.QueryDescriptor)2 CallbackMethodEvent (org.apache.cayenne.modeler.event.CallbackMethodEvent)2 HashMap (java.util.HashMap)1