Categories


Authors:
davsclaus
opensource software

GenerateToString

Products: IntelliJ IDEA

Vendor: Claus Ibsen

Email:

Website: http://code.google.com/p/generate-tostring

License: http://www.apache.org/licenses/LICENSE-2.0.html

Bugtracker page

Description:

Adds a new action 'toString()' in the generate menu (alt + ins). The action generates a toString() method that dumps the classes fields. Java body code is generated using Velocity Macro and you can change this to fit your needs. The plugin has it's own settings (ctrl + alt + s). Full documentation included (Click hyperlink from Settings).
Downloads: 90528
Rating:
Participated in rating: 16
Version Since Build Until Build File/URL Size (Kb) Date Details
4.0.7. 69.7000. . Download 142 2008-07-10 11:11:15 details
4.0.2. 60.6827. . Download 140.55 2007-05-12 15:11:46 details
3.27. 50.4200. . Download 557.19 2006-11-01 14:10:18 details
2.20. 40.1162. . Download 101.27 2005-01-18 17:28:53 details
. .
3 updates are hidden show all updates
Screenshot #420
Screenshot #417
Screenshot #419
Screenshot #422
Screenshot #421
Screenshot #416
Screenshot #418

Recent change notes:

  • ID22 - Compiled with JDK1.5 so Mac users can use it again - sorry please give me a macbook pro ;)

General usage instructions:

press \'alt + ins\' to active the generate mini menu and chose toString().

Comments:

123>
Uxian
2013-12-06 15:52:13
Not compatible with IDEA 13
.
Anonymous
Rated:
2009-04-15 16:16:08
Thank you very much! It was not easy to find settings =)

I was confused by the fact that Copyright settings are presented in the Setting dialog box.
.
Anonymous
2009-04-14 09:17:23
The plugin is now bundled with IDEA and Jetbrains have taken over the maintenance of the plugin.

The settings have moved, eg press CTRL + INS and select toString() then a dialog shows the members to choose and there should be a Settings button on this popup window.

.
Anonymous
Rated:
2009-04-13 12:19:20
Nice plugin but I have one problem with it. I have updated it and enabled from plugins menu in IDEA 8. Now I see generate toString menu when I press Alt+Ins but there is no plugin configuration dialog in settings. Anyone has the same problem?
.
davsclaus
2008-10-29 12:37:09
.
Anonymous
2008-10-29 02:57:41
Is it compatible with IDEA 8?
.
davsclaus
2008-07-10 20:02:26
When the plugin starts up it tries to locate itself and extract the documentation that is included in the .jar.

It seems as it has trouble reading the .jar from this location:
C:\Documents and Settings\019gus\.IntelliJIdea70\config\plugins\GenerateToString.jar

The path is returned by IDEA itself, the path is not computed by the plugin.

However its just a WARNING and the plugin should work fine. Only the link in the settings to the plugin documentation will fail.

You should be fine to use all its features to generate the toString() methods.

.
Anonymous
2008-07-10 11:39:45
when installing I have this bug:
IO error while extracting plugin documentation - documentation disabled. Filename = 'C:\Documents and Settings\019gus\.IntelliJIdea70\config\plugins\GenerateToString.jar': C:\Documents and Settings\019gus\.IntelliJIdea70\config\plugins\GenerateToString.jar (Íå óäàåòñÿ íàéòè óêàçàííûé ôàéë)
java.io.FileNotFoundException: C:\Documents and Settings\019gus\.IntelliJIdea70\config\plugins\GenerateToString.jar (Íå óäàåòñÿ íàéòè óêàçàííûé ôàéë)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:70)
at generate.tostring.GenerateToStringUtils
.extractDocumentation(GenerateToStringUtils.java:303)
at generate.tostring.GenerateToStringPlugin
.initComponent(GenerateToStringPlugin.java:56)
at com.intellij.openapi.components.impl.ComponentManagerImpl
.a(ComponentManagerImpl.java:68)
at com.intellij.openapi.components.impl.ComponentManagerImpl
.access$1100(ComponentManagerImpl.java:112)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1
.getComponentInstance(ComponentManagerImpl.java:5)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter
.getComponentInstance(ComponentManagerImpl.java:6)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:199)
at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:186)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:168)
at org.picocontainer.alternatives.AbstractDelegatingMutablePicoContainer
.getComponentInstance(AbstractDelegatingMutablePicoContainer.java:75)
at com.intellij.openapi.components.impl.ComponentManagerImpl
.a(ComponentManagerImpl.java:178)
at com.intellij.openapi.components.impl.ComponentManagerImpl
.a(ComponentManagerImpl.java:12)
at com.intellij.openapi.components.impl.ComponentManagerImpl
.initComponents(ComponentManagerImpl.java:162)
at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl
.load(ApplicationStoreImpl.java:5)
at com.intellij.openapi.application.impl.ApplicationImpl
.load(ApplicationImpl.java:235)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:24)
at com.intellij.idea.MainImpl$3.run(MainImpl.java:3)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:131)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:132)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:136)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

how to fix?
.
davsclaus
2008-07-10 11:12:20
Sorry I have uploaded a new version target for jdk 1.5. I don't yet have a macbook pro, but I am aiming for one later this year.
.
Anonymous
2008-07-09 19:45:19
please dont compile with JDK6, otherwise you will lose all mac intellij users out there.
.
Anonymous
2008-07-02 11:04:23
How about a generator for clone() ? for some reason it hasn't been done yet...
.
Anonymous
Rated:
2008-02-13 00:38:48
I would love to see a version of this plugin for generating hashCode() and equals() based on a template. Thanks!
.
markv
Rated:
2008-01-09 07:17:04
Easy to see why its the #2 downloaded plug-in: 1) Well written; 2) provides necessary functionality that is surprisingly missing from IDEA; 3) easy to configure with great default templates 4) *Amazing* documentation that should be the standard that all other plug-ins should aim for.

I wholeheartedly agree with other reviewers that this plug-in should be included with the standard IDEA distribution. My sincere thanks to Claus for having written this plug-in.
.
mjparme
Rated:
2007-05-23 20:58:13
Essential plugin. Should just be in IntelliJ itself, but not sure it could be done any better than this plugin does it. Very configurable with Velocity if you don't like the way it generates the code (although it offers several pre-built Velocity templates)
.
davsclaus
2007-05-03 11:31:54
About the super.toString().

There is a default template you can select to use that does this.

The key is the velocity template that you can adjust to your needs. See the screenshots for details.

To select a different template you have to change it from the settings menu.
.
123>