Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339780 - Source hover for specialization of specialization does not work
Summary: Source hover for specialization of specialization does not work
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Marc-André Laperle CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-11 23:34 EST by Marc-André Laperle CLA
Modified: 2011-03-14 21:24 EDT (History)
1 user (show)

See Also:
aleherb+eclipse: review+


Attachments
CSourceHover specialization patch (1.22 KB, patch)
2011-03-11 23:34 EST, Marc-André Laperle CLA
no flags Details | Diff
CSourceHover specialization patch, ver 2 (1.38 KB, patch)
2011-03-14 20:54 EDT, Marc-André Laperle CLA
malaperle: 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-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