Bug 116471 - Ambigous API definition on CompilationUnit.getPosition()
Summary: Ambigous API definition on CompilationUnit.getPosition()
Status: RESOLVED DUPLICATE of bug 116472
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-15 13:16 EST by Martin Aeschlimann CLA
Modified: 2005-11-15 13:19 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2005-11-15 13:16:33 EST
20051115

If I understand right, CompilationUnit.getPosition() returns a character index
given line/colunm.

The spec says that '0' is returned when e.g. arguments ar invalid or no line
number avaiable or out ouf range.

But isn't 0 also a valid character index? (for getPosition(1, 0)). How would I
tell apart? Why not using -1 as the 'invalid' result as it is more common in
Eclipse?
Comment 1 Martin Aeschlimann CLA 2005-11-15 13:19:25 EST

*** This bug has been marked as a duplicate of 116472 ***