[ANN] - GenerateToString v3.11

v3.11 for IDEA 5.0x (feb-12-2005)
=================================
- Compiled with IDEA EAP build 3212 (Irida)
- Note: Templates supported in this version is not compatible with plugin v3.00 or older. To upgrade:
1) Uninstall plugin, 2) Start IDEA without this plugin, 3) Install plugin, 4) Restart IDEA
- Fixed ident of toString() in generate menu if user have installed a plugin that uses an icon in this menu (Copyright Plugin)
- Javadoc comments are now also parsed using Veloicty Template Macro (enables you to use $classname in javadoc)
- If the template has javadoc then any existing javadoc is replaced. If the tempalte does not have javadoc, existing javadoc is preserved

9 comments
Comment actions Permalink

Thanks for the update. I have not tried it but I have great confidence.

You didn't happen to add the equals() did you?

Norris Shelton
Sun Certified Java Programmer




Claus Ibsen wrote:

>v3.11 for IDEA 5.0x (feb-12-2005)
>=================================
>- Compiled with IDEA EAP build 3212 (Irida)
>- Note: Templates supported in this version is not compatible with plugin v3.00 or older. To upgrade:

1) Uninstall plugin, 2) Start IDEA without this plugin, 3) Install plugin, 4) Restart IDEA

>- Fixed ident of toString() in generate menu if user have installed a plugin that uses an icon in this menu (Copyright Plugin)
>- Javadoc comments are now also parsed using Veloicty Template Macro (enables you to use $classname in javadoc)
>- If the template has javadoc then any existing javadoc is replaced. If the tempalte does not have javadoc, existing javadoc is preserved
>

>

0
Comment actions Permalink

Still an issue with the ident. It looks like it assumes that coyright
(or something with an image) is there.

Norris Shelton
Sun Certified Java Programmer




Claus Ibsen wrote:

>v3.11 for IDEA 5.0x (feb-12-2005)
>=================================
>- Compiled with IDEA EAP build 3212 (Irida)
>- Note: Templates supported in this version is not compatible with plugin v3.00 or older. To upgrade:

1) Uninstall plugin, 2) Start IDEA without this plugin, 3) Install plugin, 4) Restart IDEA

>- Fixed ident of toString() in generate menu if user have installed a plugin that uses an icon in this menu (Copyright Plugin)
>- Javadoc comments are now also parsed using Veloicty Template Macro (enables you to use $classname in javadoc)
>- If the template has javadoc then any existing javadoc is replaced. If the tempalte does not have javadoc, existing javadoc is preserved
>

>



Attachment(s):
moz-screenshot.jpg
0
Comment actions Permalink

The javadoc expansion works correctly. One minor issue with spacing.
It came out as this:
/**

  • Displays the current state of the EyeColor object.

  • @return a string representation of the EyeColor object.

*/

when it should have been:
/**

  • Displays the current state of the EyeColor object.

  • @return a string representation of the EyeColor object.

*/


I checked the template and it has:
/**

  • Displays the current state of the $classname object.

  • @return a string representation of the $classname object.

*/
public String toString() {

#if ( $members.size() > 0 )

#set ( $i = 0 )

return "$classname{[$Revision$]" +

#foreach( $member in $members )

#if ( $i == 0 )

"##

#else

", ##

#end

#if ( $member.objectArray )

$member.name=" + ($member.accessor == null ? null :
Arrays.asList($member.accessor)) +

#elseif ( $member.string )

$member.name='" + $member.accessor + "'" +

#else

$member.name=" + $member.accessor +

#end

#set ( $i = $i + 1 )

#end

"}";

#else

/**

  • Displays the current state of the $classname object.

  • @return a string representation of the $classname object.

*/
return "$classname{}";

#end

}

Norris Shelton
Sun Certified Java Programmer




Claus Ibsen wrote:

>v3.11 for IDEA 5.0x (feb-12-2005)
>=================================
>- Compiled with IDEA EAP build 3212 (Irida)
>- Note: Templates supported in this version is not compatible with plugin v3.00 or older. To upgrade:

1) Uninstall plugin, 2) Start IDEA without this plugin, 3) Install plugin, 4) Restart IDEA

>- Fixed ident of toString() in generate menu if user have installed a plugin that uses an icon in this menu (Copyright Plugin)
>- Javadoc comments are now also parsed using Veloicty Template Macro (enables you to use $classname in javadoc)
>- If the template has javadoc then any existing javadoc is replaced. If the tempalte does not have javadoc, existing javadoc is preserved
>

>

0
Comment actions Permalink

Hi Norris

1: What do you mean that I should add equals()?

2:
The ident was fixed on my computer by using an empty icon that I found in a IDEA .jar file.

Okay now I need to handle if you haven't installed this copyright plugin. Damm how does IDEA ident? I will see what I can do. Anyone got a clue how to handle this? In the next version I will remove the ident so it will be as before if I don't get a solution.


3:
I will check on the javadoc. I recon IDEA isn't formatting the javadoc properly - I use some API to execute a reformat.

0
Comment actions Permalink

There is an equals() under generate. I could not find a template for it
and was wondering if it is made available through your plugin.

Norris Shelton
Sun Certified Java Programmer




Claus Ibsen wrote:

>Hi Norris
>
>1: What do you mean that I should add equals()?
>
>2:
>The ident was fixed on my computer by using an empty icon that I found in a IDEA .jar file.
>
>Okay now I need to handle if you haven't installed this copyright plugin. Damm how does IDEA ident? I will see what I can do. Anyone got a clue how to handle this? In the next version I will remove the ident so it will be as before if I don't get a solution.
>
>
>3:
>I will check on the javadoc. I recon IDEA isn't formatting the javadoc properly - I use some API to execute a reformat.

>

0
Comment actions Permalink

Hi Norris

No equals() has nothing to do with my plugin. I only add one menu item to this menu and it's named toString().

I think I got the javadoc ident problem fixed. Now I am looking into another problem with javadoc not being picked up when IDEA just have started.

The other ident problem I dont have a clue how to fix it. It is clearly that IDEA's own menu items knows how to ident themselves. But my menu item toString() is added using the plugin.xml file.

0
Comment actions Permalink

Okay v3.12 is out with this fix

0
Comment actions Permalink

Hi Claus,

The other ident problem I dont have a clue how to fix
it. It is clearly that IDEA's own menu items knows
how to ident themselves. But my menu item toString()
is added using the plugin.xml file.


I don't have this issue with a plug-in that I've been messing with. If I
change your plugin.xml from :

    
    

]]>

to :

    

]]>

then your to_String() label indents properly (version 3.12 of your plug-in, IDEA build 3212, with the Copyright
plug-in installed). I based my plugin.xml on one of Rick Maddy's, IIRC.

0
Comment actions Permalink

Hi Mark

Thanks for the info how to fix the ident. It will be in the next version.

/Claus

0

Please sign in to leave a comment.