Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 00b161032a2546037c0d1e44c4367e2b43a386ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*******************************************************************************
 * Copyright (c) 2007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.debug.ui.memory;

import java.math.BigInteger;

import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.MemoryByte;

/**
 * A memory rendering that can be repositioned.  Reposition behavior is rendering
 * specific.  Typically, reposition means that the rendering should move its
 * cursor/current selection to the given address. However, clients may define
 * its reposition behavior that is suitable for the rendering.
 * <p>
 * Clients may implement this interface.
 * </p>
 * @since 3.3
 *
 */
public interface IRepositionableMemoryRendering extends IMemoryRendering{

	/**
	 * Returns the currently selected address of this rendering or <code>null</code> if none
	 * @return the currently selected address of this rendering or <code>null</code> if none
	 */
	BigInteger getSelectedAddress();

	/**
	 * Returns the currently selected content as <code>MemoryByte</code> array.
	 * Returns an empty array if there is no selection.
	 * @return the currently selected as <code>MemoryByte</code> array or empty if there is
	 * no selection.
	 */
	MemoryByte[] getSelectedAsBytes();

	/**
	 * Position the rendering to the given address.
	 *
	 * @param address the address to go to
	 * @throws DebugException when there is a problem repositioning the rendering to the
	 * address
	 */
	void goToAddress(BigInteger address) throws DebugException ;
}

Back to the top