Copy queries

Queries which copy data from selections.

Motivation

It can be useful to copy data from the results of a query by selecting objects. The data can then be pasted from the clipboard into other applications, or back into Eclipse Memory Analyzer for other queries.

Commands

Command Description
Copy Address Copies the address of an object, as a hexadecimal number with a 0x prefix to the clipboard. If there are multiple objects, they are on separate lines.
Copy Class Name Copies the class name of an object to the clipboard. If there are multiple objects, then the class names are on separate lines. If some of the objects are of the same class, duplicate class names will appear in the clipboard. If the source is a histogram, then the class name of the row will be copied.
Copy Value Copies the value that Eclipse Memory Analyzer displays for the object. For example, the string contents for a java.lang.String, the integer valeu as a decimal for an Integer. If the object does not have a value because no name resolve generates one, then the technical name will be returned, which is a combination of the class name and object address.
Copy OQL Query Copies an OQL query representing all the selected objects to the clipboard. If there are a large number of objects and they are not all the instances of a class or something else which can be represented succinctly in OQL then the copy might fail with an error message OQL statement is too big to use.
Save Value to File Save to a file the value of char[], String, StringBuffer or StringBuilder into a text file, or for a single primitive array store the elements as binary, or for other types, the printable value or the class name and address.
Copy Selection Copies a text representation of the selected rows of the tree or table, together with the heading.

Result

The clipboard contains the appropriate values, or for save as the file contains the appropriate values.