Author Topic: Hello, and "How to synch class tree with current class in editor?"  (Read 3784 times)

Offline johanekdahl

  • Multiple posting newcomer
  • *
  • Posts: 13
God day, all! I have been using C::B for a few weeks now and am, in general, very pleased with what I have seen. Great effort!

I have one question/wish, however:

The project I'm working in has close to 1K (yes 1000, "one-thousand") classes organized in a directory tree with maybe 30 directories on different levels. Class inheritance is largely "lateral" between directories (one part of the tree holds framework/generic/abstract classes, other sub-trees lateral to the framework holds specific/concrete classes inheriting from the framework.

Navigating from the class tree to source code works OK, but I am looking for functionality to go the other way. I often find myself looking at a piece of source code, and need to "synch" the class tree. The only way I have found is to do it manually.
Did I miss something?

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Hello, and "How to synch class tree with current class in editor?"
« Reply #1 on: November 28, 2006, 10:56:32 am »
Hi !

I think the "Search" text control on the Symbols tab is what you need but I never saw it work. I only have a tool tip that tells me "Searching the symbol tree is currently disabled".

To browse my code, I use the wonderful items :
- "Find declaration of:" (contextual menu)
- "Find implementation of:" (contextual menu)
- Alt+g to open project files with an efficient pattern filter
- Ctrl+Alt+g to go to methods declaration/implementation with the same efficient pattern filter

I hope it will help you if you didn't know them !

Dje


Offline johanekdahl

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Hello, and "How to synch class tree with current class in editor?"
« Reply #2 on: November 28, 2006, 11:34:36 am »
"I think the "Search" text control on the Symbols tab is what you need"
no, not unless the dialogue box that would follow already had the class name pasted into the appropriate field - and even then it would still be somewhat "cludgy".

What I am looking for is a "one-click" solution to synch the class tree so that "the current class" shows up in the class tree.

What do I mean with "current class"? Well something along the lines of:
- Right-clicking inside a class declaration would give a "Show Cx in class tree" (or some such formulation) alternative in the context menu.
- Right clicking on a class name would do the same.
and maybe (wishful thinking)
- Right-clicking on a instance variable, eg. any "i" in "Cx i; i.SomeOp();" would do the same.
- Right-clicking on a pointer to an instance would do the same, eg. any "p" in "Cx * p = new Cx(); p->SomeOp();" would do the same.
- Right-clicking on/inside a member function definition, eg on/in "Cx::SomeOp() { ... }" would do the same.

This wish has to do with both the complexity of the project I am working with, and my "modus operandi" in general. I'm just not very good at finding my way around large class hierarchies by filenames, and finding my way inside a class by scrolling the source file.

To browse my code, I use the wonderful items :
[...]
- Alt+g to open project files with an efficient pattern filter
- Ctrl+Alt+g to go to methods declaration/implementation with the same efficient pattern filter
At my end, the first one only seems to open a list with all files in the project (all 2000 of them).
The second one looks interesting, but I am not sure what it actually does.

I have been assuming (after looking around a bit) that there is no documentation for C::B. Am I right in this? How can I find out what accelerator keystrokes there are?

Thank you very much for the help!

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Hello, and "How to synch class tree with current class in editor?"
« Reply #3 on: November 28, 2006, 11:57:12 am »
What you describe looks like a plug-in. If you feel its developement ;-)
The basis could be found in the "Find declaration of:" implementation that works fine; it could give the instance class.

Quote
At my end, the first one only seems to open a list with all files in the project (all 2000 of them).
Yes, by default, it displays all the files, but the files list is updated as soon as you type a fragment of your file name.

Quote
The second one looks interesting, but I am not sure what it actually does.
It parses current file (h or cpp) to find functions/methods declaration/implementation. It makes it possible to quickly jump to the item you want to go to. Same thing : type few letters of your method name and the list is filtered/updated.

Quote
How can I find out what accelerator keystrokes there are?
Well, I do not know any efficient way to browse keystrokes...
I personnaly browse the main menu bar first.
Then, there is the keybinder plug-in. Let's have a look at "Settings/Editor", click on the "Keyboard shortcuts" item on the left and you will be able to browse and edit menu shortcuts.

Quote
I have been assuming (after looking around a bit) that there is no documentation for C::B.
I don't know... I did not look for documentation. I try the different features that look nice (and there is a lot of work with this wonderdul IDE...)

Dje

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Hello, and "How to synch class tree with current class in editor?"
« Reply #4 on: November 28, 2006, 01:05:42 pm »
For documentation, shortcuts, etc check the wiki.
Be patient!
This bug will be fixed soon...