vipx / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

Injector toString helper util with more readable "report" than built-in massive one-liner InjectorImpl toString() ToStringBuilder #794

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm a Guice semi-NOOB, facing it by way of another framework which heavily uses 
it internally (see 
http://www.eclipse.org/Xtext/documentation.html#dependencyInjection). 

I've had situations where I wanted to "better see what's inside a given 
Injector" (e.g. while Debugging), and thought a kind of readable mini "report" 
for this could be handy?  It could also help to roll-out usage of Guice to more 
junior team members ("see, this is what it actually is..").

I've noticed that InjectorImpl's toString() ToStringBuilder does something like 
this, but (at least in my case) that just dump a useless massive 20k chars one 
liner... ;-)

I've started something like what I mean on 
https://gist.github.com/vorburger/8652290 - would finishing this off some other 
night to a usable 0.1 and proposing it as a contribution be of any interest and 
value to others? (Or if this a waste of time, because..? Absolutely no offense 
taken if you close this issue.)

PS: I've seen https://code.google.com/p/google-guice/wiki/Grapher, but that 
looks a little... heavy for what I was looking for - just a (readable) "dump". 
Should if this does already exist elsewhere.

Original issue reported on code.google.com by michael....@gmail.com on 27 Jan 2014 at 5:15

GoogleCodeExporter commented 9 years ago
This is a wonderful idea for an extension, but not something in the core IMO.  
Please feel free to continue your work on it and promote it on the userlist 
when it's ready.

Original comment by sberlin on 27 Jan 2014 at 6:04