use of org.jkiss.dbeaver.ext.erd.part.EntityPart in project dbeaver by serge-rider.
the class EntityDirectEditPolicy method showCurrentEditValue.
/**
* @see DirectEditPolicy#showCurrentEditValue(org.eclipse.gef.requests.DirectEditRequest)
*/
@Override
protected void showCurrentEditValue(DirectEditRequest request) {
String value = (String) request.getCellEditor().getValue();
EntityPart entityPart = (EntityPart) getHost();
entityPart.handleNameChange(value);
}
use of org.jkiss.dbeaver.ext.erd.part.EntityPart in project dbeaver by serge-rider.
the class EntityDirectEditPolicy method revertOldEditValue.
/**
* @param request
*/
@Override
protected void revertOldEditValue(DirectEditRequest request) {
CellEditor cellEditor = request.getCellEditor();
cellEditor.setValue(oldValue);
EntityPart entityPart = (EntityPart) getHost();
entityPart.revertNameChange();
}
use of org.jkiss.dbeaver.ext.erd.part.EntityPart in project dbeaver by serge-rider.
the class EntityEditPolicy method createDeleteCommand.
@Override
protected Command createDeleteCommand(GroupRequest request) {
EntityPart entityPart = (EntityPart) getHost();
Rectangle bounds = entityPart.getFigure().getBounds().getCopy();
EntityDiagram parent = (EntityDiagram) (entityPart.getParent().getModel());
return new EntityDeleteCommand(parent, entityPart, bounds);
}
Aggregations