use of org.tmdmaker.ui.editor.gef3.editparts.IAttributeEditPart in project tmdmaker by tmdmaker.
the class AttributeComponentEditPolicy method createEditCommand.
@Override
protected Command createEditCommand() {
EditAttribute edited = ((AttributeDialog) dialog).getEditedValue();
if (!edited.isEdited()) {
return null;
}
Attribute editedValueAttribute = new Attribute();
edited.copyTo(editedValueAttribute);
IAttribute original = edited.getOriginalAttribute();
EditPart part = getHost();
if (!(part instanceof IAttributeEditPart)) {
return null;
}
AbstractEntityModel entity = ((IAttributeEditPart) part).getParentModel();
return new AttributeEditCommand(original, editedValueAttribute, entity);
}
Aggregations