public void execute(Editor editor, EditorCommandParameters parameters) { string current_text = editor.getText(); string new_text = current_text.Insert(parameters.current_selection_index, "\\tempo 4=120\r\n"); editor.setText(new_text); }
public void executeCommand(string command_name) { EditorCommandParameters parameters = new EditorCommandParameters( this._target.getCurrentSelection(), this._target.getCurrentIndex() ); EditorCommand command; if (this._commands.TryGetValue(command_name, out command)) { command.execute(this._target, parameters); } this._target.setCurrentIndex(parameters.current_selection_index); }
public void execute(Editor editor, EditorCommandParameters parameters) { editor.saveToPDF(); }
public void execute(Editor editor, EditorCommandParameters parameters) { editor.openFile(); }