Page 1 of 2
go to imlementation not working?
Posted: Tue Sep 09, 2008 1:19 pm
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
Re: go to imlementation not working?
Posted: Tue Sep 09, 2008 1:26 pm
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
Re: go to imlementation not working?
Posted: Tue Sep 09, 2008 5:01 pm
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 :
and if i wrote my function like this
the goto implementation work good!!
but if i write my function like this
goto implementation fail to be found !!!!
is it a bug??
Re: go to imlementation not working?
Posted: Tue Sep 09, 2008 5:16 pm
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 !!!!
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
Re: go to imlementation not working?
Posted: Tue Sep 09, 2008 5:40 pm
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
( 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!!!!
Re: go to imlementation not working?
Posted: Tue Sep 09, 2008 5:55 pm
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
Re: go to imlementation not working?
Posted: Tue Sep 09, 2008 6:16 pm
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
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?
Re: go to imlementation not working?
Posted: Tue Sep 09, 2008 6:24 pm
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
Re: go to imlementation not working?
Posted: Tue Sep 09, 2008 7:23 pm
by gerardpuducul
I have create another file test2.c and put the declaration in it :
The function
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!
Re: go to imlementation not working?
Posted: Tue Sep 09, 2008 8:04 pm
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