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

Unified Diff: lib/file_generator.dart

Issue 131943002: Handle protocol buffer messages with no package (Closed) Base URL: https://github.com/dart-lang/dart-protoc-plugin.git@master
Patch Set: Fix bug and updte version Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Makefile ('k') | lib/protobuf_field.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/file_generator.dart
diff --git a/lib/file_generator.dart b/lib/file_generator.dart
index 9dc674e963de13321eb08887cf2a542e10fe4540..982a8131dfee9acd3c87c0f1f779f461327537c7 100644
--- a/lib/file_generator.dart
+++ b/lib/file_generator.dart
@@ -133,7 +133,7 @@ class FileGenerator extends ProtobufContainer {
// package name.
FileGenerator fileGenerator = _context.lookupFile(import);
out.print("import '${_generatedFilePath(relativeProtoPath)}'");
- if (package != fileGenerator.package) {
+ if (package != fileGenerator.package && !fileGenerator.package.isEmpty) {
out.print(' as ${fileGenerator.packageImportPrefix}');
}
out.println(';');
« no previous file with comments | « Makefile ('k') | lib/protobuf_field.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698