Before I continue keep in mind that I’m not using code engineering myself. Although I always do my best to ensure that my answers are correct I can always get things wrong here and there
Well, the code engineering process is explained in the handbook; when in doubt that’s always a good source of information to use.
You can only apply code engineering to a specific set of UML diagrams (class, package and sequence in particular if I’m not mistaken) but that code never becomes part of your project. Only the diagrams and their elements.
When working on such a diagram you can select the option through tools => code => reverse engineering, after which a dialog will be shown in which you can paste your code for processing. After that VP will generate the required model elements and that’s basically all there is to it.
Hope this can give you some ideas.