1 /******************************************************************************* 2 * Copyright (c) 2007 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.debug.ui.memory; 12 13 import java.math.BigInteger; 14 15 import org.eclipse.debug.core.DebugException; 16 import org.eclipse.debug.core.model.MemoryByte; 17 18 /** 19 * A memory rendering that can be repositioned. Reposition behavior is rendering 20 * specific. Typically, reposition means that the rendering should move its 21 * cursor/current selection to the given address. However, clients may define 22 * its reposition behavior that is suitable for the rendering. 23 * <p> 24 * Clients may implement this interface. 25 * </p> 26 * @since 3.3 27 * 28 */ 29 public interface IRepositionableMemoryRendering extends IMemoryRendering{ 30 31 /** 32 * Returns the currently selected address of this rendering or <code>null</code> if none 33 * @return the currently selected address of this rendering or <code>null</code> if none 34 */ 35 public BigInteger getSelectedAddress(); 36 37 /** 38 * Returns the currently selected content as <code>MemoryByte</code> array. 39 * Returns an empty array if there is no selection. 40 * @return the currently selected as <code>MemoryByte</code> array or empty if there is 41 * no selection. 42 */ 43 public MemoryByte[] getSelectedAsBytes(); 44 45 /** 46 * Position the rendering to the given address. 47 * 48 * @param address the address to go to 49 * @throws DebugException when there is a problem repositioning the rendering to the 50 * address 51 */ 52 public void goToAddress(BigInteger address) throws DebugException ; 53 } 54