| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /// **docgen** is a tool for creating machine readable representations of Dart | 5 /// **docgen** is a tool for creating machine readable representations of Dart |
| 6 /// code metadata, including: classes, members, comments and annotations. | 6 /// code metadata, including: classes, members, comments and annotations. |
| 7 /// | 7 /// |
| 8 /// docgen is run on a `.dart` file or a directory containing `.dart` files. | 8 /// docgen is run on a `.dart` file or a directory containing `.dart` files. |
| 9 /// | 9 /// |
| 10 /// $ dart docgen.dart [OPTIONS] [FILE/DIR] | 10 /// $ dart docgen.dart [OPTIONS] [FILE/DIR] |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 * project and the other content is removed. | 678 * project and the other content is removed. |
| 679 */ | 679 */ |
| 680 static String get viewerCodePath { | 680 static String get viewerCodePath { |
| 681 if(_viewerCodePath == null) { | 681 if(_viewerCodePath == null) { |
| 682 var pubspecFileName = 'pubspec.yaml'; | 682 var pubspecFileName = 'pubspec.yaml'; |
| 683 | 683 |
| 684 var thePath = _dartdocViewerDir.path; | 684 var thePath = _dartdocViewerDir.path; |
| 685 | 685 |
| 686 if(!FileSystemEntity.isFileSync(path.join(thePath, pubspecFileName))) { | 686 if(!FileSystemEntity.isFileSync(path.join(thePath, pubspecFileName))) { |
| 687 thePath = path.join(thePath, 'client'); | 687 thePath = path.join(thePath, 'client'); |
| 688 print('trying the fallback: $thePath'); | |
| 689 if (!FileSystemEntity.isFileSync(path.join(thePath, pubspecFileName))) { | 688 if (!FileSystemEntity.isFileSync(path.join(thePath, pubspecFileName))) { |
| 690 throw new StateError('Could not find a pubspec file'); | 689 throw new StateError('Could not find a pubspec file'); |
| 691 } | 690 } |
| 692 } | 691 } |
| 693 | 692 |
| 694 _viewerCodePath = thePath; | 693 _viewerCodePath = thePath; |
| 695 } | 694 } |
| 696 return _viewerCodePath; | 695 return _viewerCodePath; |
| 697 } | 696 } |
| 698 | 697 |
| (...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2233 .map((e) => originalMirror.getField(e.simpleName).reflectee) | 2232 .map((e) => originalMirror.getField(e.simpleName).reflectee) |
| 2234 .where((e) => e != null) | 2233 .where((e) => e != null) |
| 2235 .toList(); | 2234 .toList(); |
| 2236 } | 2235 } |
| 2237 | 2236 |
| 2238 Map toMap() => { | 2237 Map toMap() => { |
| 2239 'name': Indexable.getDocgenObject(mirror, owningLibrary).docName, | 2238 'name': Indexable.getDocgenObject(mirror, owningLibrary).docName, |
| 2240 'parameters': parameters | 2239 'parameters': parameters |
| 2241 }; | 2240 }; |
| 2242 } | 2241 } |
| OLD | NEW |