In the accepted answer to this SO question there is an explanation about structural annotations, a way to customize the data on the EDMX files generated by the Entity Framework designer. This feature is used by the Portable Extensible Metadata framework in order to add validation information to the entities defined in an EF model, by adding extra entries to the "Properties" window of the created entities and its properties.
My question is: what should I do if I want to create my own custom structural annotations engine? That is, I want Visual Studio to show some extra entries in the properties window for the EF entities; and I want to integrate my own code with the EDMX code generator in order to generate structural annotations. I guess that I need to create a Visual Studio extension but apart from this, I could not find any further information anywhere else. Where should I look for information on this subject?