You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Paul Spencer <pa...@apache.org> on 2005/12/13 11:49:38 UTC

Code generation documentation?

Where can I find documentation on the code generation used by MyFaces? 
As an example, 
tomahawk/src/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java 
  contains generated code.  The file HtmlInputCalendar.xml appears to be 
used by the code generator.

What else is being generated by HtmlInputCalendar.xml?

Paul Spencer

Re: Code generation documentation?

Posted by Manfred Geiler <ma...@gmail.com>.
2005/12/13, Bruno Aranda <br...@gmail.com>:
> I would not worry about the code generation then. It is only used to
> create the component at the beginning, but after that it is not useful
> again.
It IS useful later as well. At least that's the idea behind these
"GENERATED CODE BEGIN" sections. ;-)
Whenever the implementation template(s) for the generated code change
(it definitly WILL change for JSF 1.2 state saving for instance!) we
can re-generate the code for all components. Yes, code generation is
currently not working. I will try to have an eye on it as soon as
possible, but I fear this will not happen before the new year has
begun.

Manfred

Re: Code generation documentation?

Posted by Bruno Aranda <br...@gmail.com>.
I would not worry about the code generation then. It is only used to
create the component at the beginning, but after that it is not useful
again. But, to do things as have been done in other components, put
the code before the generated code line warning. And that's all :-).
Thanks,

//  ------------------ GENERATED CODE BEGIN (do not modify!)
--------------------

Regards,

Bruno


2005/12/13, Paul Spencer <pa...@apache.org>:
> Mike,
> o My question was prompted by an attempt to apply a patch for the
> Schedule component.  I noticed comments in the code from a code generator.
>
> o I assume that any patches that add code should do so outside of the
> generated sections.
>
> o I assume that patches to generated code may become "unpatched" once
> the generator is fixed.
>
> o It is unlikely that I will have time to work on the code generator.
>
> o The correct URL is
> https://svn.apache.org/repos/asf/myfaces/legacy/tags/before_svn_reorg/src/codegen/org/apache/myfaces/codegen/
>
> Paul Spencer
>
>
> Mike Kienenberger wrote:
> > Code generation isn't currently used.   Some of us have talked about
> > bringing it back, but we haven't gotten around to doing so yet.
> > Right now you have to grab it from
> > https://svn.apache.org/repos/asf/myfaces/impl/tags/before_svn_reorg
> > (I think that's the correct tag.)   I'm sure a bunch of us would
> > appreciate it if you provided patches for gettings this back into the
> > current svn :-)
> >
> > On 12/13/05, Paul Spencer <pa...@apache.org> wrote:
> >
> >>Where can I find documentation on the code generation used by MyFaces?
> >>As an example,
> >>tomahawk/src/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java
> >>  contains generated code.  The file HtmlInputCalendar.xml appears to be
> >>used by the code generator.
> >>
> >>What else is being generated by HtmlInputCalendar.xml?
> >>
> >>Paul Spencer
> >>
> >
> >
>
>

Re: Code generation documentation?

Posted by Paul Spencer <pa...@apache.org>.
Mike,
o My question was prompted by an attempt to apply a patch for the 
Schedule component.  I noticed comments in the code from a code generator.

o I assume that any patches that add code should do so outside of the 
generated sections.

o I assume that patches to generated code may become "unpatched" once 
the generator is fixed.

o It is unlikely that I will have time to work on the code generator.

o The correct URL is
https://svn.apache.org/repos/asf/myfaces/legacy/tags/before_svn_reorg/src/codegen/org/apache/myfaces/codegen/

Paul Spencer


Mike Kienenberger wrote:
> Code generation isn't currently used.   Some of us have talked about
> bringing it back, but we haven't gotten around to doing so yet.  
> Right now you have to grab it from
> https://svn.apache.org/repos/asf/myfaces/impl/tags/before_svn_reorg 
> (I think that's the correct tag.)   I'm sure a bunch of us would
> appreciate it if you provided patches for gettings this back into the
> current svn :-)
> 
> On 12/13/05, Paul Spencer <pa...@apache.org> wrote:
> 
>>Where can I find documentation on the code generation used by MyFaces?
>>As an example,
>>tomahawk/src/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java
>>  contains generated code.  The file HtmlInputCalendar.xml appears to be
>>used by the code generator.
>>
>>What else is being generated by HtmlInputCalendar.xml?
>>
>>Paul Spencer
>>
> 
> 


Re: Code generation documentation?

Posted by Bruno Aranda <br...@gmail.com>.
I see that the build-codegen.xml and  codegen.properties are already
in the myfaces/build folder, but I don't find the ant task class
org.apache.myfaces.codegen.component.ComponentGeneratorTask in the
current structure (I guess it is in the legacy code before the svn
reorganization). So it is only necessary to bring the sources for that
class again and put it somewhere...

Regards,

Bruno

2005/12/13, Mike Kienenberger <mk...@gmail.com>:
> Code generation isn't currently used.   Some of us have talked about
> bringing it back, but we haven't gotten around to doing so yet.
> Right now you have to grab it from
> https://svn.apache.org/repos/asf/myfaces/impl/tags/before_svn_reorg
> (I think that's the correct tag.)   I'm sure a bunch of us would
> appreciate it if you provided patches for gettings this back into the
> current svn :-)
>
> On 12/13/05, Paul Spencer <pa...@apache.org> wrote:
> > Where can I find documentation on the code generation used by MyFaces?
> > As an example,
> > tomahawk/src/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java
> >   contains generated code.  The file HtmlInputCalendar.xml appears to be
> > used by the code generator.
> >
> > What else is being generated by HtmlInputCalendar.xml?
> >
> > Paul Spencer
> >
>

Re: Code generation documentation?

Posted by Mike Kienenberger <mk...@gmail.com>.
Code generation isn't currently used.   Some of us have talked about
bringing it back, but we haven't gotten around to doing so yet.  
Right now you have to grab it from
https://svn.apache.org/repos/asf/myfaces/impl/tags/before_svn_reorg 
(I think that's the correct tag.)   I'm sure a bunch of us would
appreciate it if you provided patches for gettings this back into the
current svn :-)

On 12/13/05, Paul Spencer <pa...@apache.org> wrote:
> Where can I find documentation on the code generation used by MyFaces?
> As an example,
> tomahawk/src/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java
>   contains generated code.  The file HtmlInputCalendar.xml appears to be
> used by the code generator.
>
> What else is being generated by HtmlInputCalendar.xml?
>
> Paul Spencer
>