Sorry if this question has already been covered many times.
Are there rules for adding (concrete places) your own code to automatically generated sources?
It seems to be most obviosly method: to any place, without violating the boundaries of special tags in the comments.
However, I believe that there is a better way.
Thank you.