[ANN] Generate toString() plugin v2.18 released

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

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

Or using the pluginmanager from within IDEA 4.x/4.5x.

This version supports the new EAP build 2178, IDEA 4.x and IDEA 3.x as well (not compiled for this yet, but v2.12 is avail for 3.x).

For a release supporting IDEA 3.x download it from the official homepage. The IDEA pluginmanager is only a feature in IDEA 4.x/4.5x.


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.

v2.18 for IDEA 3.0x/4.0x/4.5 (jul-9-2004)
=========================================
- Compiled with IDEA EAP build 2178 (Pallada)
- Fixed bug to detect IDEA version for build 2178, now assuming IDEA 4.x/4.5x series as default to avoid problems if JetBrains changes name pattern in the future.
- Fixed bug to autosave templates in plugin folder for build 2178 - now moved to USER_HOME\.IntelliJIdea\config\plugins\tostring-plugin


There was some problem uploading a version for IDEA 4.x since this 'since-build' stuff by JetBrains. I got a mail from a JetBrain employee who will sort it out. You can download the .jar and source from the wiki homepage.
The EAP build is there with the .... for IDEA 4.5x name.


/Claus, the author

5 comments
Comment actions Permalink

On Fri, 09 Jul 2004 17:40:03 +0400, Claus Ibsen wrote:

- Fixed bug to autosave templates in plugin folder for build 2178 - now
moved to USER_HOME\.IntelliJIdea\config\plugins\tostring-plugin


I think you should use the idea.plugins.path property to construct the
path. What you've used above doesn't exist on my box, for example.

--
Mark Scott
mark@codebrewer.com

0
Comment actions Permalink

The idea.plugins.path?

Can you explain a bit more about this property?

/Claus

0
Comment actions Permalink

On Mon, 12 Jul 2004 14:00:57 +0400, Claus Ibsen wrote:

The idea.plugins.path?

Can you explain a bit more about this property?


Sure. This property identifies the directory from which IDEA will load
non-system plugins (those that a user installs manually or using the
plugin manager). Its value is passed to IDEA by the launcher (which is
either a batch file, shell script or InstallAnywhere launcher, depending
on how you start IDEA).

The default value assigned to idea.plugins.path is IDEA_HOME/plugins, but
this can be overridden to point to any location the user prefers (for
instance, I'm using ~/.idea/pallada/plugins). You can do this by setting
the IDEA_PLUGINS_PATH environment variable before launching the IDEA batch
file or shell scrip; I guess you can edit the lax file if you use the
InstallAnywhere launcher.

I assume you're saving templates to the directory that contains your
plugin. If that's the case then I believe the correct way to find the
location is to use code something like :

new StringBuffer(System.getProperty("idea.plugins.path").append(File.separator).append("tostring-plugin")).toString();

Append another separator and the template filename to get the complete
filename. This should work across platforms and for non-default plugin
locations.

HTH.

--
Mark Scott
mark@codebrewer.com

0
Comment actions Permalink

Thanks for the info.
Will check it out.

How I 'find' the template folder is done using the code:


Where folder name is:


And PathManager is from IDEAs openAPI.


I do not know if PathManager honor the idea.plugins.path property?

But I will check it when I have the time tomorrow.


Thanks for your reply.

/Claus

0
Comment actions Permalink

On Mon, 12 Jul 2004 18:02:42 +0400, Claus Ibsen wrote:

PathManager.getPluginsPath()

And PathManager is from IDEAs openAPI.


Aha. I hadn't seen that API (I took my first look at the openapi packages
at the weekend). I guess that method does the right thing.

My apologies - I assumed from your bugfix note that you'd hard-coded the
path. Sorry for the confusion.

--
Mark Scott
mark@codebrewer.com

0

Please sign in to leave a comment.