Search in sources :

Example 1 with AnnotationEditManager

use of org.knime.workbench.editor2.directannotationedit.AnnotationEditManager in project knime-core by knime.

the class AnnotationEditPart method performEdit.

/**
 * Opens the editor to directoy edit the annotation in place.
 */
public void performEdit() {
    final EditPart parent = getParent();
    if (parent instanceof WorkflowRootEditPart) {
        WorkflowRootEditPart wkfRootEdit = (WorkflowRootEditPart) parent;
        if (wkfRootEdit.getWorkflowManager().isWriteProtected()) {
            return;
        }
    }
    if (m_directEditManager == null) {
        m_directEditManager = new AnnotationEditManager(this, new StyledTextEditorLocator((NodeAnnotationFigure) getFigure()));
    }
    m_directEditManager.show();
}
Also used : EditPart(org.eclipse.gef.EditPart) AnnotationEditManager(org.knime.workbench.editor2.directannotationedit.AnnotationEditManager) StyledTextEditorLocator(org.knime.workbench.editor2.directannotationedit.StyledTextEditorLocator)

Aggregations

EditPart (org.eclipse.gef.EditPart)1 AnnotationEditManager (org.knime.workbench.editor2.directannotationedit.AnnotationEditManager)1 StyledTextEditorLocator (org.knime.workbench.editor2.directannotationedit.StyledTextEditorLocator)1