Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Parsing Objective C syntax in a header file

The problem you're going to run into is that there is no good mechanism to arbitrate content types in the platform. The given file will be considered to be of all the valid content types for it, but a lot of clients will probably ask for just the "preferred" content type for the file. This probably means that the CDT definition for "cHeader" wins, as it's lexigraphically less than yours, and hence found first.

Language mapping settings, as Mike has indicated, should influence which parser gets invoked on the file, but this won't affect other things such as which editor is opened by default on the file, etc.

Chris Recoskie
Team Lead, IBM CDT and RDT
IBM Toronto
Inactive hide details for Alex Blewitt <alex.blewitt@xxxxxxxxx>Alex Blewitt <alex.blewitt@xxxxxxxxx>

          Alex Blewitt <alex.blewitt@xxxxxxxxx>
          Sent by: cdt-dev-bounces@xxxxxxxxxxx

          07/09/2009 09:26 AM

          Please respond to
          "CDT General developers list." <cdt-dev@xxxxxxxxxxx>


"CDT General developers list." <cdt-dev@xxxxxxxxxxx>



[cdt-dev] Parsing Objective C syntax in a header file

I'm working on resolving .h as an objective c header file (instead of  
a c/c++ header), but at the moment, it thinks .h files are C files.

The extension point defines the file extension as an objcHeader (based  
on objcSource):


These are then associated with the language:


Creating a new file.h within an objective c project results in Eclipse  
defaulting to 'C header type' (as seen by right-clicking on the file  
and going to properties). I don't know how to get it recognised as an  
Objective-C header file instead, without which, the parser doesn't  
seem to be kicked in.

cdt-dev mailing list

GIF image

GIF image

GIF image

Back to the top