Merge "Basic code insertion points for javanano protocompiler plugins."
diff --git a/src/google/protobuf/compiler/javanano/javanano_file.cc b/src/google/protobuf/compiler/javanano/javanano_file.cc
index 98586b4..d8c5111 100644
--- a/src/google/protobuf/compiler/javanano/javanano_file.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_file.cc
@@ -171,6 +171,8 @@
       "package", java_package_);
   }
 
+  printer->Print("\n// @@protoc_insertion_point(imports_scope)\n");
+
   // Note: constants (from enums, emitted in the loop below) may have the same names as constants
   // in the nested classes. This causes Java warnings, but is not fatal, so we suppress those
   // warnings here in the top-most class declaration.
diff --git a/src/google/protobuf/compiler/javanano/javanano_message.cc b/src/google/protobuf/compiler/javanano/javanano_message.cc
index 732cae8..b639435 100644
--- a/src/google/protobuf/compiler/javanano/javanano_message.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_message.cc
@@ -232,6 +232,10 @@
         printer, lazy_init);
   }
 
+  // Insertion point for proto compiler plugins
+  printer->Print("\n// @@protoc_insertion_point(class_scope:$classname$)\n",
+                 "classname", descriptor_->full_name());
+
   // Constructor, with lazy init code if needed
   if (lazy_init && field_generators_.saved_defaults_needed()) {
     printer->Print(