Search in sources :

Example 1 with FigureEditorLocator

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

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

Aggregations

PropertyChangeEvent (java.beans.PropertyChangeEvent)2 ChopboxAnchor (org.eclipse.draw2d.ChopboxAnchor)2 ConnectionAnchor (org.eclipse.draw2d.ConnectionAnchor)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 DirectEditManager (org.eclipse.gef.tools.DirectEditManager)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 ExtendedDirectEditManager (org.jkiss.dbeaver.erd.ui.directedit.ExtendedDirectEditManager)2 FigureEditorLocator (org.jkiss.dbeaver.erd.ui.directedit.FigureEditorLocator)2 NoteFigure (org.jkiss.dbeaver.erd.ui.figures.NoteFigure)2 EntityDiagram (org.jkiss.dbeaver.erd.ui.model.EntityDiagram)2 EntityConnectionEditPolicy (org.jkiss.dbeaver.erd.ui.policy.EntityConnectionEditPolicy)2 NoteDirectEditPolicy (org.jkiss.dbeaver.erd.ui.policy.NoteDirectEditPolicy)2 NoteEditPolicy (org.jkiss.dbeaver.erd.ui.policy.NoteEditPolicy)2