private EditorCell findTarget(EditorComponent editorComponent) { Selection selection = editorComponent.getSelectionManager().getSelection(); if (selection == null) { return null; } List<EditorCell> selectedCells = selection.getSelectedCells(); EditorCell cell = selectedCells.get(selectedCells.size() - 1); return cell.getEndCell(CellConditions.SELECTABLE); }