Search in sources :

Example 1 with ExtendedDirectEditManager

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

the class AttributePart method performDirectEdit.

protected void performDirectEdit() {
    if (manager == null) {
        ERDGraphicalViewer viewer = (ERDGraphicalViewer) getViewer();
        ValidationMessageHandler handler = viewer.getValidationHandler();
        Label l = getFigure();
        ColumnNameTypeCellEditorValidator columnNameTypeCellEditorValidator = new ColumnNameTypeCellEditorValidator(handler);
        manager = new ExtendedDirectEditManager(this, TextCellEditor.class, new LabelCellEditorLocator(l), l, columnNameTypeCellEditorValidator);
    }
    manager.show();
}
Also used : ExtendedDirectEditManager(org.jkiss.dbeaver.ext.erd.directedit.ExtendedDirectEditManager) LabelCellEditorLocator(org.jkiss.dbeaver.ext.erd.directedit.LabelCellEditorLocator) ValidationMessageHandler(org.jkiss.dbeaver.ext.erd.directedit.ValidationMessageHandler) Label(org.eclipse.draw2d.Label) EditableLabel(org.jkiss.dbeaver.ext.erd.figures.EditableLabel) TextCellEditor(org.eclipse.jface.viewers.TextCellEditor) ERDGraphicalViewer(org.jkiss.dbeaver.ext.erd.editor.ERDGraphicalViewer) ColumnNameTypeCellEditorValidator(org.jkiss.dbeaver.ext.erd.directedit.ColumnNameTypeCellEditorValidator)

Example 2 with ExtendedDirectEditManager

use of org.jkiss.dbeaver.ext.erd.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.ext.erd.figures.EditableLabel) EntityFigure(org.jkiss.dbeaver.ext.erd.figures.EntityFigure) ExtendedDirectEditManager(org.jkiss.dbeaver.ext.erd.directedit.ExtendedDirectEditManager) LabelCellEditorLocator(org.jkiss.dbeaver.ext.erd.directedit.LabelCellEditorLocator) ValidationMessageHandler(org.jkiss.dbeaver.ext.erd.directedit.ValidationMessageHandler) TextCellEditor(org.eclipse.jface.viewers.TextCellEditor) TableNameCellEditorValidator(org.jkiss.dbeaver.ext.erd.directedit.TableNameCellEditorValidator) ERDGraphicalViewer(org.jkiss.dbeaver.ext.erd.editor.ERDGraphicalViewer)

Aggregations

TextCellEditor (org.eclipse.jface.viewers.TextCellEditor)2 ExtendedDirectEditManager (org.jkiss.dbeaver.ext.erd.directedit.ExtendedDirectEditManager)2 LabelCellEditorLocator (org.jkiss.dbeaver.ext.erd.directedit.LabelCellEditorLocator)2 ValidationMessageHandler (org.jkiss.dbeaver.ext.erd.directedit.ValidationMessageHandler)2 ERDGraphicalViewer (org.jkiss.dbeaver.ext.erd.editor.ERDGraphicalViewer)2 EditableLabel (org.jkiss.dbeaver.ext.erd.figures.EditableLabel)2 Label (org.eclipse.draw2d.Label)1 ColumnNameTypeCellEditorValidator (org.jkiss.dbeaver.ext.erd.directedit.ColumnNameTypeCellEditorValidator)1 TableNameCellEditorValidator (org.jkiss.dbeaver.ext.erd.directedit.TableNameCellEditorValidator)1 EntityFigure (org.jkiss.dbeaver.ext.erd.figures.EntityFigure)1