Search code examples
indexingsyntax-highlightingeclipse-cdt

Eclipse CDT: Index / apply syntax highlighting with .icc files


As of now, Eclipse CDT does not index .icc files (inline functions), nor it applies syntax highlighting.

How can I achieve this?

I tried Window -> Preferences -> General -> Content Types -> Text -> C Source Files -> C++ Source File -> File associations -> Add -> *.icc -> Apply and close, but it didn't help.

Related:

  1. https://superuser.com/questions/333251/how-to-change-default-file-extension-eclipse-uses-for-source-code-files
  2. https://sahipro.com/docs/faq/eclipse-integration.html

Solution

  • What I did was the right thing to do. Now I have .icc files indexed and part of the code navigation.

    I was only missing some additional actions. I am not sure which of these I tried before checking that .icc files were indexed and which I did not. And I am not sure which are actually needed. Just in case, use all of them.

    1. Right click on a project -> Index -> Rebuild.
    2. For projects having other Project references, rebuild the index first for the reference, then for current the project.
    3. Restart Eclipse (likely not needed).