You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Eshan Sudharaka <es...@gmail.com> on 2011/06/21 19:33:32 UTC

How to select reqired java classes which should be regenerate ?

Hi ,
  When we do some modifications cayenne-eclipse-editor (after save action
performed) it should regenerate required java classes.(with out regenerating
all java classes). For this matter i am referring CodeGeneratorController
class and there what is does is run a full Java class  generation ( in
generateAction ) . Now I am working on this.
-- 
*~Thanks & Regards~*
***
*
P.A.Eshan Sudharaka
Dept of Computer Science and Engineering
University of Moratuwa
Sri Lanka
http://esudharaka.blogspot.com/

Re: How to select reqired java classes which should be regenerate ?

Posted by Andrus Adamchik <an...@objectstyle.org>.
I think regenerating all classes for a given DataMap is a good start. 

Tracing individual entity changes is a bit more tricky. We don't have existing code to detect which entities need to be regenerated. One possible approach is to register a listener for EntityEvents/AttributeEvents/RelationshipEvents and trace all entities involved, and then use that list on save to figure out which classes need to be updated.

Andrus


On Jun 21, 2011, at 8:33 PM, Eshan Sudharaka wrote:
> Hi ,
>  When we do some modifications cayenne-eclipse-editor (after save action
> performed) it should regenerate required java classes.(with out regenerating
> all java classes). For this matter i am referring CodeGeneratorController
> class and there what is does is run a full Java class  generation ( in
> generateAction ) . Now I am working on this.
> -- 
> *~Thanks & Regards~*
> ***
> *
> P.A.Eshan Sudharaka
> Dept of Computer Science and Engineering
> University of Moratuwa
> Sri Lanka
> http://esudharaka.blogspot.com/


Re: How to select reqired java classes which should be regenerate ?

Posted by Robert Zeigler <ro...@roxanemy.com>.
Right. Sorry, I caught that after sending my reply.  Running a few fries short of a happy meal today.

Robert

On Jun 21, 2011, at 6/2112:53 PM , Eshan Sudharaka wrote:

> Actually what i want is to do it in  code level. Automate this class
> generation once we do modifications on xml files . I am creating a eclipse
> pluging for cayenne modeler (integration plugin).
> 
> On Tue, Jun 21, 2011 at 11:15 PM, Robert Zeigler <
> robert.zeigler@puregumption.com> wrote:
> 
>> In the "Code Generation" dialog, there are two tabs "Code Generator" and
>> "Entities".  On the "Entities" tab, you can select which entities to
>> generate.
>> Also, if you select a particular object entity in the modeler, and then
>> tools->generate classes, the selected entity will be the only entity checked
>> for code generation by default.
>> 
>> Robert
>> 
>> On Jun 21, 2011, at 6/2112:33 PM , Eshan Sudharaka wrote:
>> 
>>> Hi ,
>>> When we do some modifications cayenne-eclipse-editor (after save action
>>> performed) it should regenerate required java classes.(with out
>> regenerating
>>> all java classes). For this matter i am referring CodeGeneratorController
>>> class and there what is does is run a full Java class  generation ( in
>>> generateAction ) . Now I am working on this.
>>> --
>>> *~Thanks & Regards~*
>>> ***
>>> *
>>> P.A.Eshan Sudharaka
>>> Dept of Computer Science and Engineering
>>> University of Moratuwa
>>> Sri Lanka
>>> http://esudharaka.blogspot.com/
>> 
>> 
> 
> 
> -- 
> *~Thanks & Regards~*
> ***
> *
> P.A.Eshan Sudharaka
> Dept of Computer Science and Engineering
> University of Moratuwa
> Sri Lanka
> http://esudharaka.blogspot.com/


Re: How to select reqired java classes which should be regenerate ?

Posted by Eshan Sudharaka <es...@gmail.com>.
Actually what i want is to do it in  code level. Automate this class
generation once we do modifications on xml files . I am creating a eclipse
pluging for cayenne modeler (integration plugin).

On Tue, Jun 21, 2011 at 11:15 PM, Robert Zeigler <
robert.zeigler@puregumption.com> wrote:

> In the "Code Generation" dialog, there are two tabs "Code Generator" and
> "Entities".  On the "Entities" tab, you can select which entities to
> generate.
> Also, if you select a particular object entity in the modeler, and then
> tools->generate classes, the selected entity will be the only entity checked
> for code generation by default.
>
> Robert
>
> On Jun 21, 2011, at 6/2112:33 PM , Eshan Sudharaka wrote:
>
> > Hi ,
> >  When we do some modifications cayenne-eclipse-editor (after save action
> > performed) it should regenerate required java classes.(with out
> regenerating
> > all java classes). For this matter i am referring CodeGeneratorController
> > class and there what is does is run a full Java class  generation ( in
> > generateAction ) . Now I am working on this.
> > --
> > *~Thanks & Regards~*
> > ***
> > *
> > P.A.Eshan Sudharaka
> > Dept of Computer Science and Engineering
> > University of Moratuwa
> > Sri Lanka
> > http://esudharaka.blogspot.com/
>
>


-- 
*~Thanks & Regards~*
***
*
P.A.Eshan Sudharaka
Dept of Computer Science and Engineering
University of Moratuwa
Sri Lanka
http://esudharaka.blogspot.com/

Re: How to select reqired java classes which should be regenerate ?

Posted by Robert Zeigler <ro...@puregumption.com>.
In the "Code Generation" dialog, there are two tabs "Code Generator" and "Entities".  On the "Entities" tab, you can select which entities to generate.
Also, if you select a particular object entity in the modeler, and then tools->generate classes, the selected entity will be the only entity checked for code generation by default.

Robert

On Jun 21, 2011, at 6/2112:33 PM , Eshan Sudharaka wrote:

> Hi ,
>  When we do some modifications cayenne-eclipse-editor (after save action
> performed) it should regenerate required java classes.(with out regenerating
> all java classes). For this matter i am referring CodeGeneratorController
> class and there what is does is run a full Java class  generation ( in
> generateAction ) . Now I am working on this.
> -- 
> *~Thanks & Regards~*
> ***
> *
> P.A.Eshan Sudharaka
> Dept of Computer Science and Engineering
> University of Moratuwa
> Sri Lanka
> http://esudharaka.blogspot.com/