Menu Search->Find Symbol not working?

General questions regarding the usage of CodeLite
idhan
CodeLite Enthusiast
Posts: 12
Joined: Fri Nov 28, 2014 6:04 pm
Genuine User: Yes
IDE Question: C++
Contact:

Menu Search->Find Symbol not working?

Post by idhan » Fri Nov 28, 2014 6:27 pm

Hi,

I'm trying codelite 6.1 on linux,
I wrote a small demo workspace with 3 projects Gui-Logic-Persistence to play around.

of course I have some classes within these projects and a try the "Find Symbol" feature,
but nothing happens on click..

is the wrong functionality for it? what exaclty does "Find Symbol" ?

thanks in advance!!

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

Re: Menu Search->Find Symbol not working?

Post by eranif » Fri Nov 28, 2014 6:54 pm

Seems to be working fine here.
Can you try this:
Workspace->Retag workspace (full)
and then try again Search->Find Symbol

Also, what happens when you use: right click on the symbol -> Goto Declaration

Thanks,
Eran
Make sure you have read the HOW TO POST thread

idhan
CodeLite Enthusiast
Posts: 12
Joined: Fri Nov 28, 2014 6:04 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Menu Search->Find Symbol not working?

Post by idhan » Fri Nov 28, 2014 7:04 pm

first of all thank you for helping me...

I did a "Workspace->Retag workspace (full)",
and then a "Find symbol" but nothing happens..

I run the codelite using the terminal to see if there is
any output can help me but there is no ouput besides

"codelite: /usr/lib/liblzma.so.5: no version information available (required by /usr/lib/codelite/libwx_gtk2u_core-3.0.so.0) "

which come after I started the program..

Question: I have all my classes inside of namespaces on each project.. like:

namespace Gui
{
class ClassA
{
....
};
}

namespace Logic
{
class ClassA
{
....
};
}

could be that a problem for the parser?

Edit: each class has a header and a source file for the implementation...
Last edited by idhan on Fri Nov 28, 2014 7:14 pm, edited 1 time in total.

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

Re: Menu Search->Find Symbol not working?

Post by eranif » Fri Nov 28, 2014 7:11 pm

This should not be a problem.
What happens when you enable clang code completion within codelite?

Settings->Code Completion->Clang->Enable clang code completion
Then, perform one full rebuild of you project

Eran
Make sure you have read the HOW TO POST thread

idhan
CodeLite Enthusiast
Posts: 12
Joined: Fri Nov 28, 2014 6:04 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Menu Search->Find Symbol not working?

Post by idhan » Fri Nov 28, 2014 7:20 pm

I have a "Settings->Tags Setting-> *Tree*->Clang->Enable clang code completition"

I check the option and I did a full rebuild of my workspace and y retag-workspace.. still nothing happens.

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

Re: Menu Search->Find Symbol not working?

Post by eranif » Fri Nov 28, 2014 7:41 pm

Can you post your build log for the workspace?

Also, enable codelite logging from:
Settings->Global Editor Preferences->Misc->Log
and set it to "Debug"

Next, clear the log file:

Code: Select all

> ~/.codelite/codelite.log
Try to perform the search again, and post the log here (as an attachment)

Eran
Make sure you have read the HOW TO POST thread

idhan
CodeLite Enthusiast
Posts: 12
Joined: Fri Nov 28, 2014 6:04 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Menu Search->Find Symbol not working?

Post by idhan » Fri Nov 28, 2014 7:51 pm

here is my log

Code: Select all


[ 16:48:12:532 DBG ] ContinuousBuild::OnFileSaved
[ 16:48:12:533 DBG ] ContinuousBuild is disabled
[ 16:48:12:799 DBG ] Subversion:
svn: warning: W155007: '/home/idhan/workspace' is not a working copy
[ 16:48:12:801 DBG ] Subversion output:
svn: warning: W155007: '/home/idhan/workspace' is not a working copy
[ 16:48:21:631 DBG ] Generating Makefile...
[ 16:48:21:634 DBG ] Generating Makefile...is completed
[ 16:48:21:720 DBG ] Generating Makefile...
[ 16:48:21:722 DBG ] Generating Makefile...is completed
[ 16:48:21:732 DBG ] Build Ended!
[ 16:48:21:738 DBG ] Posting wxEVT_BUILD_ENDED event
[ 16:48:21:739 DBG ] clang PCH cache cleared!
[ 16:48:21:740 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 16:48:21:742 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done
[ 16:48:21:787 DBG ] Generating Makefile...
[ 16:48:21:790 DBG ] Generating Makefile...is completed
[ 16:48:21:803 DBG ] Build Ended!
[ 16:48:21:805 DBG ] Posting wxEVT_BUILD_ENDED event
[ 16:48:21:806 DBG ] clang PCH cache cleared!
[ 16:48:21:806 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 16:48:21:808 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done
[ 16:48:21:863 DBG ] Generating Makefile...
[ 16:48:21:865 DBG ] Generating Makefile...is completed
[ 16:48:21:876 DBG ] Build Ended!
[ 16:48:21:877 DBG ] Posting wxEVT_BUILD_ENDED event
[ 16:48:21:879 DBG ] clang PCH cache cleared!
[ 16:48:21:879 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 16:48:21:881 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done
[ 16:48:21:926 DBG ] Generating Makefile...
[ 16:48:21:928 DBG ] Generating Makefile...is completed
[ 16:48:21:940 DBG ] Build Ended!
[ 16:48:21:942 DBG ] Posting wxEVT_BUILD_ENDED event
[ 16:48:21:960 DBG ] clang PCH cache cleared!
[ 16:48:21:961 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 16:48:21:963 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done
[ 16:48:21:991 DBG ] Generating Makefile...
[ 16:48:21:993 DBG ] Generating Makefile...is completed
[ 16:48:22:005 DBG ] Build Ended!
[ 16:48:22:008 DBG ] Posting wxEVT_BUILD_ENDED event
[ 16:48:22:009 DBG ] clang PCH cache cleared!
[ 16:48:22:010 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 16:48:22:011 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done
[ 16:48:22:145 DBG ] Generating Makefile...
[ 16:48:22:148 DBG ] Generating Makefile...is completed
[ 16:48:22:160 DBG ] Build Ended!
[ 16:48:22:161 DBG ] Posting wxEVT_BUILD_ENDED event
[ 16:48:22:163 DBG ] clang PCH cache cleared!
[ 16:48:22:163 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 16:48:22:184 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done
[ 16:48:25:700 DBG ] Generating Makefile...
[ 16:48:25:702 DBG ] Generating Makefile...is completed
[ 16:48:25:713 DBG ] Build Ended!
[ 16:48:25:714 DBG ] Posting wxEVT_BUILD_ENDED event
[ 16:48:25:716 DBG ] clang PCH cache cleared!
[ 16:48:25:716 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 16:48:25:735 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done
[ 16:48:26:988 DBG ] Build Ended!
[ 16:48:26:990 DBG ] Posting wxEVT_BUILD_ENDED event
[ 16:48:26:990 DBG ] clang PCH cache cleared!
[ 16:48:26:990 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 16:48:27:012 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done

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

Re: Menu Search->Find Symbol not working?

Post by eranif » Fri Nov 28, 2014 8:04 pm

Apologies, I meant to say: set the log verbosity to "Developer" and post it again

Eran
Make sure you have read the HOW TO POST thread

idhan
CodeLite Enthusiast
Posts: 12
Joined: Fri Nov 28, 2014 6:04 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Menu Search->Find Symbol not working?

Post by idhan » Fri Nov 28, 2014 8:43 pm

Here is log for "developers",

what I can see from the log file is that only 2 projects appears, but I have projects A,B,C.
Actually project A link B and C as libraries, but in the log file appears only A and B

Code: Select all

[ 17:31:20:813 DBG ] ContinuousBuild::OnFileSaved
[ 17:31:20:814 DBG ] ContinuousBuild is disabled
[ 17:31:20:900 DBG ] Subversion:
svn: warning: W155007: '/home/idhan/workspace' is not a working copy
[ 17:31:20:901 DBG ] Subversion output:
svn: warning: W155007: '/home/idhan/workspace' is not a working copy
[ 17:31:25:355 DBG ] Generating Makefile...
[ 17:31:25:357 DBG ] Generating Makefile...is completed
[ 17:31:25:426 DBG ] Generating Makefile...
[ 17:31:25:428 DBG ] Generating Makefile...is completed
[ 17:31:25:438 DBG ] Build Ended!
[ 17:31:25:441 DBG ] Posting wxEVT_BUILD_ENDED event
[ 17:31:25:443 DBG ] clang PCH cache cleared!
[ 17:31:25:443 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 17:31:25:446 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done
[ 17:31:25:484 DBG ] Generating Makefile...
[ 17:31:25:488 DBG ] Generating Makefile...is completed
[ 17:31:25:500 DBG ] Build Ended!
[ 17:31:25:502 DBG ] Posting wxEVT_BUILD_ENDED event
[ 17:31:25:505 DBG ] clang PCH cache cleared!
[ 17:31:25:505 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 17:31:25:508 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done
[ 17:31:25:568 DBG ] Generating Makefile...
[ 17:31:25:571 DBG ] Generating Makefile...is completed
[ 17:31:25:586 DBG ] Build Ended!
[ 17:31:25:589 DBG ] Posting wxEVT_BUILD_ENDED event
[ 17:31:25:590 DBG ] clang PCH cache cleared!
[ 17:31:25:590 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 17:31:25:592 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done
[ 17:31:25:638 DBG ] Generating Makefile...
[ 17:31:25:642 DBG ] Generating Makefile...is completed
[ 17:31:25:657 DBG ] Build Ended!
[ 17:31:25:659 DBG ] Posting wxEVT_BUILD_ENDED event
[ 17:31:25:676 DBG ] clang PCH cache cleared!
[ 17:31:25:676 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 17:31:25:678 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done
[ 17:31:25:703 DBG ] Generating Makefile...
[ 17:31:25:705 DBG ] Generating Makefile...is completed
[ 17:31:25:714 DBG ] Build Ended!
[ 17:31:25:718 DBG ] Posting wxEVT_BUILD_ENDED event
[ 17:31:25:720 DBG ] clang PCH cache cleared!
[ 17:31:25:720 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 17:31:25:722 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done
[ 17:31:25:848 DBG ] Generating Makefile...
[ 17:31:25:850 DBG ] Generating Makefile...is completed
[ 17:31:25:861 DBG ] Build Ended!
[ 17:31:25:863 DBG ] Posting wxEVT_BUILD_ENDED event
[ 17:31:25:864 DBG ] clang PCH cache cleared!
[ 17:31:25:864 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 17:31:25:888 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done
[ 17:31:29:535 DBG ] Generating Makefile...
[ 17:31:29:537 DBG ] Generating Makefile...is completed
[ 17:31:29:556 DBG ] Build Ended!
[ 17:31:29:558 DBG ] Posting wxEVT_BUILD_ENDED event
[ 17:31:29:560 DBG ] clang PCH cache cleared!
[ 17:31:29:561 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 17:31:29:599 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done
[ 17:31:30:854 DBG ] Build Ended!
[ 17:31:30:855 DBG ] Posting wxEVT_BUILD_ENDED event
[ 17:31:30:855 DBG ] clang PCH cache cleared!
[ 17:31:30:855 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db
[ 17:31:30:888 DBG ] ClangCompilationDbThread: Processing file /home/idhan/workspace/.codelite/compilation.db... done
[ 17:32:04:692 DVL ] [CACHED ITEMS] select * from tags where file='/home/idhan/workspace/ProjectA/main.cpp' and kind in ('function','prototype')order by line DESC
[ 17:32:04:726 DVL ] [CACHED ITEMS] select * from tags where file='/home/idhan/workspace/ProjectB/Controller.h' and kind in ('function','prototype')order by line DESC
[ 17:32:04:754 DVL ] [CACHED ITEMS] select * from tags where file='/home/idhan/workspace/ProjectB/Controller.cpp' and kind in ('function','prototype')order by line DESC
[ 17:32:04:837 DVL ] [CACHED ITEMS] select * from tags where file='/home/idhan/workspace/ProjectB/Widget.cpp' and kind in ('function','prototype')order by line DESC
[ 17:32:21:134 DBG ] Aborting PCH caching...
[ 17:32:21:135 DVL ] [CACHED ITEMS] select * from tags where file='/home/idhan/workspace/ProjectB/Widget.cpp' order by line asc
[ 17:32:21:138 DBG ] ClangCodeCompletion::OnFileLoaded() START
[ 17:32:21:138 DBG ]  ==========> ClangDriver::CodeCompletion() started <==============
[ 17:32:21:140 DBG ] Loading compilation flags for file: /home/idhan/workspace/ProjectB/Widget.cpp
[ 17:32:21:141 DBG ] Loaded compilation flags: /usr/bin/g++ -c /home/idhan/workspace/ProjectB/Widget.cpp -std=c++11 -fPIC -g -Wall -o ./Debug/Widget.cpp.o -I. -I/usr/include/irrlicht/ -I..
[ 17:32:21:142 DBG ] ClangCodeCompletion::OnFileLoaded() ENDED
[ 17:32:21:156 DVL ]  ===> [Explorer] Expand to path for /home/idhan/workspace/ProjectB/Widget.cpp
[ 17:32:21:156 DVL ]  <=== [Explorer] Expand to path for /home/idhan/workspace/ProjectB/Widget.cpp
[ 17:32:21:156 DVL ]  ===> [workspace] Expand to path for ProjectB::/home/idhan/workspace/ProjectB/Widget.cpp
[ 17:32:21:156 DVL ]  <=== [workspace] Expand to path for ProjectB::/home/idhan/workspace/ProjectB/Widget.cpp
[ 17:32:21:158 DVL ] [CACHED ITEMS] select * from tags where file='/home/idhan/workspace/ProjectB/Widget.cpp' order by line asc
[ 17:32:21:158 DBG ] ClangCodeCompletion::OnFileLoaded() START
[ 17:32:21:158 DBG ] ClangCodeCompletion::OnFileLoaded() ENDED
[ 17:32:21:162 DBG ] ==========> [ ClangPchMakerThread ] ProcessRequest started: /home/idhan/workspace/ProjectB/Widget.cpp
[ 17:32:21:162 DBG ] ClangWorkerThread:: processing request 2
[ 17:32:21:162 DBG ] ClangWorkerThread:: found cached TU: (nil)
[ 17:32:21:163 DBG ] Command Line Argument: -I/usr/include
[ 17:32:21:163 DBG ] Command Line Argument: -I/usr/include/c++/4.9.1
[ 17:32:21:163 DBG ] Command Line Argument: -I/usr/include/c++/4.9.1/backward
[ 17:32:21:163 DBG ] Command Line Argument: -I/usr/include/c++/4.9.1/x86_64-unknown-linux-gnu
[ 17:32:21:163 DBG ] Command Line Argument: -I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/include
[ 17:32:21:163 DBG ] Command Line Argument: -I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/include-fixed
[ 17:32:21:163 DBG ] Command Line Argument: -I/usr/local/include
[ 17:32:21:163 DBG ] Command Line Argument: -I/home/idhan/workspace/ProjectB/
[ 17:32:21:163 DBG ] Command Line Argument: -I/usr/include/irrlicht/
[ 17:32:21:163 DBG ] Command Line Argument: -I/home/idhan/workspace/
[ 17:32:21:163 DBG ] Command Line Argument: -std=c++11
[ 17:32:21:163 DBG ] Command Line Argument: -w
[ 17:32:21:163 DBG ] Command Line Argument: -ferror-limit=1000
[ 17:32:21:163 DBG ] Command Line Argument: -nobuiltininc
[ 17:32:21:163 DBG ] Calling clang_parseTranslationUnit...
[ 17:32:21:666 DVL ]  ===> [Explorer] Expand to path for /home/idhan/workspace/ProjectB/Widget.cpp
[ 17:32:21:667 DVL ]  <=== [Explorer] Expand to path for /home/idhan/workspace/ProjectB/Widget.cpp
[ 17:32:21:667 DVL ]  ===> [workspace] Expand to path for ProjectB::/home/idhan/workspace/ProjectB/Widget.cpp
[ 17:32:21:667 DVL ]  <=== [workspace] Expand to path for ProjectB::/home/idhan/workspace/ProjectB/Widget.cpp
[ 17:32:22:493 DBG ] Calling clang_parseTranslationUnit... done
[ 17:32:22:493 DBG ] Calling clang_reparseTranslationUnit...
[ 17:32:23:600 DBG ] Calling clang_reparseTranslationUnit... done
[ 17:32:23:601 DBG ] caching Translation Unit file: /home/idhan/workspace/ProjectB/Widget.cpp, 0x7f2b6c001a10
[ 17:32:23:601 DBG ]  ==========> [ ClangPchMakerThread ] PCH creation ended successfully <==============
[ 17:32:45:131 DVL ] [CACHED ITEMS] select * from tags where file='/home/idhan/.codelite/codelite.log' order by line asc
[ 17:32:45:132 DBG ] ClangCodeCompletion::OnFileLoaded() START
[ 17:32:45:138 DVL ]  ===> [Explorer] Expand to path for /home/idhan/.codelite/codelite.log
[ 17:32:45:138 DVL ]  <=== [Explorer] Expand to path for /home/idhan/.codelite/codelite.log
[ 17:32:50:386 DVL ] [CACHED ITEMS] select * from tags where file='/home/idhan/workspace/ProjectA/main.cpp' and kind in ('function','prototype')order by line DESC
[ 17:32:50:419 DVL ] [CACHED ITEMS] select * from tags where file='/home/idhan/workspace/ProjectB/Controller.h' and kind in ('function','prototype')order by line DESC
[ 17:32:50:448 DVL ] [CACHED ITEMS] select * from tags where file='/home/idhan/workspace/ProjectB/Controller.cpp' and kind in ('function','prototype')order by line DESC
[ 17:32:50:529 DVL ] [CACHED ITEMS] select * from tags where file='/home/idhan/workspace/ProjectB/Widget.cpp' and kind in ('function','prototype')order by line DESC
Last edited by idhan on Sat Nov 29, 2014 12:15 am, edited 1 time in total.

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

Re: Menu Search->Find Symbol not working?

Post by eranif » Fri Nov 28, 2014 8:56 pm

It seems (from the log) that everything is working as it should (clang manages to compile your source, without no errors, translation unit is created and cached)
Does code completion works for you?

Eran
Make sure you have read the HOW TO POST thread

Post Reply