[ANN] toString plugin v1.1
about
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.
The plugin uses Velocity Template Language to generate the code, so it's very flexible if you want your toString method to be a little different.
Changelog v1.1
Renamed field $field.transient to $field.modifierTransiet.
Added many new varaibles to velocity context.
Integrated code contributions from Igor Levit:
- Refactored code to use ConflictResultionPolicy pattern insteed of enumeration for options
- A better UI for the settings
- The "Always overwrite" option is now a more generic "Always apply default resolution policy"
- The action is disabled in menu's for non javafiles...
http://www.intellij.org/twiki/bin/view/Main/ToStringPlugin
请先登录再写评论。
There seem to be a few bugs with the settings panel. I think that most (if
not all) of them could be solved by placing the template editing pane in a
scroll pane. If you'd like, Claus, I can take a look at implementing the
change.
Also, I'm thinking of adding a ToStringPluginTemplates page to the twiki
and linking to it from the plugin's main page. I have a template that is
somewhat different from the default and would like to share it. Does anyone
else have templates they would like to share? I'm trying to determine if it
would be worth having a separate page, or if I should just add mine to the
plugin's main page, or if I should just keep it to myself. ;)
~Mike
Claus Ibsen <cib_rejse@yahoo.dk> wrote in
news:6984999.1039118840893.JavaMail.jrun@is.intellij.net:
>
Yeah please take a look at it, the community can use all the help for the plugins. Ahh scrollpane, is it a problem if the template get's to big?
No please share the templates. I'll like to be inspired how the templates can be adjusted to fit peoples needs.
If there is more people donating templates it might be better with a seperate page. And yeah the option for the plugin to handle file-templates.
Take care and looking forward to you bugfixes and templates
/Claus
Yes, it has to do with any time the content changes in max or min size
either horizontally or vertically.
I'll just add my file to the main page for now. If more people post
different ones, perhaps I or someone else can separate it into a
separate page.
What "option for the plugin to handle file-templates" do you mean? Do
you mean add a feature to the plugin to be able to load the template
from a file? That would be a great idea, I think.
I'll post a text (.txt) file containing my template ASAP. It may take me
a while to post any bugfixes as I have very little free time these days.
Thanks.
~Mike
I was adding a few more features to the plugin and also noticed the missing scrollpanes, so I added 'em.
Yes someting like the file/live template that IDEA has.
/Claus