L.S.,
I have added a patch for the code generator, allowing it to use
_ComponentUtils' methods whenever appropriate. There were still some
differences between the generated code and the code in the repository
after doing this. Almost all files are affected by the code generation
process in terms of whitespace usage, but there were also some manual
changes in the generated code blocks. The patch also includes a
solution for all these changes, either by providing an updated XML
definition file or by adding/removing methods from the generated code
block in the source file itself.
If someone has the time to validate this patch file, please let me know
what has to be changed/added in order for it to be useful for the
MyFaces project.
Regards,
Gert Vanthienen
[EMAIL PROTECTED]
Mike Kienenberger wrote:
On 9/11/06, Gert Vanthienen <[EMAIL PROTECTED]> wrote:
Apparently, I misunderstood the information in Lance's mail: the SVN
version of the files contains the call to
_ComponentUtils.getStringValue(). Is there any reason why this method
is used for String values (and not for e.g. boolean or Object)?
If the call to _ComponentUtils.getStringValue() is no longer necessary,
the generated code is a rather good match to the code currently in SVN,
with the exception of some whitespace and comments. My suggestion would
be to move the comments to the top of the file and commit the
regenerated files after checking that there are no other semantic
changes.
I haven't looked at the code in a while, but I think the
_ComponentUtils methods explicitly typecasted to a String, boolean,
Integer, etc. It may also throw appropriate exceptions or log errors.
Basically, it's centralizing all operatings on a ValueBinding so
they only need to be changed in one place to change the behavior
everywhere.