go to imlementation not working?

General questions regarding the usage of CodeLite
gerardpuducul
CodeLite Enthusiast
Posts: 36
Joined: Mon Sep 08, 2008 5:11 pm
Contact:

go to imlementation not working?

Post by gerardpuducul »

Hy all,

I continue my discover of codelite and I believe that i have found a bug. When i right clic on a function and choose 'go to imlementation' codelite send me to the declaration. Once here when i clic to 'go the implementation' nothing hapens :( :( .

Is it a bug or did i do somethiing wrong?

Thanks
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: go to imlementation not working?

Post by eranif »

gerardpuducul wrote:I continue my discover of codelite and I believe that i have found a bug. When i right clic on a function and choose 'go to imlementation' codelite send me to the declaration.
Can u provide a working example?

I don't think there is a bug in 'Goto Implementation' / 'Declaration'.

- Do you have the implementation ?
- is the implementation is part of the workspace? (that is, is it in one of the workspace file so CodeLite can find it?)
- What happen when you right click on the workspace and select 'Re-Tag workspace', does this help?

Eran
Make sure you have read the HOW TO POST thread
gerardpuducul
CodeLite Enthusiast
Posts: 36
Joined: Mon Sep 08, 2008 5:11 pm
Contact:

Re: go to imlementation not working?

Post by gerardpuducul »

hy eran!

I am impressed by your support!! You never sleep?? Are you an human??

What do you mean by - Do you have the implementation ?

I have re-tag the workspace and the problem is the same :(

in fact I have found a stange thing: if i declare :

Code: Select all

void function(void);


and if i wrote my function like this

Code: Select all

void function()
{
 
}
the goto implementation work good!!
but if i write my function like this

Code: Select all

void function(void)
{
 
}
goto implementation fail to be found !!!! :o :o is it a bug??
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: go to imlementation not working?

Post by eranif »

gerardpuducul wrote:I am impressed by your support!! You never sleep?? Are you an human??
I am getting notifications whenever someone posts on the forum, and since I work in a software company, I always have computer around ;)
gerardpuducul wrote:What do you mean by - Do you have the implementation ?
Do you have the function implementation as part of your workspace
gerardpuducul wrote:in fact I have found a stange thing: if i declare :

Code: Select all
void function(void);



and if i wrote my function like this

Code: Select all
void function()
{

}


the goto implementation work good!!
but if i write my function like this

Code: Select all
void function(void)
{

}


goto implementation fail to be found !!!! :o :o is it a bug??
mmm, typing this code inside the editor:

Code: Select all

void function(void);

void function(void)
{
}


void foo_bar()
{
	function();
}
Saving the file, and then right clicking on 'function' (which is called from within foo_bar) and selecting 'Goto Implementation' works
Can u try this exact piece of code?
Eran
Make sure you have read the HOW TO POST thread
gerardpuducul
CodeLite Enthusiast
Posts: 36
Joined: Mon Sep 08, 2008 5:11 pm
Contact:

Re: go to imlementation not working?

Post by gerardpuducul »

I am getting notifications whenever someone posts on the forum, and since I work in a software company, I always have computer around ;)
I am so shock!! I will see your boss and tell him everything :D :D :D ( if you don't solve my problem!! ;) )

So i have try your piece of code and Goto implementation doesn't work. codelite seems find the function (because a red sqare appears around each string "function") but it doesn't focus on the function implementation!!!

I am so sad!!!! :(
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: go to imlementation not working?

Post by eranif »

gerardpuducul wrote:So i have try your piece of code and Goto implementation doesn't work
What happens when you open the 'Outline Dialog' ? (Ctrl-Shift-O) can u see the function there?

Can u see the function in the navigation bar? (View -> Navigation bar, basically it is the two dropdown on top of your editor)

Eran
Make sure you have read the HOW TO POST thread
gerardpuducul
CodeLite Enthusiast
Posts: 36
Joined: Mon Sep 08, 2008 5:11 pm
Contact:

Re: go to imlementation not working?

Post by gerardpuducul »

with CTRl+Shift+O,i have :

test.c
---------Global Functions and Variables
----------------foo_bar()
----------------function(void)
---------Functions Prototypes
----------------function(void):[prototype]
---------Macros

in the navigation bar, I have foo_bar() and 2 :shock: function(void)
when i clic on the first i go to the implementation
when i clic on the second i go to the declaration

Strange isn't it?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: go to imlementation not working?

Post by eranif »

eranif wrote:Strange isn't it?
Looks like it behaves as expected (2 foo(void), one for declartaion and one for implementation)

I cant reproduce it ...

What happen if you move the declaration to another file?

Eran
Make sure you have read the HOW TO POST thread
gerardpuducul
CodeLite Enthusiast
Posts: 36
Joined: Mon Sep 08, 2008 5:11 pm
Contact:

Re: go to imlementation not working?

Post by gerardpuducul »

I have create another file test2.c and put the declaration in it :

Code: Select all

void function(void);
The function

Code: Select all

void function(void)
{
}
stay in the first file test1.c and have no-link with test2.c

When I right clic on function in test1.c and try "goto declaration" noting happen (i think is normal because i have no include and no extern define)

When I right clic on function in test1.c and try "goto implementation" it's working! :shock:
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: go to imlementation not working?

Post by eranif »

gerardpuducul wrote:When I right clic on function in test1.c and try "goto declaration" noting happen (i think is normal because i have no include and no extern define)
It should work, since codelite does not rely on the 'include' or 'externs' of your code - codelite will find it, if the file containing the methods is a workspace file

Do this:
Place your caret on 'function' and hit Ctrl-D or (Search -> Find Symbol)

There should be a dialog opened, does it contains all the symbols?

Another thing, can u send me the .project file?

Eran
Make sure you have read the HOW TO POST thread
Post Reply