View object values in a View [message #651981] |
Wed, 02 February 2011 11:00  |
Eclipse User |
|
|
|
Is there a way to see the specific value of the selected object in a different view? For instance, one could provide an extension to print the contents of an array. Currently the resolved value is printed next to the object address, in the table view. That's usually very crowded.
The inspector is not better. First of all, it does not show the resolved value of the inspected object anywhere. It does show the resolved values for each field, but it does so instead of the actual class name of the field, and I think both informations are important.
It would be nice to have a view for showing the resolved value of the selected object, and also show it in the inspector. This way you can have a compact view in the table, and a detailed view in another pane. This also seems to be the way YourKit works.
What do you think? Sorry if there was such a view and I missed it!
iulian
|
|
|
Re: View object values in a View [message #652056 is a reply to message #651981] |
Wed, 02 February 2011 14:39   |
Eclipse User |
|
|
|
Hi Iulian
I'm not clear exactly what you mean by the resolved value of an object because surely that is just the fields which comprise the object, with their values. In general that is as much as can be displayed for an object, except for some special cases where the tool will display internal values (eg java.lang.String).
If I select an object in (for example) a tree view, the inspector shows details of the object including its fields, under the "Attributes" tab. If the object is an array it shows the values of each element in the array, with its Java object type where applicable. The exception is where further resolution has occurred as above, when the type is not displayed.
Is your request to show the Java type of fields which have been resolved in this way?
Could you give more details of exactly what you would hope to see in the Inspector, maybe with an example, or possibly raise a suggestion as an Eclipse bugzilla?
Jonathan.
|
|
|
Re: View object values in a View [message #652189 is a reply to message #651981] |
Wed, 02 February 2011 23:12   |
Eclipse User |
|
|
|
You can copy the value (Context Menu on the object, copy, value)
and paste it into the notes view.
You can also copy a selection e.g. ctrl-C and paste it (that gives the table headings too).
You can save a value to disk - that for huge arrays that gives the full value rather than a value truncated at approximately 1024 characters.
You can also do 'Java Basics' 'Group by Value' to see the value in a table.
These suggestions aren't dynamic though, so don't follow the selected objects.
We could modify the inspector view - either another row in the top part of the split pane or another tab at the bottom. We don't want to clutter the screen too much more however.
|
|
|
Re: View object values in a View [message #652237 is a reply to message #652056] |
Thu, 03 February 2011 10:06   |
Eclipse User |
|
|
|
Jonathan Lawrence wrote on Wed, 02 February 2011 09:39 | Hi Iulian
I'm not clear exactly what you mean by the resolved value of an object because surely that is just the fields which comprise the object, with their values. In general that is as much as can be displayed for an object, except for some special cases where the tool will display internal values (eg java.lang.String).
|
That's exactly what I meant. I wrote a couple of name resolvers for my types (for instance, in my app we intern strings in a custom char array), so I need to see the resolved value. Sometimes this can be a long string, for instance for lists or maps.
Quote: |
If I select an object in (for example) a tree view, the inspector shows details of the object including its fields, under the "Attributes" tab. If the object is an array it shows the values of each element in the array, with its Java object type where applicable. The exception is where further resolution has occurred as above, when the type is not displayed.
|
Yes, the field view is nice, but in the pane above the field table it would be good to display the resolved value as well.
|
|
|
Re: View object values in a View [message #652238 is a reply to message #652189] |
Thu, 03 February 2011 10:12   |
Eclipse User |
|
|
|
Andrew Johnson wrote on Wed, 02 February 2011 18:12 | You can copy the value (Context Menu on the object, copy, value)
and paste it into the notes view.
You can also copy a selection e.g. ctrl-C and paste it (that gives the table headings too).
You can save a value to disk - that for huge arrays that gives the full value rather than a value truncated at approximately 1024 characters.
|
Yes, that's what I do sometimes.
Quote: |
We could modify the inspector view - either another row in the top part of the split pane or another tab at the bottom. We don't want to clutter the screen too much more however.
|
I would go for another row, for completeness. I think it's important, and if you're worried about clutter you can remove the super class (that is usually easy to find) or the string 'no GC root', which could instead be turned into another visual indicator, like a special icon next to the object address.
Regardless, I think the view is a good idea because it can be closed, or placed anywhere. Is there an extension point for that? I'd be happy to contribute a prototype (I'm not familiar with the code base though)
thanks!
|
|
|
Re: View object values in a View [message #652438 is a reply to message #652238] |
Thu, 03 February 2011 22:16   |
Eclipse User |
|
|
|
I've tried an extra row in the top - it then produces scroll bars, so the top would need to be bigger. I don't think removing items is right either. Also I like the inspector view on the left hand side as a narrow column, and the details are not then any more visible than in the main query table. Hover text does appear, but that's not great.
A text view tab with line wrapping would have plenty of space - it is just harder to program. It also might allow better selection/copying.
|
|
|
Re: View object values in a View [message #653092 is a reply to message #652438] |
Tue, 08 February 2011 13:22   |
Eclipse User |
|
|
|
Andrew Johnson wrote on Thu, 03 February 2011 17:16 | I've tried an extra row in the top - it then produces scroll bars, so the top would need to be bigger. I don't think removing items is right either. Also I like the inspector view on the left hand side as a narrow column, and the details are not then any more visible than in the main query table. Hover text does appear, but that's not great.
|
Fair enough. I am still convinced that not showing the user-defined string for a type mostly defeats the purpose of having these extensions points.
Quote: |
A text view tab with line wrapping would have plenty of space - it is just harder to program. It also might allow better selection/copying.
|
Agreed, spacing, selection and copying are very important. I reiterate my offer to help with this view, but I need a bit of guidance. Is there an extension point I can target? I'd need a notification of the currently selected object (similar to how the Inspector panel operates)
|
|
|
Re: View object values in a View [message #654421 is a reply to message #653092] |
Tue, 15 February 2011 17:08   |
Eclipse User |
|
|
|
>Agreed, spacing, selection and copying are very important. I reiterate my offer to help with this view, but I need a bit of guidance. Is there an extension point I can target? I'd need a notification of the currently selected object (similar to how the Inspector panel operates)
Thank you for your offer. There isn't an extension point - please take a look at:
/org.eclipse.mat.ui/src/org/eclipse/mat/ui/snapshot/views/in spector/InspectorView.java
I was suggesting an extra tab as well as Statics, Attributes, and Class Hierarchy.
I'm not sure a new extension point is necessary - unless we had a more general text/image/composite object name/description resolver and put that into the tab. At the moment RGB and Images appear in a box at the bottom of the Inspector view. This could be generalized to the tab.
|
|
|
|
Re: View object values in a View [message #657744 is a reply to message #654638] |
Thu, 03 March 2011 19:33   |
Eclipse User |
|
|
|
Thank you, it looks good.
I don't know if this is the right place to discuss this, but I'd like to tutor a Google Summer of Code project for adding scripting support to MAT OQL. I think there's a reasonable chance this will be approved, last year we had quite a nice crop of projects:
http://www.scala-lang.org/gsoc2010
I'd be interested in using Scala as the scripting language, so I see it as an alternative next to OQL support. I think it could be developed as a separate plugin, but it would be nice to collaborate and maybe find other areas where a motivated student can help. Anyone interested in the MAT team?
thanks
|
|
|
|
Re: View object values in a View [message #658929 is a reply to message #657744] |
Thu, 10 March 2011 13:35   |
Eclipse User |
|
|
|
Quote: | I don't know if this is the right place to discuss this, but I'd like to tutor a Google Summer of Code project for adding scripting support to MAT OQL
|
I also think its better to post this in a separate thread with a different title.
Quote: | Anyone interested in the MAT team?
|
This sounds interesting, but I'm afraid I also can't find the time for it.
I'll post a link to this message on our dev mailing list. I guess there could be people following the list which can be interested in the idea.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04405 seconds