Search in sources :

Example 11 with NotePart

use of org.jkiss.dbeaver.erd.ui.part.NotePart in project dbeaver by serge-rider.

the class NoteDirectEditPolicy method showCurrentEditValue.

@Override
protected void showCurrentEditValue(DirectEditRequest request) {
    String value = (String) request.getCellEditor().getValue();
    NotePart notePart = (NotePart) getHost();
    notePart.handleNameChange(value);
}
Also used : NotePart(org.jkiss.dbeaver.erd.ui.part.NotePart)

Example 12 with NotePart

use of org.jkiss.dbeaver.erd.ui.part.NotePart in project dbeaver by serge-rider.

the class NoteDirectEditPolicy method revertOldEditValue.

@Override
protected void revertOldEditValue(DirectEditRequest request) {
    CellEditor cellEditor = request.getCellEditor();
    cellEditor.setValue(oldValue);
    NotePart entityPart = (NotePart) getHost();
    entityPart.revertNameChange();
}
Also used : NotePart(org.jkiss.dbeaver.erd.ui.part.NotePart) CellEditor(org.eclipse.jface.viewers.CellEditor)

Aggregations

NotePart (org.jkiss.dbeaver.erd.ui.part.NotePart)12 Rectangle (org.eclipse.draw2d.geometry.Rectangle)4 EntityDiagram (org.jkiss.dbeaver.erd.ui.model.EntityDiagram)4 EntityPart (org.jkiss.dbeaver.erd.ui.part.EntityPart)4 NodePart (org.jkiss.dbeaver.erd.ui.part.NodePart)4 HashMap (java.util.HashMap)2 Map (java.util.Map)2 Dimension (org.eclipse.draw2d.geometry.Dimension)2 Command (org.eclipse.gef.commands.Command)2 CellEditor (org.eclipse.jface.viewers.CellEditor)2 NoteDeleteCommand (org.jkiss.dbeaver.erd.ui.command.NoteDeleteCommand)2 ICustomizablePart (org.jkiss.dbeaver.erd.ui.part.ICustomizablePart)2