Search in sources :

Example 1 with ExtendedDirectEditManager

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

the class NotePart method performDirectEdit.

protected void performDirectEdit() {
    if (manager == null) {
        NoteFigure figure = (NoteFigure) getFigure();
        manager = new ExtendedDirectEditManager(this, MultilineTextCellEditor.class, new FigureEditorLocator(figure), figure, value -> null);
    }
    manager.show();
}
Also used : FigureEditorLocator(org.jkiss.dbeaver.erd.ui.directedit.FigureEditorLocator) FigureEditorLocator(org.jkiss.dbeaver.erd.ui.directedit.FigureEditorLocator) ConnectionAnchor(org.eclipse.draw2d.ConnectionAnchor) DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest) Dimension(org.eclipse.draw2d.geometry.Dimension) ERDElement(org.jkiss.dbeaver.erd.model.ERDElement) Point(org.eclipse.draw2d.geometry.Point) ERDUIConstants(org.jkiss.dbeaver.erd.ui.ERDUIConstants) ExtendedDirectEditManager(org.jkiss.dbeaver.erd.ui.directedit.ExtendedDirectEditManager) ChopboxAnchor(org.eclipse.draw2d.ChopboxAnchor) EntityDiagram(org.jkiss.dbeaver.erd.ui.model.EntityDiagram) NoteDirectEditPolicy(org.jkiss.dbeaver.erd.ui.policy.NoteDirectEditPolicy) DirectEditManager(org.eclipse.gef.tools.DirectEditManager) ERDNote(org.jkiss.dbeaver.erd.model.ERDNote) Rectangle(org.eclipse.draw2d.geometry.Rectangle) org.eclipse.gef(org.eclipse.gef) NoteFigure(org.jkiss.dbeaver.erd.ui.figures.NoteFigure) MultilineTextCellEditor(org.jkiss.dbeaver.ui.controls.MultilineTextCellEditor) NoteEditPolicy(org.jkiss.dbeaver.erd.ui.policy.NoteEditPolicy) Command(org.eclipse.gef.commands.Command) DBPNamedObject(org.jkiss.dbeaver.model.DBPNamedObject) PropertyChangeEvent(java.beans.PropertyChangeEvent) EntityConnectionEditPolicy(org.jkiss.dbeaver.erd.ui.policy.EntityConnectionEditPolicy) NoteFigure(org.jkiss.dbeaver.erd.ui.figures.NoteFigure) ExtendedDirectEditManager(org.jkiss.dbeaver.erd.ui.directedit.ExtendedDirectEditManager) MultilineTextCellEditor(org.jkiss.dbeaver.ui.controls.MultilineTextCellEditor)

Example 2 with ExtendedDirectEditManager

use of org.jkiss.dbeaver.erd.ui.directedit.ExtendedDirectEditManager 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 3 with ExtendedDirectEditManager

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

the class NotePart method performDirectEdit.

protected void performDirectEdit() {
    if (manager == null) {
        NoteFigure figure = (NoteFigure) getFigure();
        manager = new ExtendedDirectEditManager(this, MultilineTextCellEditor.class, new FigureEditorLocator(figure), figure, value -> null);
    }
    manager.show();
}
Also used : FigureEditorLocator(org.jkiss.dbeaver.erd.ui.directedit.FigureEditorLocator) FigureEditorLocator(org.jkiss.dbeaver.erd.ui.directedit.FigureEditorLocator) ConnectionAnchor(org.eclipse.draw2d.ConnectionAnchor) DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest) Dimension(org.eclipse.draw2d.geometry.Dimension) ERDElement(org.jkiss.dbeaver.erd.model.ERDElement) Point(org.eclipse.draw2d.geometry.Point) ERDUIConstants(org.jkiss.dbeaver.erd.ui.ERDUIConstants) ExtendedDirectEditManager(org.jkiss.dbeaver.erd.ui.directedit.ExtendedDirectEditManager) ChopboxAnchor(org.eclipse.draw2d.ChopboxAnchor) EntityDiagram(org.jkiss.dbeaver.erd.ui.model.EntityDiagram) NoteDirectEditPolicy(org.jkiss.dbeaver.erd.ui.policy.NoteDirectEditPolicy) DirectEditManager(org.eclipse.gef.tools.DirectEditManager) ERDNote(org.jkiss.dbeaver.erd.model.ERDNote) Rectangle(org.eclipse.draw2d.geometry.Rectangle) org.eclipse.gef(org.eclipse.gef) NoteFigure(org.jkiss.dbeaver.erd.ui.figures.NoteFigure) MultilineTextCellEditor(org.jkiss.dbeaver.ui.controls.MultilineTextCellEditor) NoteEditPolicy(org.jkiss.dbeaver.erd.ui.policy.NoteEditPolicy) Command(org.eclipse.gef.commands.Command) DBPNamedObject(org.jkiss.dbeaver.model.DBPNamedObject) PropertyChangeEvent(java.beans.PropertyChangeEvent) EntityConnectionEditPolicy(org.jkiss.dbeaver.erd.ui.policy.EntityConnectionEditPolicy) NoteFigure(org.jkiss.dbeaver.erd.ui.figures.NoteFigure) ExtendedDirectEditManager(org.jkiss.dbeaver.erd.ui.directedit.ExtendedDirectEditManager) MultilineTextCellEditor(org.jkiss.dbeaver.ui.controls.MultilineTextCellEditor)

Example 4 with ExtendedDirectEditManager

use of org.jkiss.dbeaver.erd.ui.directedit.ExtendedDirectEditManager 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 5 with ExtendedDirectEditManager

use of org.jkiss.dbeaver.erd.ui.directedit.ExtendedDirectEditManager 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)

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