views:

400

answers:

3

I am using CodeGear RAD Studio C++, I know that to go to a definition of a variable or class you must press control and click on the method name, or any identifier where you want to go to a definition.

However, as most of you would notice this does not work all the time.

Does anyone have any trick on doing this?

+2  A: 

If you run the Precompiled-Header Wizard.. under the Tools menu in Codegear 2009, it may improve the performance of the Go to Definition function.

Seth
+1  A: 

I actually used the Visual Studio Emulator for keys and because of that I can now right click a popup menu and go to definition.

Another benefit of enumlating the Visual Studio keyboard setup is the multiple line tab and alt-Tab now works. Sadly no more shortcut to compile (F6 for RAD Studio 2007 default keyboard setup).

Nassign
Cool that Tab alt-tab thing works nicely in 2009. And shortcut to compile still works!
Seth
+1  A: 

"Go to declaration" usually succeeds when invoked from a source file, but fails when invoked from a header. It's easy to understand why if you know how it works: When you perform Ctrl+Click on an identifier, the compiler kicks in, running in a special "Kibitz" mode, and basically compiles your source code up to the position of the caret. For a .cpp file, this is easy - those can usually be compiled standalone. A header file, however, often depends on other headers but doesn't include them explicitly - i.e. doing a standalone compilation on "sysmac.h" will fail with an error because that header expects "System.hpp" to be included beforehand. This is one of the reasons why Code Completion and Code Browsing often fail when invoked in header files.

Moritz Beutel