Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: client/dom/scripts/dartdomgenerator.py

Issue 9152018: Remove everything to do with snippets (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | client/dom/scripts/dartgenerator.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This is the entry point to create Dart APIs from the IDL database.""" 6 """This is the entry point to create Dart APIs from the IDL database."""
7 7
8 import dartgenerator 8 import dartgenerator
9 import database 9 import database
10 import logging.config 10 import logging.config
(...skipping 19 matching lines...) Expand all
30 'WorkerGlobalScope': 'WorkerContext'} 30 'WorkerGlobalScope': 'WorkerContext'}
31 31
32 _webkit_renames_inverse = dict((v,k) for k, v in _webkit_renames.iteritems()) 32 _webkit_renames_inverse = dict((v,k) for k, v in _webkit_renames.iteritems())
33 33
34 def main(): 34 def main():
35 current_dir = os.path.dirname(__file__) 35 current_dir = os.path.dirname(__file__)
36 logging.config.fileConfig(os.path.join(current_dir, 'logging.conf')) 36 logging.config.fileConfig(os.path.join(current_dir, 'logging.conf'))
37 37
38 generator = dartgenerator.DartGenerator( 38 generator = dartgenerator.DartGenerator(
39 auxiliary_dir=os.path.join(current_dir, '..', 'src'), 39 auxiliary_dir=os.path.join(current_dir, '..', 'src'),
40 snippet_dir=os.path.join(current_dir, '..', 'snippets'),
41 base_package='') 40 base_package='')
42 generator.LoadAuxiliary() 41 generator.LoadAuxiliary()
43 42
44 common_database = database.Database( 43 common_database = database.Database(
45 os.path.join(current_dir, '..', 'database')) 44 os.path.join(current_dir, '..', 'database'))
46 common_database.Load() 45 common_database.Load()
47 # Remove these types since they are mapped directly to dart. 46 # Remove these types since they are mapped directly to dart.
48 common_database.DeleteInterface('DOMStringMap') 47 common_database.DeleteInterface('DOMStringMap')
49 common_database.DeleteInterface('DOMStringList') 48 common_database.DeleteInterface('DOMStringList')
50 generator.RenameTypes(common_database, { 49 generator.RenameTypes(common_database, {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 83
85 generator.Flush() 84 generator.Flush()
86 85
87 # Install default DOM library. 86 # Install default DOM library.
88 default = os.path.join(lib_dir, DOM_DEFAULT_LIBRARY) 87 default = os.path.join(lib_dir, DOM_DEFAULT_LIBRARY)
89 target = os.path.join(lib_dir, DOM_LIBRARY) 88 target = os.path.join(lib_dir, DOM_LIBRARY)
90 shutil.copyfile(default, target) 89 shutil.copyfile(default, target)
91 90
92 if __name__ == '__main__': 91 if __name__ == '__main__':
93 sys.exit(main()) 92 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | client/dom/scripts/dartgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698