Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.debug.ui.memory
Class AbstractTextRendering


java.lang.Object
  extended by 

org.eclipse.core.runtime.PlatformObject
      extended by 

org.eclipse.debug.ui.memory.AbstractMemoryRendering
          extended by org.eclipse.debug.internal.ui.views.memory.renderings.AbstractBaseTableRendering
              extended by 

org.eclipse.debug.ui.memory.AbstractTableRendering
                  extended by 
org.eclipse.debug.ui.memory.AbstractTextRendering
All Implemented Interfaces:
EventListener, IAdaptable, IMemoryRendering, IRepositionableMemoryRendering, IResettableMemoryRendering, IPropertyChangeListener

public abstract class AbstractTextRendering
extends AbstractTableRendering

Abstract implementation of a rendering that translates memory into text, displayed in a table.

Clients should subclass from this class if they wish to provide a table text rendering with a specific code page.

Since:
3.1

Field Summary
 
Fields inherited from class org.eclipse.debug.ui.memory. AbstractTableRendering
PROPERTY_COL_SIZE, PROPERTY_ROW_SIZE, PROPERTY_SELECTED_ADDRESS, PROPERTY_TOP_ADDRESS
 
Constructor Summary
AbstractTextRendering ( String renderingId)
          Constructs a text rendering of the specified type.
AbstractTextRendering ( String renderingId, String codePage)
          Constructs a text rendering of the specified type on the given code page.
 
Method Summary
 byte[] getBytes ( String dataType, BigInteger address, MemoryByte[] currentValues, String data)
          Returns bytes for the given text corresponding to bytes at the given address for the specified rendering type.
  String getCodePage ()
          Returns the current code page used by this rendering.
  String getString ( String dataType, BigInteger address, MemoryByte[] data)
          Returns text for the given memory bytes at the specified address for the specified rendering type.
 void setCodePage ( String codePage)
          Sets the code page for this rendering.
 
Methods inherited from class org.eclipse.debug.ui.memory. AbstractTableRendering
becomesHidden, becomesVisible, createActions, createControl, createToolTipControl, displayError, displayTable, dispose, fillContextMenu, format, getAdapter, getAddressableSize, getAddressableUnitPerColumn, getAddressableUnitPerLine, getBytesPerColumn, getBytesPerLine, getColorProviderAdapter, getControl, getFontProviderAdapter, getLabel, getLabelProviderAdapter, getNumCharsPerByte, getSelectedAddress, getSelectedAsBytes, getSelectedAsString, getTablePresentationAdapter, getTableViewer, getToolTipText, goToAddress, isDisplayingError, propertyChange, refresh, reset, resetRendering, resizeColumnsToPreferredSize, toolTipAboutToShow, updateLabels, updateRenderingLabel
 
Methods inherited from class org.eclipse.debug.ui.memory. AbstractMemoryRendering
activated, addPropertyChangeListener, createPopupMenu, deactivated, decorateImage, decorateLabel, firePropertyChangedEvent, getImage, getMemoryBlock, getMemoryRenderingContainer, getPopupMenuManager, getRenderingId, init, isVisible, removePropertyChangeListener
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.debug.ui.memory. IMemoryRendering
activated, addPropertyChangeListener, deactivated, getImage, getMemoryBlock, getRenderingId, init, removePropertyChangeListener
 

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

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire