Page 1 of 1

Goto Implementation jumps to file from other project

Posted: Tue Jan 15, 2019 5:24 am
by kernels
Hi guys, hope someone can point me in the right direction here.

I have a workspace with 5 different c projects, many files are common to all projects, but each project has it's own main.c file.

When I right click on a function call and click on "Goto Implementation", codelite will often find the implementation in a file in one of the other projects, rather than finding it in the same file that is open and I'm working on.

For example:

void foo(void)
{
//do some foo
}

int main(void)
{
foo();
}

if I right click on foo(); and click on Goto Implementation, codelite will often open the main.c from another project and take me to the function in that file.
Is there a way to limit searching to only the current active project ?

Thanks!

Re: Goto Implementation jumps to file from other project

Posted: Fri Jan 18, 2019 1:55 am
by Gibbon1
I have that problem as well. You can limit the search via the find files dialog, if you are using find in files.

But no way to do that when right click goto implementation.

Re: Goto Implementation jumps to file from other project

Posted: Mon Jan 21, 2019 5:20 pm
by eranif
There is no way to make it work as you expect. You can use Alt-G (or from the menu: Search->Find symbol) this will open *all* 'main' methods CodeLite knows about
and it will let you choose between them

Re: Goto Implementation jumps to file from other project

Posted: Fri Feb 05, 2021 12:21 pm
by guyr
Just found this question via search. I"m encountering the same issue. I'm migrating code from one project to another (call them A - the source - and B - the target.) I started by copying the topmost function, running the build (Custom Make File, from the project), and then finding all the missing functions from the next level down from the build errors. Like the original poster, when I'm reading through the copied code in B and want to look at a called function, Go To Implementation is taking me to the function in A, not the one in B. Would be very helpful to go the function in the correct project.

Thanks.