# Memory Renderings

###### Identifier:

org.eclipse.debug.ui.memoryRenderings

###### Since:

3.1 - replacement for memoryRenderingTypes extension point which was considered experimental in 3.0

###### Description:

Allows plug-ins to contribute arbitrary renderings for memory blocks and bind memory blocks to renderings. For example, a rendering may translate raw bytes of a memory block into ASCII characters.

###### Configuration Markup:

<!ELEMENT extension (renderingType* | renderingBindings*)>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED>

- point - a fully qualified identifier of the target extension point
- id - an optional identifier of the extension instance
- name - an optional name of the extension instance

<!ELEMENT renderingType EMPTY>

<!ATTLIST renderingType

name CDATA #REQUIRED

id CDATA #REQUIRED

class CDATA #REQUIRED>

This element defines a rendering type.

- name - human-readable name of this rendering type
- id - unique identifier for this rendering
- class - fully qualified name of the Java class that implements `org.eclipse.debug.ui.memory.IMemoryRenderingTypeDelegate`

<!ELEMENT renderingBindings (enablement*)>

<!ATTLIST renderingBindings

renderingIds CDATA #IMPLIED

primaryId IDREF #IMPLIED

class CDATA #IMPLIED

defaultIds CDATA #IMPLIED>

Binds memory blocks with available renderings.

- renderingIds - comma delimited list of memory rendering type identifiers, specifying available rendering types for memory blocks this binding is enabled for. Must not be specified when `class` is provided.
- primaryId - memory rendering type identifier, specifying the default rendering type to be considered primary for memory blocks this binding is enabled for. When there is more than one default rendering type bound to a memory block, the UI may use the information to determine which rendering should be made visible (i.e the primrary one). Must not be specified when `class` is provided. Clients should be careful to specify only one primary rendering type per memory block.
- class - fully qualified name of the Java class that implements `org.eclipse.debug.ui.memory.IMemoryRenderingBindingsProvider`, allowing for dynamic rendering bindings. When specified, `renderingIds`, `defaultIds`, and `primaryId` must not be specified.
- defaultIds - comma delimited list of memory rendering type identifiers, specifying default rendering types for memory blocks this binding is enabled for. Must not be specified when `class` is provided.

###### Examples:

The following is an example for defining a new rendering type and binding.

    <extension point="org.eclipse.debug.ui.memoryRenderings">
        <renderingType
            name="Sample Rendering"
            id="com.example.sampleRendering"
            class="com.example.SampleRenderingTypeDelegate">
        </renderingType>
        <renderingBindings
            renderingIds="com.example.sampleRendering">
            <enablement>
                <instanceof value="com.example.SampleMemoryBlock"/>
            </enablement>
        </renderingBindings>
    </extension>

In the above example, a new rendering type, Sample Rendering, is defined. The class `com.example.SampleRenderingTypeDelegate` implements `org.eclipse.debug.ui.memory.IMemoryRenderingTypeDelegate` and will be used to create new renderings of this type. The rendering is bound to instances of `com.exmaple.SampleMemoryBlock`.

###### API Information:

- Value of the attribute class in a renderingType element must be a fully qualifed name of a Java class that implements org.eclipse.debug.ui.memory.IMemoryRenderingTypeDelegate.
- Value of the attribute class in a renderingBindings element must be a fully qualifed name of a Java class that implements org.eclipse.debug.ui.memory.IMemoryRenderingBindingsProvider.

###### Supplied Implementation:

The debug platform provides the following rendering types:

- Hex Rendering (rendering id: org.eclipse.debug.ui.rendering.raw_memory)
- ASCII Rendering (rendering id: org.eclipse.debug.ui.rendering.ascii)
- Signed Integer Rendering (rendering id: org.eclipse.debug.ui.rendering.signedint)
- Unsigned Integer Rendering (rendering id: org.eclipse.debug.ui.rendering.unsignedint)

The debug platform provides a memory view to host renderings.

Copyright (c) 2004, 2005 IBM Corporation and others.
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html/ SPDX-License-Identifier: EPL-2.0