public void execute_internal(EditorContext editorContext, SNode node) { SNode expression = SLinkOperations.getTarget(node, "processHandler", true); SNodeOperations.replaceWithAnother(node, expression); // some stuff I copied from binary operation // it does some magic with selection editorContext.flushEvents(); EditorComponent editor = editorContext.getEditorComponent(); EditorCell cell = (EditorCell) editor.findNodeCell(expression); if (cell != null) { EditorCell lastLeaf = cell.getLastLeaf(CellConditions.SELECTABLE); editor.changeSelection(lastLeaf); if (lastLeaf instanceof EditorCell_Label) { ((EditorCell_Label) lastLeaf).end(); } } }