Class outline in XCode - c++

I am looking for a XCode plugin or some configuration settings that might allow me to see the class structure in a file, by showing all defined classes, variables and functions on the right hand side of the screen much like Eclipse. An example of the same for vim can be found here. I work in both C++ and Objective-C and would like something that would work with either language. The screenshot of eclipse below demonstrates what I am talking about.
Can some one point me to such a pluign or how this can be done using the XCode settings.

You may press Ctrl + 6 to get the list of all functions in XCode currently opened page
OR
You may press ⌘ + 2 shortcut and then press the 2 icons at the bottom as shown in the image below.

Related

Codelite page gone blank

I have been writing code in codelite for c++ since past 20 days, today morning while writing code, by mistake i clicked somewhere and the top menu of options and side menu of projects vanished. I tried many things but i couldnt get them back. I am not a technical person and learning c++ from a tutorial. Now my codelite page is blank and i am stuck. I have unistalled and installed again but when i opened it, it still shows the blank page . I dont know what to do. Is there any history i need to delete from my laptop(for reinstallation) or need to do something in codelite , to get back default codelite page which comes when newly installed.Please help.
might be a little late here but I think I had your problem, if someone encounters similar
Double check what "perspective" you are on
Ctrl + M key can minimize several open views such as the "workspace view" and the "debugger view"
It's pretty simple, this happened to me too. It happens just because you are on full screen mode, and because you are currently in the workspace folder in which your source code is. Just follow these:
press Alt+M to you exit full screen mode. You should now be
able to view the top menu.
now go to view in the top menu and click on the Workspace pane.
After the Workspace pane appears, you will notice that you are now
in the workspace folder rather than on the source code file. Now, to go
to the file, click on the workspace on which your file is, click on
the project name under which your source code is, click on src,
then click on the file, e.g. main.cpp
Post your doubts if you still have any

View functions in an object [Eclipse C++]

So i am having trouble viewing the member functions of my declared objects. I am using a MAC and i have an object. I want to see what kind of functions exists in that object. I cannot find the shortcut key for this so i was wondering if someone else knew it?
On my windows computer for java it use to be ctrl + space but that does not seem to work for c++ in either my mac or windows. Please help me out.
It could be because of the Windows Language Services Utility. The default method to switch between languages on Windows is to use the ctrl + space keyboard shortcut, which could be conflicting with the keyboard shortcut for auto-complete in Eclipse.
To get rid of this conflict, you will need to remove all other languages from your computer. Here is a solution:
You can find out what languages you have set up by going to Control Panel -> Region and Language -> Keyboards and Languages (tab) and then Change Keyboards (again, how obvious…). You’ll see a list of languages installed – remove any that you don’t want (click the language and then click the Remove button) until you only have the ones you want left. That fixed it for me, but you can also check the Advanced Key Settings tab to make sure that none of the keyboard shortcuts that are set include Ctrl-Space. - Robin's Blog
Alternatively, you may also want to check whether there is any other conflict with the default keyboard shortcut with Windows and Eclipse C++ IDE:
... but you can also check the Advanced Key Settings tab to make sure that none of the keyboard shortcuts that are set include Ctrl-Space. - Robin's Blog

View all macros defined in source code at a given position in Eclipse CDT

Is there a possibility to view the live macros defined at the current position in the code, in Eclipse CDT?
I think that there could be a way to do this, since eclipse is smart enough to follow my header files included within the window Window > Show view > Include Browser. It can also, as of today, figure out what macros are defined and gray out areas of i.e. #ifdef which are currently not going to be compiled.
The only thing that I feel it could be missing is if I use defines in en external makefile, however they can be simulated and added to the live index via the project settings.
This is, e.g. not what I am looking for, since it would list all macros in the file/project/workspace. I want to know depending on, lets say, where I currently have my cursor in the file.
Type in the editor window:
#ifdef
And then press Ctrl-Space. You will see the long list of all active macros
Update
1) This method correctly not shows macro before it is defined and shows after
2) However it seems Eclipse CDT has an error in handling #undef and this method incorrectly shows macro after it is undefined. I have filed a bug report http://bugs.eclipse.org/bugs/show_bug.cgi?id=472198.

C++ - Writing to a specific output window pane in VS2010

I'm trying to write to a custom Output Window Pane, but the only examples that I can find for writing to the output window automatically write to the Debug pane.
I've gotten as far as creating a custom pane with a VS add-in in C#, and writing text to it when VS2010 starts up. I'm working in a C++ project, and I'm just wondering how I can write to my custom pane from anywhere in code. I'd like to do it with as little overhead as possible, because I am working in a larger code base that I don't want to have to heavily modify.
Thanks
The Debug pane shows results of OutputDebugString calls (either direct, or by Debug.WriteLine / Trace.WriteLine) (it serves the same purpose as dbgview.exe from SysInternals). This is default behavior of the IDE. I think, that writing to custom pane may require implementing your own extension for Visual Studio.
As a workaround, you may use dbgview, define specific prefixes (as [MODULE-A]: , [MODULE-B]: etc.) and set filters to highlight occurences of specific words. Note, that dbgview will work properly only if you run your program without the IDE.

Eclipse CDT Generate method stubs from header file?

I'm wondering if there is a command or plugin for eclipse that will take a header file of mine and auto-generate all of the method stubs into the CPP file from that header? I've googled and the lack of results would say not so, yet I can see in the CDT preferences under templates that there is an option to enable stub generation... but cannot find the command to use it. Thanks!
Okay so, after doing some more searching I found the solution myself. In the header file, right click in white space and select "Implement Method" and a window will appear showing a list of method declarations within the header. You can select some or all, then click "Finish" and be done with it or "Next" to follow the rest of the guided wizard process.
Edit
I've noticed at times when using this that the formatting of the generated stubs can be screwed up, or can screw up the formatting of your existing CPP file. If that does happen, just right click within the CPP file white space, click "Source" and select "Format" to correct the issue.
Another Edit
For some reason after all this time, there's been a bunch of activity of people trying to edit my answer to change it completely. All the edit is trying to communicate is that there is apparently a CTRL+3 shortcut to bring up the implement methods window.
I got a little lost in the Eclipse CDT and could not find the Implement Method selection described above. So for clarity sake I am posting this.
In Eclipse CDT Mars (and maybe previous versions):
Right click on white-space inside the .h or header file. Initial menu appears...
Click on Source->Implement Method...
Popup window appears; check methods (stubs) to create in .cpp / implementation file.
.
You could also check out http://www.lazycplusplus.com/. It is more powerful than generating method-stubs. It generates header and source files. I managed to integrate it in Visual Studio, so it runs on every build. Maybe you can do that in Eclipse, too.
Edit:
On my blog http://itmuckel.de I wrote an article about integrating Lazy C++ in Eclipse. It works really good. Here is the direct downloadlink of the tutorial: http://itmuckel.de/wp-content/uploads/2016/04/lzz_integration.pdf
It is written in german, but the screenshots of Eclipse show the english version. Besides that Google Translate will do a good job, too.