Search in sources :

Example 1 with CreateCallbackMethodUndoableEdit

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

the class CreateCallbackMethodAction method performAction.

/**
 * performs adding new callback method
 *
 * @param e event
 */
public final void performAction(ActionEvent e) {
    CallbackType callbackType = getProjectController().getCurrentCallbackType();
    String methodName = NameBuilder.builderForCallbackMethod(getProjectController().getCurrentObjEntity()).baseName(toMethodName(callbackType.getType())).name();
    createCallbackMethod(callbackType, methodName);
    application.getUndoManager().addEdit(new CreateCallbackMethodUndoableEdit(callbackType, methodName));
}
Also used : CallbackType(org.apache.cayenne.modeler.editor.CallbackType) CreateCallbackMethodUndoableEdit(org.apache.cayenne.modeler.undo.CreateCallbackMethodUndoableEdit)

Aggregations

CallbackType (org.apache.cayenne.modeler.editor.CallbackType)1 CreateCallbackMethodUndoableEdit (org.apache.cayenne.modeler.undo.CreateCallbackMethodUndoableEdit)1