[apt-jelly-users] Usability suggestion for Eclipse IDE context
Brought to you by:
stoicflame
|
From: KLM <kl...@us...> - 2006-08-03 10:42:33
|
Thanks for the nice features of Apt-Jelly.
I have a hard time though, setting up a productive environment for
writing templates using :
Eclipse + Freemarker IDE plugin + FreeMarker + Apt-Jelly + Ant 1.7.
My environment doesn't seem to be stable, and produce erratic
behavior. I don't know what software is responsible for what concern
...
The following need of mine is very general, so I suggest to have it
bundled with the Apt-Jelly download (or next to it, or with the
Eclipse Freemarker IDE plugin).
-----------------------
In the Eclipse IDE plugin, I want to specify many Apt-Jelly classes as
a context at the project level. This enables all (Apt-Jelly +
freemarker) templates in the project to enjoy completion, in two ways
:
1. it helps me follow a common naming convention for variable names
(according to their type only, which is far from perfect but is
already something). This improves maintainability, especially in our
case where I won't be the one maintaining them.
2. given a variable with such a constrained name, the IDE lists the
possible completions after a dot, which dramatically changes the
learning curve, reduces typos, and somehow speeds things up.
Note : The IDE seems to deduce the context from the getters of the
class or interface configured. These classes need no implementation,
although the real class should be just fine also.
--------------------
Example :
Setup :
register the variable name "classType"
to class "net.sf.jelly.apt.decorations.type.DecoratedClassType"
Benefit 1 : in the template, typing "${cl" triggers the suggestion for
"${classType", validated with Enter.
Benefit 2 : in the template, the string "${classType." will list
suggestions, along with their java type :
* declaration - com.sun.mirror.declaration.ClassDeclaration
* superclass - com.sun.mirror.type.ClassType
* class - boolean
* actualTypeArguments - java.util.Collection
* ...
----------------------
Problems : as I wrote earlier, my environment is not stable, and many
aspects don't work as expected.
I sure wish I could use this feature out of the box ! :-)
I suppose other people have the same need (maybe most Apt-Jelly +
Freemarker + Eclipse users ?)
|