[Eap-features] Re: Code Generation Request

2002-06-03 Thread Alain Ravet
Glen Stampoutlzis wrote: >>... make objects canonical. >>In the meantime, I solved this with a doclet. Not perfect, but good >>enough. > Is this something you can share? Perhaps upload it to www.intellij.org? Done : http://www.intellij.org/twiki/bin/view/Main/CanonicizerDoclet Alain _

[Eap-features] Re: Code Generation Request

2002-06-03 Thread dimiter
The OutlookExpress wrapped the souce, so I posted the code to http://www.intellij.org/twiki/bin/view/Main/LiveTemplateContribs feel free to modify it on the wiki "dimiter" <[EMAIL PROTECTED]> wrote in message adfdql$um6$[EMAIL PROTECTED]">news:adfdql$um6$[EMAIL PROTECTED]... > Here you are: > >

[Eap-features] Re: Code Generation Request

2002-06-03 Thread dimiter
Here you are: public String toString() { try { StringBuffer sb = new StringBuffer(super.toString()); Field[] fields = this.getClass().getDeclaredFields(); for (int i = 0; i < fields.length; i++) { sb.append(" ").append(fields[i].get

[Eap-features] Re: Code Generation Request

2002-06-03 Thread dimiter
Later today I'll post live template for making canonical class using reflection. The code is not that simple, but it has the advantage that you don't have to modify it when new members are added. -- dimiter "Alain Ravet" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTEC

[Eap-features] Re: Code Generation Request

2002-06-03 Thread Alain Ravet
dimiter wrote: > At least for me these generated methods don't add any value. Ever written this code for 5 15+ field classes, that map objects to DB data? Pretty boring, and error prone. > If I want equals I prefer to write it myself and to determine precisely > which variable

[Eap-features] Re: Code Generation Request

2002-06-03 Thread dimiter
I've seen live template inserting generic implementation for equals() using reflection. I could imagine the same for hashCode and toString. At least for me these generated methods don't add any value. If I want equals I prefer to write it myself and to determine precisely which variables define t

[Eap-features] Re: Code Generation Request

2002-06-03 Thread Alain Ravet
Glen Stampoutlzis wrote: > Is this something you can share? Perhaps upload it to www.intellij.org? I will upload it tomorrow, under "DocletContributions". Alain > -- > Glen Stampoultzis (TriNexus Pty Ltd) > Fixed:+61 3 9753-6850 Mob:+61 (0)402 835 458 > ICQ: 62722370EMail:

[Eap-features] Re: Code Generation Request

2002-06-02 Thread Glen Stampoutlzis
Is this something you can share? Perhaps upload it to www.intellij.org? Regards, -- Glen Stampoultzis (TriNexus Pty Ltd) Fixed:+61 3 9753-6850 Mob:+61 (0)402 835 458 ICQ: 62722370EMail: [EMAIL PROTECTED] Visit: http://jakarta.apache.org/poi, http://www.krysalis.org "Alain Ravet" <

[Eap-features] Re: Code Generation Request

2002-06-02 Thread Pete Hendry
+1 although perhaps just the generation to start with - round-tripping could be complex but simple generation should be fairly trivial. Pete Alain Ravet wrote: > +5 > This is an old request - and battle - : make objects canonical. > > In the meantime, I solved this with a doclet. Not perfect,

[Eap-features] Re: Code Generation Request

2002-06-02 Thread Pavel Bernshtam
+3 "Alain Ravet" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > +5 > This is an old request - and battle - : make objects canonical. > > In the meantime, I solved this with a doclet. Not perfect, but good enough. > Integration would be better, though. > > Alain Ravet > > Martin