This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCE : Sorting files in C/C++ Projects tab

Hello!

One question about CCE:

In the C/C++ perspective, C/C++ projects tab, all the files are grouped by type.

First the h files, then the C files. Is there a way to group the files in a plain alphabetic sequence

in order to get them by pairs (.h / .c)?

Thanks!

Pascal

 

  • Pascal said:

    First the h files, then the C files. Is there a way to group the files in a plain alphabetic sequence

    in order to get them by pairs (.h / .c)?

    If you expand the [+] to the left of the .c files, it actually has the included .h files included in that C file.  Is this getting to what you are looking for?

    I realize there is a folder called Includes, which ultimately will contain the .h files as well.  But each .c file included in the project is scanned and the .h files, major symbols, etc. are shown when the [+] is expanded.

  • Hello Brandon!

    Probably we don't talk about the same pane. In the C/C++ projects area, if I expand the (+) in front of the file,

    I get a summary of what is inside. A list of all the h files included, follwed by the #define variables, etc.

    Suppose I expand the + of "myfile.c", I wil see "myfile.h", but if I double-click "myfile.h", it will not open the

    file "myfile.h" but simply show me the place where it has been included in the C file.

    Thanks,

    Pascal

  • Ah, I see what you are saying.

    I did try something and that was to not double-click on the "myfile.h", but instead right-mouse click and select Open Include File.

    This will open up the header file.

  • Hello Brandon,

     

    Thanks for your reply.

    OK, the right click is fine, but in this case, if I can open the .h file by right click, I don't need

    the .h files to be listed anymore, so is there a way to disable the display of .h files?

    Anyway I would prefer to have both files by pairs, and having a plain alphabetical order.

    To come back to my first quesiton in this thread, is there a way to have a plain

    alphabetical order of the project contents?

    Thanks,

    Pascal

     

  • Pascal said:

    OK, the right click is fine, but in this case, if I can open the .h file by right click, I don't need

    the .h files to be listed anymore, so is there a way to disable the display of .h files?

    Not exactly, but you can hide them in another level.  As you mentioned, when you expand the [+] next to a source .c file, the list of include files, #defines, etc. are listed under the tree view.
    You can configure the window to collapse the include files into another level to get them out of the way, but not hide completely.

    Window -> Preferences...
    C/C++ -> Appearance -> Check "Group the includes in the C/C++ projects view"

     

    Pascal said:

    Anyway I would prefer to have both files by pairs, and having a plain alphabetical order.

    To come back to my first quesiton in this thread, is there a way to have a plain

    alphabetical order of the project contents?

    I haven't found a way to do what you are asking.

    There is a Navigator view that can be opened.  Window -> Show View -> Navigator.
    This does not show any .h files.

  • Hello Brandon!

    Thanks for your reply.

    I would also be interested in hiding files that are excluded from the build...

    Is there a page for submitting feature requests?

     

    Pascal

  • Pascal said:

    Is there a page for submitting feature requests?

    I would suggest using http://support.ti.com and select the Contact Technical Support option to submit your request.

  • +1 vote for this feature

    It seems the current eclipse version has this functionality (http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.cdt.doc.user/reference/cdt_u_cproj_view.htm under Menu->Sort) but the latest CCE has missed out!

    The menu item "Sort" is missing in CCE, but I wonder if you added the appropriate options to the workspace .metadata would it work? (I'll have to get up the effort to install eclipse outside of CCE and find the appropriate xml lines to add)

    Brian.

**Attention** This is a public forum