Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

toStringBuilder formatter

coosanite
2013-09-16
2013-09-16
  • coosanite
    coosanite
    2013-09-16

    This script attempts to format/pretty-print text output from java programs that are printing (simple?) data/object-graphs using the Apache commons library class ToStringBuilder.
    [ToStringBuilder.reflectionToString(obj) in org.apache.commons.lang3.builder.ToStringBuilder ]

    I found myself having large object graphs in debug output with no (obvious) easy-way to format them for easy and fast inspection. This script should pretty print the data for easier traversal, and allow code-folding via some replacements and use of the Java-Language mode.

    It's probably easy to break (with commas, [, ], {, and } in string data) but that should be easy to address. Feel free to submit a patch :)

    https://github.com/coosanite/npp-python-scripts/blob/master/toStringBuilderFormatter.py

     
  • coosanite
    coosanite
    2013-09-16

    by the way, thanks for a brilliant plugin.

    I was able to ditch my attempts at bespoke plugin creation and just rely on yours.

    For such use cases it's ideal and a fantastic time saver.