void (final Editor editor, final Presentation presentation, final DataContext dataContext) { super.update(editor, presentation, dataContext); if (editor.getSelectionModel().hasSelection()) { presentation.setText(EditorBundle.message("action.duplicate.selection"), true); } else { presentation.setText(EditorBundle.message("action.duplicate.line"), true); } }