| Summary: | C/C++ Search alters search string when taking over a selection | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Jan Poganski <jan.poganski+eclipse> |
| Component: | cdt-core | Assignee: | Project Inbox <cdt-core-inbox> |
| Status: | NEW --- | QA Contact: | Jonah Graham <jonah> |
| Severity: | minor | ||
| Priority: | P3 | CC: | eclipse.sprigogin |
| Version: | 7.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Jan Poganski
Let's consider the following example:
struct S {
int a;
};
void test() {
S s;
s.a= 1;
}
When trying to search for 's.a' the dot is removed, because you can only search for (possibly qualified) names, but not for expressions. What you really want to search for is 'S::a', or simply 'a'.
As an alternative you can select 'a' and then use the context menu 'References - Workspace'.
To improve the experience with the C/C++ search in such a situation we
could either:
* drop the text before the '.', i.e convert 's.a' into 'a', or
* use the parser to convert the field-access expressions into the member
it refers to (s.a -> S::a). This would raise the question whether the
same should be done for names (a -> S::a).
|