private void createCursor(final String userId, Line line, int lineNumber, int column) {
final CursorView cursorView = CursorView.create(appContext, false);
cursorView.setVisibility(true);
Participant participant = participantModel.getParticipantByUserId(userId);
if (participant != null) {
/*
* If the participant exists already, set his color (otherwise the
* participant model listener will set the color)
*/
cursorView.setColor(participant.getColor());
}
Anchor anchor =
document.getAnchorManager().createAnchor(COLLABORATOR_CURSOR_ANCHOR_TYPE, line, lineNumber,
column);