Write correct lineNumbers for properties with comments

This commit is contained in:
Natalia Ukhorskaya
2015-05-26 18:31:19 +03:00
parent ffb7027680
commit 2d509b3211
4 changed files with 12 additions and 15 deletions
@@ -224,7 +224,6 @@ public class CodegenUtil {
}
}
Document document = file.getViewProvider().getDocument();
TextRange textRange = statement.getTextRange();
return document != null ? document.getLineNumber(markEndOffset ? textRange.getEndOffset() : textRange.getStartOffset()) + 1 : null;
return document != null ? document.getLineNumber(markEndOffset ? statement.getTextRange().getEndOffset() : statement.getTextOffset()) + 1 : null;
}
}