Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: ff860039a89854de337938b17ddd45b7bd0707a5 (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
54
55
56
57
58
59
60
61
62
/*******************************************************************************
 * Copyright (c) 2004, 2006 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.model.IMemoryBlock;
import org.eclipse.debug.ui.IDebugModelPresentation;


/**
 * Allows debug models to customize the rendering of addresses for its memory blocks
 * in table and text based renderings provided by the debug platform.
 * <p>
 * To contribute a memory block table presentation, implement your debug model
 * presentation as documented in <code>org.eclipse.debug.ui.IDebugModelPresentation</code>.
 * In addition, implement this interface in your debug model presentation.  Your model
 * presentation will be called when <code>org.eclipse.debug.ui.memory.AbstractTableRendering</code>
 * constructs its column and row labels. 
 * </p>
 * <p>
 * Clients may implement this interface.
 * </p>
 * @since 3.1
 */
public interface IMemoryBlockTablePresentation extends IDebugModelPresentation
{
	
	/**
     * Returns a collection of labels to head columns in a <code>AbstractTableRendering</code>
     * rendering, or <code>null</code> if default labels should be used.
     *  
	 * @param blk memory block
	 * @param bytesPerLine the number if bytes to be displayed
	 * @param numColumns the number of columns the bytes are divided into 
	 * @return a collection of labels to head columns in a <code>AbstractTableRendering</code>
     * rendering, or <code>null</code> if default labels should be used
	 */
	public String[] getColumnLabels(IMemoryBlock blk, int bytesPerLine, int numColumns);
	
	
	/**
     * Renders and returns a label for a row starting at the given address within the given
     * memory block, or <code>null</code> if default rendering should be used.
     * 
	 * @param blk memory block
	 * @param address an address in the memory block
	 * @return a label for a row starting at the given address within the given
     * memory block, or <code>null</code> if default rendering should be used
	 */
	public String getRowLabel(IMemoryBlock blk, BigInteger address);
	
}

Back to the top