| Summary: | The content assist does not propose class members declared below cursor for header file | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] PTP | Reporter: | John Liu <jwsliu> | ||||||
| Component: | RDT | Assignee: | Project Inbox <ptp-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | recoskie | ||||||
| Version: | 4.0.7 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=103857 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
John Liu
The problem happens when the class, which the content assist tried to resolve, is defined in a header file rather than in a source file. This is because when PDOMLinkage looks for the pdom file of a ITypedef binding, it only searches source file, so the class can't be resolved, therefore the content assist proposal won't be able to contain it. (In reply to comment #1) > The problem happens when the class, which the content assist tried to resolve, > is defined in a header file rather than in a source file. > This is because when PDOMLinkage looks for the pdom file of a ITypedef binding, > it only searches source file, so the class can't be resolved, therefore the > content assist proposal won't be able to contain it. Also only the header file, in which content assist is triggered, can't be resolved properly. Other header files can be recolved from the project index. Created attachment 196991 [details]
the fix patch
The fix is in the function of getCompletionNode in TranslationUnit, in which we treat a header file as a source file, so its type definition can be resolved.
This won't affect the project index and content assist result, as getCompletionNode runs in fly when the contenet assist is triggered and its parsed output is not saved in the index.
Created attachment 196992 [details]
Ops wrong file was attached, this is the right one.
Patch seems ok to me. Thanks Chris. The fix patch is committed into ptp_4_0 and HEAD. Fix in HEAD and ptp_4_0 Fix in HEAD and ptp_4_0 |