How does a plugin code generation work?

See also: