Class AbstractTextRendering

    • Constructor Detail

      • AbstractTextRendering

        public AbstractTextRendering​(String renderingId)
        Constructs a text rendering of the specified type.
        Parameters:
        renderingId - memory rendering type identifier
      • AbstractTextRendering

        public AbstractTextRendering​(String renderingId,
                                     String codePage)
        Constructs a text rendering of the specified type on the given code page.
        Parameters:
        renderingId - memory rendering type identifier
        codePage - the name of a supported charset, for example CP1252
    • Method Detail

      • setCodePage

        public void setCodePage​(String codePage)
        Sets the code page for this rendering. This does not cause the rendering to be updated with the new code page. Clients need to update the rendering manually when the code page is changed.
        Parameters:
        codePage - the name of a supported charset, for example CP1252
      • getCodePage

        public String getCodePage()
        Returns the current code page used by this rendering. Returns null if not set.
        Returns:
        Returns the current code page used by this rendering. Returns null if not set.
      • getString

        public String getString​(String dataType,
                                BigInteger address,
                                MemoryByte[] data)
        Description copied from class: AbstractTableRendering
        Returns text for the given memory bytes at the specified address for the specified rendering type. This is called by the label provider for. Subclasses must override.
        Specified by:
        getString in class AbstractTableRendering
        Parameters:
        dataType - rendering type identifier
        address - address where the bytes belong to
        data - the bytes
        Returns:
        a string to represent the memory. Cannot not return null. Returns a string to pad the cell if the memory cannot be converted successfully.
      • getBytes

        public byte[] getBytes​(String dataType,
                               BigInteger address,
                               MemoryByte[] currentValues,
                               String data)
        Description copied from class: AbstractTableRendering
        Returns bytes for the given text corresponding to bytes at the given address for the specified rendering type. This is called by the cell modifier when modifying bytes in a memory block. Subclasses must convert the string value to an array of bytes. The bytes will be passed to the debug adapter for memory block modification. Returns null if the bytes cannot be formatted properly.
        Specified by:
        getBytes in class AbstractTableRendering
        Parameters:
        dataType - rendering type identifier
        address - address the bytes begin at
        currentValues - current values of the data in bytes format
        data - the string to be converted to bytes
        Returns:
        the bytes converted from a string