TodoItem (IndexPatternOccurrence occurrence) { final TextRange occurrenceRange = occurrence.getTextRange(); return new TodoItemImpl(occurrence.getFile(), occurrenceRange.getStartOffset(), occurrenceRange.getEndOffset(), mapPattern(occurrence.getPattern()), occurrence.getAdditionalTextRanges()); }