| OLD | NEW |
| 1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Xcode project file generator. | 5 """Xcode project file generator. |
| 6 | 6 |
| 7 This module is both an Xcode project file generator and a documentation of the | 7 This module is both an Xcode project file generator and a documentation of the |
| 8 Xcode project file format. Knowledge of the project file format was gained | 8 Xcode project file format. Knowledge of the project file format was gained |
| 9 based on extensive experience with Xcode, and by making changes to projects in | 9 based on extensive experience with Xcode, and by making changes to projects in |
| 10 Xcode.app and observing the resultant changes in the associated project files. | 10 Xcode.app and observing the resultant changes in the associated project files. |
| (...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1502 'plist': 'text.plist.xml', | 1502 'plist': 'text.plist.xml', |
| 1503 'pm': 'text.script.perl', | 1503 'pm': 'text.script.perl', |
| 1504 'png': 'image.png', | 1504 'png': 'image.png', |
| 1505 'py': 'text.script.python', | 1505 'py': 'text.script.python', |
| 1506 'r': 'sourcecode.rez', | 1506 'r': 'sourcecode.rez', |
| 1507 'rez': 'sourcecode.rez', | 1507 'rez': 'sourcecode.rez', |
| 1508 's': 'sourcecode.asm', | 1508 's': 'sourcecode.asm', |
| 1509 'storyboard': 'file.storyboard', | 1509 'storyboard': 'file.storyboard', |
| 1510 'strings': 'text.plist.strings', | 1510 'strings': 'text.plist.strings', |
| 1511 'ttf': 'file', | 1511 'ttf': 'file', |
| 1512 'xcassets': 'folder.assetcatalog', |
| 1512 'xcconfig': 'text.xcconfig', | 1513 'xcconfig': 'text.xcconfig', |
| 1513 'xcdatamodel': 'wrapper.xcdatamodel', | 1514 'xcdatamodel': 'wrapper.xcdatamodel', |
| 1514 'xib': 'file.xib', | 1515 'xib': 'file.xib', |
| 1515 'y': 'sourcecode.yacc', | 1516 'y': 'sourcecode.yacc', |
| 1516 } | 1517 } |
| 1517 | 1518 |
| 1518 prop_map = { | 1519 prop_map = { |
| 1519 'dart': 'explicitFileType', | 1520 'dart': 'explicitFileType', |
| 1520 'gyp': 'explicitFileType', | 1521 'gyp': 'explicitFileType', |
| 1521 'gypi': 'explicitFileType', | 1522 'gypi': 'explicitFileType', |
| (...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2879 self._XCPrint(file, 0, '/* Begin ' + class_name + ' section */\n') | 2880 self._XCPrint(file, 0, '/* Begin ' + class_name + ' section */\n') |
| 2880 for object in sorted(objects_by_class[class_name], | 2881 for object in sorted(objects_by_class[class_name], |
| 2881 cmp=lambda x, y: cmp(x.id, y.id)): | 2882 cmp=lambda x, y: cmp(x.id, y.id)): |
| 2882 object.Print(file) | 2883 object.Print(file) |
| 2883 self._XCPrint(file, 0, '/* End ' + class_name + ' section */\n') | 2884 self._XCPrint(file, 0, '/* End ' + class_name + ' section */\n') |
| 2884 | 2885 |
| 2885 if self._should_print_single_line: | 2886 if self._should_print_single_line: |
| 2886 self._XCPrint(file, 0, '}; ') | 2887 self._XCPrint(file, 0, '}; ') |
| 2887 else: | 2888 else: |
| 2888 self._XCPrint(file, 1, '};\n') | 2889 self._XCPrint(file, 1, '};\n') |
| OLD | NEW |