Le 12 nov. 2009 à 19:27, Sean McBride a écrit : On 11/12/09 4:06 PM, Guillaume Billard said: We're using many .INL files in our projects and they don't get syntax
coloring even though they contain C++ code.
I have the same problem, but with .txx extensions. I can do a search (".inl") and list them in the Details view, select
all of them (Cmd-A) and in their common Info page (Cmd-I), set their
File Type to sourcecode.cpp.cpp.
Is there a way to set this globally?
I believe the answer is still no. Last I looked into this, the best solution was to hack Xcode's Info.plist. :(
Could you explain how to do this? I searched the Developer folder for Info.plist files but none seemed related to Xcode. If not, is bugreporter the place to make feature requests?
Yes.
Would the possibility to globally associate an extension to a file type be considered a new feature or an enhancement over the possibility to do it locally?
We generate our .xcodeproj files with a tool, so we may be able to force the file type of .INL files at this stage. When a .INL file is included in the project, it looks like this in the .pbxproj file: /* Begin PBXFileReference section */ ... 4AFBA26302C6F9354FA83B0A /* File.inl */ = {isa = PBXFileReference; lastKnownFileType = text; name = File.inl; path = Source/File.inl; sourceTree = SOURCE_ROOT; }; ... /* End PBXFileReference section */
If I change the file type of File.inl in its Info page, the .pbxproj file turns into this: 4AFBA26302C6F9354FA83B0A /* File.inl */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = File.inl; path = Source/File.inl; sourceTree = SOURCE_ROOT; };
If I manually modify the .pbxproj file like this, the project still loads and builds fine: 4AFBA26302C6F9354FA83B0A /* File.inl */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = File.inl; path = Source/File.inl; sourceTree = SOURCE_ROOT; };
Are there any trade-offs for choosing one way to set the file type or the other (i.e. explicit or "last known")?
Thanks. |