Derive a class from the CodeEmitter class in the TaskPerformers project (code is in the SDK) .
In there, override the perform method. Then in your override, grab this list:
executingGenerator.Entities.
Filter that list on the entities you want to execute the template on. Keep the original contents of the list in an arraylist around.
call the base class' Perform method.
when you come back, restore the original contents of the executingGenerator.Entities collection.
In the generator config task definition, instead of specifying CodeEmitter as the class to execute, you specify your derived class. That's it.