if (cursorAnchor != null && baseAnchor != null) {
FilePositionImpl basePosition = FilePositionImpl.make()
.setColumn(baseAnchor.getColumn()).setLineNumber(baseAnchor.getLineNumber());
FilePositionImpl cursorPosition = FilePositionImpl.make().setColumn(
cursorAnchor.getColumn()).setLineNumber(cursorAnchor.getLineNumber());
DocumentSelectionImpl selection = DocumentSelectionImpl.make()
.setUserId(userSelection.clientId).setBasePosition(basePosition)
.setCursorPosition(cursorPosition);
selections.add(selection);
}
}