Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loop over fields in eclipse code template

Can you do loops in code templates, e.g I want to print all the fields in a class. Is there a template for that?

like image 347
fastcodejava Avatar asked Apr 11 '10 08:04

fastcodejava


1 Answers

Assuming you're talking about Java > Editor > Templates a reference (maybe outdated) is here

This SO question useful-eclipse-java-code-templates containes some examples.

To iterate over class members using a toString() style generator you may find this useful: toString() Generator: Format Templates

like image 147
stacker Avatar answered Sep 30 '22 19:09

stacker