Goto Implementation jumps to file from other project

CodeLite installation/troubleshooting forum
kernels
CodeLite Curious
Posts: 3
Joined: Mon Apr 10, 2017 8:31 am
Genuine User: Yes
IDE Question: c++
Contact:

Goto Implementation jumps to file from other project

Post 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!
Gibbon1
CodeLite Expert
Posts: 167
Joined: Fri Jul 22, 2011 5:32 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Goto Implementation jumps to file from other project

Post 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.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Goto Implementation jumps to file from other project

Post 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
Make sure you have read the HOW TO POST thread
guyr
CodeLite Enthusiast
Posts: 11
Joined: Wed Feb 01, 2017 11:16 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Goto Implementation jumps to file from other project

Post 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.
Post Reply