Xcode ignores setting file type manually in File Inspector
| Originator: | ktam64 | ||
| Number: | rdar://15433293 | Date Originated: | 10/11/2013 |
| Status: | Duplicate/8441397 | Resolved: | |
| Product: | Developer Tools | Product Version: | 5.0.1 |
| Classification: | Reproducible: | Yes |
Closed because a duplicate of 8441397
Summary:
When I manually set Type in the "Identity and Type" section of the "File Inspector tab" of the "Utility panel", Xcode ignores the manual setting and keeps to the file type based on the file extension.
I first noticed this when I wanted to temporarily add some C++ code to a file that is Objective-C only. Instead of renaming the extension from .m to .mm I just set Type to Objective-C++ source. This did not work.
I've noticed it again, when I removed the file extension .rb from a ruby file to make it easier to run the ruby command file from the command line. Removing the extension meant that Xcode immediately lost the association of the file with ruby. I then set the value of Type to Ruby but Xcode still refused to interpret the file as ruby source.
Steps to Reproduce:
1. Using Xcode 5.0.1.
2. Copy following code into a file called test
#!/usr/bin/env ruby
require 'Open3'
$verbose = false
def verboseputs(input)
if $verbose
puts input
end
end
3. Open the file in Xcode
4. Do Command-Option-0
5. -> The Utility panel is displayed.
6. Click on the File Inspector Tab.
7. Choose Ruby Script from the type popup.
8. Xcode still doesn't interpret ruby syntax.
Expected Results:
When the user manually overrides the file format in the file inspector in Xcode I expect Xcode to use the overridden setting. Not to keep to format based on the file extension.
Actual Results:
Xcode ignores the manually overridden value for the file format and keeps interpreting the file based on its extension.
Version:
Xcode 5.0.1 (5A2034a), Mavericks OS X 10.9 (13A598)
Notes:
Configuration:
Repeatable in: Xcode 5.0.1 (5A2034a), Mavericks OS X 10.9 (13A598)
Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!