void (int startIndex, int endIndex) { myEditor.getSelectionModel().setSelection(startIndex, endIndex); DataContext dataContext = DataManager.getInstance().getDataContext(EditorComponentImpl.this); CutProvider cutProvider = myEditor.getCutProvider(); if (cutProvider.isCutEnabled(dataContext)) { cutProvider.performCut(dataContext); } }