The extension should implement the IClassSpecificNameResolver interface which defines a single ( ".jobs.Job" ) public class JobNameResolver implements String resolve (IObject object ) throws SnapshotException Some extensions which MAT provides are for example for to show the content of objects representing String, to show the bundle symbolic name for Equinox classloaders, to show the name for Thread objects, etc... The name resolver extension point provides a mechanism to give a readable description of an object, similar to what a toString() method will do. Destination: Directory: path_to_MAT/mat.File->Export->Plug-in Development->Deployable plug-ins and fragments.Select Plug-in, Run As->Eclipse Application.In public String resolve(IObject object) Change return null to return "The Java runtime of size"+object.getUsedHeapSize() Note the hover javadoc help for IObject, IClassSpecificNameResolver. Edit the code to perform the required function.Adjust package name and class name to suit.
Update using update site (if you haven't got the latest version) Update site.Download Memory Analyzer 1.12.0 Download site.Download a recent copy of of Memory Analyzer.Have a copy of an Eclipse Java Development environment installed.It is not necessary to download the source of Memory Analyzer to be able to write extensions. Setting up a development environment for writing extensions
See MemoryAnalyzer/Reading Data from Heap Dumps for more details on how to read data from a heap dump. Within the extensions one will usually extract certain pieces of information from the objects in the heap dump. This page contains an overview of the different extension points and what can be achieved with them. The Memory Analyzer tool offers several possibilities to extend it. 6.2 The IRequestDetailsResolver Interface.5.4 Executing a Report in Unattended Mode.4.6 Reading data from supplied arguments.4.5.2 Qualifications on Query Arguments.4.4 Describing the Query with Annotations.2 Setting up a development environment for writing extensions.