[ANN] Generate toString() plugin v1.61 released

v1.61 of the toString() plugin has been released at the offical homepage for this plugin at:

http://www.intellij.org/twiki/bin/view/Main/ToStringPlugin

This version is only for the IDEA 4.x series.

This release was to fix a bug causing it not to work in a fresh installation (not upgrade)


About the plugin
================
GenerateToString is a action plugin for IDEA that is used to create or update java classes toString() method. The reason is valuebeans usually needs to dump their fieldvalues for debug purpose, and it's tedious to write the dump code for this. So this action plugin generates the code to dump all the fields in a simple manner.



Changelog:
==========
- Better description in plugin.xml and added to the offical IDEA plugin manager
- Fixed minor typo's in documentation
- Fixed bug in loading default Velocity Macro's (only happends during a fresh install of the plugin)
- Renamed package to org.intellij.idea.plugin.tostring
- Added FileUtil for file IO operations
- Defaults changed: not using qualified classname and filtering of constants fields enabled


/Claus

7 comments

Working on next release with simple template repository. Adding more information about classes/fields to the VC, better error msg. when a code generation happends so user easier can fix their velocity macro.

Shot if you have any ideas/suggestions to this plugin as I have a few moments now to enhance it.

/Claus

0

I need some help

Hi, I just installed the version 1.62 of this pluggin and it is my first experience with it.
But when I try to use it, I always have a popup windows with the following error message :
"Velocity error generating code - see IDEA console for more details null"

- I am using IDEA 4 build 1162 under Windows XP SP1
- The JDK of the project is SUN 1.4.2_03
- I have installed the pluggin through the pluggin manager.
- I don't know what is the console, the error message talk about, but I have checked in the log of the system directory of IDEA and found nothing (no error message)
- I have read the documentation on the home page of the pluggin.

So I don't know what else I can do but ask for some help.

Thanks in advance.

0

error generating code

It could be the velocity macro code that is used to generate the actual text for the public String toString() method, that are insterted into your java class.

You can see the velocity macro in the settings.

File -> Settings -> Generate toString()

In the textarea the code should be visible. Could you paste this code here on the forum. Otherwise you could try one of the other pre-build templates from the template dropdown box (Default StringBuffer etc.). Remember to click the activate button to use this template.

Enabling the console
The console can be enabled in IDEA. You have to edit a .lax file that are located in the idea\bin folder. Here you should write =console in some lines.

Something like:


I'm at home on a brand new PC without my java development environment setup, so I have no IDEA installed yet. Tomorrow at Work I can help you more.

I think IDEA also write whatever comes to the console to its logfile that you already have checked.

But the Exception should be thrown from Velocity and thus strong indicates there are something wrong with the templates.

/Claus

0

It is a bug in the plugin.

I am preparing a new release with a fix.

v1.62b for IDEA 4.x only
========================
- Fixed bug with clean installation of plugin causing NullPointerException when generating code.
- More debug info added.

0

A new version is uploaded v1.62b with a fix for this problem.

Unfortunately I can not any longer see my plugin in the pluginmanager. Someone rearranged the pluginlist and since then my plugin is gone.

You can download the new version from the offical homepage

http://www.intellij.org/twiki/bin/view/Main/ToStringPlugin


/Claus

0

Thanks for so much reactivity.

The version available from the homepage works perfectly.

Thanks again

Nicolas

0

Hi Nicolas

Thanks for reporting the error.

I need to do more testing before uploading a new version. Especially for upgrading from an older version. I usually just upgrade from the 2nd latest version to the newest and it works without glitches.

I noticed the GUI in the settings are a bit wrong again. The input fields are to small. Damm I really think Swing/AWT is awfull in setting up the UI.

Well I recon I have some time in the weekend if not C&C Generals steel all my time :)

0

Please sign in to leave a comment.