Search in sources :

Example 1 with LabelCellEditorLocator

use of org.jkiss.dbeaver.erd.ui.directedit.LabelCellEditorLocator in project dbeaver by dbeaver.

the class AttributePart method performDirectEdit.

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

Example 2 with LabelCellEditorLocator

use of org.jkiss.dbeaver.erd.ui.directedit.LabelCellEditorLocator in project dbeaver by dbeaver.

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)

Example 3 with LabelCellEditorLocator

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

the class AttributePart method performDirectEdit.

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

Example 4 with LabelCellEditorLocator

use of org.jkiss.dbeaver.erd.ui.directedit.LabelCellEditorLocator 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)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 Label (org.eclipse.draw2d.Label)2 DirectEditManager (org.eclipse.gef.tools.DirectEditManager)2 TextCellEditor (org.eclipse.jface.viewers.TextCellEditor)2 ColumnNameTypeCellEditorValidator (org.jkiss.dbeaver.erd.ui.directedit.ColumnNameTypeCellEditorValidator)2 TableNameCellEditorValidator (org.jkiss.dbeaver.erd.ui.directedit.TableNameCellEditorValidator)2 EntityFigure (org.jkiss.dbeaver.erd.ui.figures.EntityFigure)2