Much like it's companion All References, you of course need a Java SE 1.6 VM to use this feature, and you must be debugging at the time (i.e. have variables in the variables view). There are plans in the mix to expand its availabilty to the Outline View and to a context menu in the java editor....we shall see.
The first image below shows the location of the new action, and in this case we have selected a string, which will result in a popup showing all of the instances of type String in the current VM.
This next image shows the resulting popup (yes it is the inspect popup) telling us that there are 769 instances of String in the current VM. Allow me to say again, dandy.
To try out this...dare I say again...dandy new feature, you will have to wait until the next build or grab the source from HEAD.
What trouble me about "All References" and "All Instances" is that they don't really allow to analyse the results. It would make sense to allow to copy content of those trees to the clipboard, or bring them into the memory view and allow to search trough them.
ReplyDeleteOn the other hand, I wonder what are the use cases for those features? They are cool, but I can't hardly think of real use. To me it seem like new Netbeans heap walker looks more practical.
There is a new feature for "All References". I will be posting about it in the near future.
ReplyDeleteThe new feature allows you to view references as part of the variables view. You can copy the list to the clipboard, see how references change when stepping and navigate through them easier.