aptana/studio3 — comment on commit 5d79dad8ac665b8dd584abb9e8eb537eef7a21c3
File: plugins/com.aptana.buildpath.core/src/com/aptana/core/build/AbstractBuildParticipant.java line 76
By sgtcoolguy:

I added a unit test for this and it seems to work as expected:

```java
public void testGetLineNumber() throws Exception
{
String source = "1\n2\n3\n4\n";
assertEquals("Offset 0 should be line 1", 1, participant.getLineNumber(0, source));
assertEquals("Offset 1 should be line 1", 1, participant.getLineNumber(1, source));
assertEquals("Offset 2 should be line 2", 2, participant.getLineNumber(2, source));
assertEquals("Offset 3 should be line 2", 2, participant.getLineNumber(3, source));
assertEquals("Offset 4 should be line 3", 3, participant.getLineNumber(4, source));
assertEquals("Offset 5 should be line 3", 3, participant.getLineNumber(5, source));
assertEquals("Offset 6 should be line 4", 4, participant.getLineNumber(6, source));
assertEquals("Offset 7 should be line 4", 4, participant.getLineNumber(7, source));
assertEquals("Offset past end of source should return -1", -1, participant.getLineNumber(8, source));
}
```