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

Bug 334405

Summary: Source hover is sometimes imprecise
Product: [Tools] CDT Reporter: Marc-André Laperle <malaperle>
Component: cdt-editorAssignee: Anton Leherbauer <aleherb+eclipse>
Status: RESOLVED FIXED QA Contact: Anton Leherbauer <aleherb+eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug, yevshif
Version: 7.0.1   
Target Milestone: 7.0.2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Source Hover, adjust start and end for composite types aleherb+eclipse: iplog+

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.