Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334405 - Source hover is sometimes imprecise
Summary: Source hover is sometimes imprecise
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 7.0.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 7.0.2   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-14 12:51 EST by Marc-André Laperle CLA
Modified: 2011-02-25 20:11 EST (History)
2 users (show)

See Also:


Attachments
Source Hover, adjust start and end for composite types (1.41 KB, patch)
2011-01-14 19:56 EST, Marc-André Laperle CLA
aleherb+eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-André Laperle CLA 2011-01-14 12:51:22 EST
Tested with 7.0.1 and 8.0.0.201101140002.

class Bar;

void foo()
{
    if(1)
    {

    	;
    	;
    	;
    	;
    	;
    	;
    }

    Bar object;
}

Hover on 'object', notice how the hover only displays the if statement. If you click in the hover window and scroll then you see 'Bar object'.
Comment 1 Marc-André Laperle CLA 2011-01-14 19:49:39 EST
Also, if you hover on Bar (left of 'object') the source is displayed entirely.
Comment 2 Marc-André Laperle CLA 2011-01-14 19:56:10 EST
Created attachment 186866 [details]
Source Hover, adjust start and end for composite types

This patch contains two small changes to fix both cases. Is there any test for source hover? I didn't find any.
Comment 3 Anton Leherbauer CLA 2011-01-17 05:30:03 EST
> This patch contains two small changes to fix both cases. Is there any test for
> source hover? I didn't find any.

Thanks, the patch looks good.  Unfortunately we don't have automated tests for the Source Hover so manual testing must do for now.

Committed to cdt_7_0 and HEAD.