Author Topic: parse and search beyond "project" (sub-project?)  (Read 4122 times)

Offline k1mgy

  • Multiple posting newcomer
  • *
  • Posts: 64
parse and search beyond "project" (sub-project?)
« on: November 24, 2011, 07:59:50 pm »
In my development environment, before code is frozen into a shared (or static) library, I maintain a group of shared (object) files which are referenced by several separate projects.  We can call these files "glue" (a candidate for the libglue) and the projects which reference them as project a, b, and c.

Glue, A, B, and C are all set up in CodeBlocks as projects, and this is grand.  However, to take advantage of code::blocks great features such as right click on function name and select "find implementation of...", for example, I must include the actual sources in Project A, Project B, and Project C.  This is a duplication of effort, and may lead to some confusion.

Rather, I'd love it if we could define Project A as ONLY those source files that project A requires, and then specify something like "Include Glue project in search/auto-completion", so that the sources in glue can be searched and opened the same as would happen if these source files were included in project A itself.

I'm sorry that I don't have the terminology to express this well.. and perhaps the functionality is already there and I have not found it.

Please tell me if this can be done now or if not perhaps it can be considered as an upcoming release feature...

Thank you,

/m

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: parse and search beyond "project" (sub-project?)
« Reply #1 on: November 24, 2011, 11:17:56 pm »
I have not tried it myself, but does Project->Properties...->C/C++ parser options (add additional search paths) achieve the functionality you are looking for?

Offline k1mgy

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: parse and search beyond "project" (sub-project?)
« Reply #2 on: November 25, 2011, 03:23:46 am »
Hi Alpha:

I tried defining an additional path to the glue sources.  It makes no difference.

Note that I am not using Code::Blocks to handle the compile/build.  Instead it is being used as a very capable project manager/editor for my sources.


Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: parse and search beyond "project" (sub-project?)
« Reply #3 on: November 25, 2011, 03:37:34 am »
In CodeCompletion plugin's option dialog, you can check:
Use one parser for the whole workspace, so that all the symbols were stored in one place, hope that helps.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline k1mgy

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: parse and search beyond "project" (sub-project?)
« Reply #4 on: November 25, 2011, 04:51:44 am »
ollydbg: Yes!  That works nicely.

Thank you very much for the help.

/m

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: parse and search beyond "project" (sub-project?)
« Reply #5 on: November 25, 2011, 04:02:21 pm »
In CodeCompletion plugin's option dialog, you can check:
Use one parser for the whole workspace, so that all the symbols were stored in one place, hope that helps.
So that is why it always "just worked" for me :).