Reputation: 24248
I am investigating large project that uses FreeMarker. I am newbie to FreeMarker. How I can find which classes of java are used to receive values for templates? Investigate all project seems enormous work. Thanks. May be need some plugins for Eclipse?
Upvotes: 1
Views: 219
Reputation: 31122
FreeMarker is a typical "dynamic language", which means refactoring/changing is hard. The templates don't declare what they expect to be in the data-model. Furthermore, when a template tries to read a value from the data-model, like with ${foo.bar}
, it could mean foo.get("bar")
or foo.getBar()
or whatever the ObjectWrapper
used makes possible, and it's only decided when the template is executed. Certainly you will need to fall back to good-old search-and-replace and lot of testing (a good test suite is essential...) if you change something. And of course, you could look at the place in the program where the data-model is built, and see what was put into it. Or dump the data-model somehow on runtime.
Upvotes: 2