Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 454793

Summary: tooltip.js errors
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: emoffatt
Version: 7.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2014-12-10 13:28:27 EST
Using master, when I hover over certain JS code, I am getting errors from tooltip.js. Specifically these lines:

> if (curLine !== endLine) {
>     start = tv.getLineStart(curLine);
>     end = tv.getLineEnd(curLine);   // ! throws an error
> }

Here 'tv' is a TextView and there is no #getLineEnd() method defined on TextViews.
Comment 1 Eric Moffatt CLA 2014-12-11 13:20:02 EST
oops, thought I'd already addressed that one...thanks !
Comment 2 Eric Moffatt CLA 2014-12-11 13:23:00 EST
This was an aborted attempt to manage multi-line annotations...
Comment 3 Eric Moffatt CLA 2014-12-11 14:17:35 EST
I've amended the code to use the textModel's 'getLineEnd' API...

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=428b5066175db80876d94167f2b6412a4df2e2c7

To test this we need a multi-line annotation. The best way to get one is to put a return statement before an 'if' block (making it unreachable).