Search in sources :

Example 6 with ExtendedDirectEditManager

use of org.jkiss.dbeaver.erd.ui.directedit.ExtendedDirectEditManager in project dbeaver by serge-rider.

the class EntityPart method performDirectEdit.

protected void performDirectEdit() {
    if (manager == null) {
        ERDGraphicalViewer viewer = getViewer();
        ValidationMessageHandler handler = viewer.getValidationHandler();
        EntityFigure figure = getFigure();
        EditableLabel nameLabel = figure.getNameLabel();
        manager = new ExtendedDirectEditManager(this, TextCellEditor.class, new LabelCellEditorLocator(nameLabel), nameLabel, new TableNameCellEditorValidator(handler));
    }
    manager.show();
}
Also used : EditableLabel(org.jkiss.dbeaver.erd.ui.figures.EditableLabel) EntityFigure(org.jkiss.dbeaver.erd.ui.figures.EntityFigure) ExtendedDirectEditManager(org.jkiss.dbeaver.erd.ui.directedit.ExtendedDirectEditManager) LabelCellEditorLocator(org.jkiss.dbeaver.erd.ui.directedit.LabelCellEditorLocator) ValidationMessageHandler(org.jkiss.dbeaver.erd.ui.directedit.ValidationMessageHandler) TextCellEditor(org.eclipse.jface.viewers.TextCellEditor) TableNameCellEditorValidator(org.jkiss.dbeaver.erd.ui.directedit.TableNameCellEditorValidator) ERDGraphicalViewer(org.jkiss.dbeaver.erd.ui.editor.ERDGraphicalViewer)

Aggregations

ExtendedDirectEditManager (org.jkiss.dbeaver.erd.ui.directedit.ExtendedDirectEditManager)6 DirectEditManager (org.eclipse.gef.tools.DirectEditManager)4 LabelCellEditorLocator (org.jkiss.dbeaver.erd.ui.directedit.LabelCellEditorLocator)4 ValidationMessageHandler (org.jkiss.dbeaver.erd.ui.directedit.ValidationMessageHandler)4 ERDGraphicalViewer (org.jkiss.dbeaver.erd.ui.editor.ERDGraphicalViewer)4 EditableLabel (org.jkiss.dbeaver.erd.ui.figures.EditableLabel)4 PropertyChangeEvent (java.beans.PropertyChangeEvent)2 ChopboxAnchor (org.eclipse.draw2d.ChopboxAnchor)2 ConnectionAnchor (org.eclipse.draw2d.ConnectionAnchor)2 Label (org.eclipse.draw2d.Label)2 Dimension (org.eclipse.draw2d.geometry.Dimension)2 Point (org.eclipse.draw2d.geometry.Point)2 Rectangle (org.eclipse.draw2d.geometry.Rectangle)2 org.eclipse.gef (org.eclipse.gef)2 Command (org.eclipse.gef.commands.Command)2 DirectEditRequest (org.eclipse.gef.requests.DirectEditRequest)2 TextCellEditor (org.eclipse.jface.viewers.TextCellEditor)2 ERDElement (org.jkiss.dbeaver.erd.model.ERDElement)2 ERDNote (org.jkiss.dbeaver.erd.model.ERDNote)2 ERDUIConstants (org.jkiss.dbeaver.erd.ui.ERDUIConstants)2