use of org.apache.cayenne.modeler.undo.CreateEmbeddableUndoableEdit in project cayenne by apache.
the class CreateEmbeddableAction method performAction.
@Override
public void performAction(ActionEvent e) {
ProjectController mediator = getProjectController();
DataMap dataMap = mediator.getCurrentDataMap();
Embeddable embeddable = new Embeddable();
String baseName = NameBuilder.builder(embeddable, dataMap).name();
String nameWithPackage = dataMap.getNameWithDefaultPackage(baseName);
embeddable.setClassName(nameWithPackage);
createEmbeddable(dataMap, embeddable);
application.getUndoManager().addEdit(new CreateEmbeddableUndoableEdit(dataMap, embeddable));
}
Aggregations