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

Side by Side Diff: lib/code_generator.dart

Issue 2103743002: Rename mixin protos and add a check for undefined mixin name (Closed) Base URL: git@github.com:dart-lang/dart-protoc-plugin.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | lib/file_generator.dart » ('j') | lib/file_generator.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 part of protoc; 5 part of protoc;
6 6
7 abstract class ProtobufContainer { 7 abstract class ProtobufContainer {
8 String get package; 8 String get package;
9 String get classname; 9 String get classname;
10 String get fqname; 10 String get fqname;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 List<FileGenerator> generators = <FileGenerator>[]; 56 List<FileGenerator> generators = <FileGenerator>[];
57 for (FileDescriptorProto file in request.protoFile) { 57 for (FileDescriptorProto file in request.protoFile) {
58 generators.add(new FileGenerator(file)); 58 generators.add(new FileGenerator(file));
59 } 59 }
60 60
61 // Collect field types and importable files. 61 // Collect field types and importable files.
62 link(options, generators); 62 link(options, generators);
63 63
64 // Generate the .pb.dart file if requested. 64 // Generate the .pb.dart file if requested.
65 for (var gen in generators) { 65 for (var gen in generators) {
66 var name = gen._fileDescriptor.name; 66 var name = gen.descriptor.name;
67 if (request.fileToGenerate.contains(name)) { 67 if (request.fileToGenerate.contains(name)) {
68 response.file.addAll(gen.generateFiles(config)); 68 response.file.addAll(gen.generateFiles(config));
69 } 69 }
70 } 70 }
71 _streamOut.add(response.writeToBuffer()); 71 _streamOut.add(response.writeToBuffer());
72 }); 72 });
73 } 73 }
74 74
75 String get package => ''; 75 String get package => '';
76 String get classname => null; 76 String get classname => null;
77 String get fqname => ''; 77 String get fqname => '';
78 get fileGen => null; 78 get fileGen => null;
79 } 79 }
OLDNEW
« no previous file with comments | « no previous file | lib/file_generator.dart » ('j') | lib/file_generator.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698