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

Bug 339780

Summary: Source hover for specialization of specialization does not work
Product: [Tools] CDT Reporter: Marc-André Laperle <malaperle>
Component: cdt-editorAssignee: Marc-André Laperle <malaperle>
Status: RESOLVED FIXED QA Contact: Anton Leherbauer <aleherb+eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.0Flags: aleherb+eclipse: review+
Target Milestone: 8.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
CSourceHover specialization patch
none
CSourceHover specialization patch, ver 2 malaperle: iplog-

Description Marc-André Laperle CLA 2011-03-11 23:34:13 EST
Created attachment 191041 [details]
CSourceHover specialization patch

Example:

template<typename T>
class Iterator
{
};

template<typename T>
class Array
{
public:
    typedef Iterator<T> iterator;
    template<class TIterator>
    TIterator erase(TIterator it)
    {
    }
};

int main() {
    Array<int> foo;
    Array<int>::iterator it;
    foo.erase(it);
}

Try hovering on the last 'erase'.
Comment 1 Marc-André Laperle CLA 2011-03-11 23:38:06 EST
Anton, does the patch look good to you?
Comment 2 Anton Leherbauer CLA 2011-03-14 05:37:37 EDT
Looks like it makes sense.  And for extra +, maybe you could also combine both ifs into one?
Comment 3 Marc-André Laperle CLA 2011-03-14 20:54:36 EDT
Created attachment 191178 [details]
CSourceHover specialization patch, ver 2

I combined the ifs. It does change the behavior slightly because now binding cannot become a IProblemBinding, but I think that's preferable anyway. Thank you for the review.
Comment 4 Marc-André Laperle CLA 2011-03-14 21:04:10 EDT
Fixed in HEAD.
Comment 5 CDT Genie CLA 2011-03-14 21:24:01 EDT
*** cdt cvs genie on behalf of mlaperle ***
Bug 339780 - Source hover for specialization of specialization does not work

[*] CSourceHover.java 1.49 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CSourceHover.java?root=Tools_Project&r1=1.48&r2=1.49