uɐʎɹ ррoʇ uɐʎɹ bio photo

uɐʎɹ ррoʇ uɐʎɹ

Hello. Is is me you're looking for?
僕は猿ーロボット。
robotic life signs.
makes noise, hears sounds, intafon.
affe auf deux roues.

Email Twitter Github Github Gist Last.fm Soundcloud Flickr

There seems to be a problem with the Class creation wizard in the FDT plug-in for Eclipse. If you change the Class template using the Eclipse template editor, the changes do not go into effect for Wizard. That is to say, if you create a class using the FDT Class wizard, the template changes do not carry over; if you open an empty class file, however, and use the content assist, the new class code block that is inserted is whatever you change it to in the template editor. To get around this, do the following.

First, change the template to what you want it to be in the template editor. Then, copy everything except for the last 2 lines (which should be something like:

class ${enclosing_package_and_type} ${cursor}{ }

(To get to the editor, go to preferences/FDT/Editor/Templates) Now, go into your eclipse/plugins/com.pf.fdt_1.0.4/templates folder.

Open the file code codeTemplates.xml, and in the typecomment node, paste the text that you copied into the node value where it should currently say ::

/** * @author ${user} */

I replaced it with the code (for example)::

/** * ${enclosing_type} * @author – Ryan Todd * * AUTHOR :: Ryan Todd * AUTHOR SITE :: http://www.plasticstare.com/ * CREATED :: ${date} * DESCRIPTION :: * */

The @author is in there for the javadocs, and the ${date} is nice for inserting the creation date…

Now save codeTemplates.xml, quit and restart Eclipse. I’m not sure it this messes anything else up, but this is what I had to do in order to make the template I wanted to show up when creating a new class through the class creation wizard.

On the other hand, if you do change the class template and create a new class, like I said above, you can delete the inserted code and then use the code completion to insert the new class code and it will insert the template text that you put in using the template editor (which changes that text in the templates.xml file).

As an added note, you can also set FDT to overwrite the default ${user} variable in your templates in the FDT templates preference panel.