Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] c/cpp projects and content-types

Hi again,
I checked in a fix for
https://bugs.eclipse.org/bugs/show_bug.cgi?id=132201.

The decision whether a file is c- or c++ is made by content type. 

I have changed the way content-types are computed for CDT to make this
work
for the file-extensions .c/.C:
  * case sensitive matches are preferred over insensitive matches.

Since that does not help with .h files:
  * in c++-projects c++-content-types are preferred over
c-content-types,
  * in c-projects c-content-types are preferred.

To get the content type use:
  * CorePlugin.getContentType(IProject project, String filename) or
  * ITranslationUnit.getContentTypeId().
  
Markus.


Back to the top