Template, or Plug-In, or impossible?

I've developed a CAD program using Java/Swing under Eclipse. The items that you work with in the CAD program are called blocks. Of course each one is a separate class. Sometimes a block has a control panel that the user can access to change some of the attributes of the block. The control panel and block classes are aware of each other and exchange information via set/get in the block. Finally, each block gets added to the main program's menu in order to be selected for insertion into the current design.

So, each new block has 2 or 3 classes that need to be dealt with.

block - is aware of control panel, if it exists

control panel (optional) - is aware of block

main (add to menu) - is aware of block

In addition, much of the time, one of the block's methods will want to import some Java code that is generated by a different process. This is done at compile time, not run time. This process starts with some assembler type code which is then converted into Java. Hard to explain what's going on, but the details are not important other than to say that what I'd like to specify in my model is whether or not this translation needs to occur and if so, what is the source file?

I am doing all of this manually now and not only is it really tedious but as you might imagine it is a bit error prone even if I copy/paste most of the code from existing classes.

I read about templates and saw that they could be used for little repetitive tasks like creating set/get methods. However what I'm trying to do is quite a bit more complex. I looked briefly at an Eclipse plug-in development tutorial and I can't tell whether that is a better approach for what I have in mind.