Home » U++ Library support » U++ Library : Other (not classified elsewhere) » navigate does not always work correctly
navigate does not always work correctly [message #28637] |
Wed, 08 September 2010 18:44 |
aftershock
Messages: 143 Registered: May 2008
|
Experienced Member |
|
|
Hi,
I click on a variable , it takes ocmpletely elsewhere, into another file which has nothing to do with current variable expect that it shares the same name.
I cliked on a variable and it took me to local declaration in another file.
aftershock
|
|
|
Re: navigate does not always work correctly [message #28638 is a reply to message #28637] |
Wed, 08 September 2010 19:32 |
|
Hi aftershock,
What exactly do yo mean by navigate? Assist > Navigate ... (Ctrl+J)? If so, then it works fine, at least for me. It shows the matching names, sorted alphabetically and in case of multiple same names also by scope. As far as I can tell it always dropped me to the right place.
If you mean the navigator panel (Ctrl+N), then it should allow you to see all declarations and definitions by clicking it multiple times. If it got you to different scope, then there might be something wrong with it.
Was it some specific term/place in code? It would be great to know where to look...
Honza
|
|
|
Re: navigate does not always work correctly [message #28639 is a reply to message #28638] |
Wed, 08 September 2010 23:16 |
aftershock
Messages: 143 Registered: May 2008
|
Experienced Member |
|
|
ok
here it is the code
string printvars(vector <string> & vars)
{
string out;
// out+="writefln(";
bool first = true;
I press ctlr-j on first.... this is in package tracecpp
What happens?
Another file comes up pcre.h
get_first_set(const pcre *code, const char *stringname, int *ovector)
{
const real_pcre *re = (const real_pcre *)code;
int entrysize;
char *first, *last;
pcre.h is in package pcre which I created.
Here it is. Is it good enough?
[Updated on: Wed, 08 September 2010 23:17] Report message to a moderator
|
|
|
Re: navigate does not always work correctly [message #28656 is a reply to message #28639] |
Thu, 09 September 2010 12:47 |
|
Hi aftershock,
I was able to reproduce the behavior you describe, it just took me a while before realizing that you talk about "Context go to", which is Alt+J. One of us probably have redefined the shortcut.
Anyway, I looked at the code performing the jumps. It learned me that there is a lot of functionality I never knew about and which is also not documented. I think I will update the docs.
After all, I found that the problem is that for some reason the parser thinks that the variables in functions are global. So it takes you the place where it is first declared. I'm not sure, if it is a bug or if it is by design that the function scope is not honored. I guess only Mirek knows that. I think that it is not a big deal that it doesn't work for local variables, they are usually declared not very far away.
Honza
|
|
|
|
Goto Forum:
Current Time: Sat Sep 21 03:48:38 CEST 2024
Total time taken to generate the page: 0.03003 seconds
|