KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > views > memory > IMemoryBlockModelPresentation


1 /*******************************************************************************
2  * Copyright (c) 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12
13 package org.eclipse.debug.internal.ui.views.memory;
14
15 import java.math.BigInteger JavaDoc;
16 import org.eclipse.debug.core.model.IMemoryBlock;
17 import org.eclipse.debug.ui.IDebugModelPresentation;
18
19
20 /**
21  * Allows plugins to control the presentation of a memory block. Plugins can
22  * customize the tab label of a MemoryViewTab. They can also control how
23  * each of the columns are labeled and how addresses are to be presented to users.
24  *
25  * @since 3.0
26  */

27 public interface IMemoryBlockModelPresentation extends IDebugModelPresentation
28 {
29     /**
30      * @param blk - memory block the tab is monitoring
31      * @param renderingId - rendering id of the tab
32      * @return tab label for this memory block. Return null if default is to be used.
33      * Default tab label is:
34      * "expression:evaluated address" for IExtendedMemoryBlock
35      * "Base Address" for IMemoryBlock
36      */

37     public String JavaDoc getTabLabel(IMemoryBlock blk, String JavaDoc renderingId);
38     
39     /**
40      * @param blk
41      * @param bytesPerLine
42      * @param columnSize
43      * @return column labels for the MemoryViewTab of the memory block
44      * Size of the String array returned must equal to "bytesPerLine"/"columnSize".
45      * Return an empty array if default column labels are to be used.
46      */

47     public String JavaDoc[] getColumnLabels(IMemoryBlock blk, int bytesPerLine, int columnSize);
48     
49     
50     /**
51      * @param blk
52      * @param address
53      * @return the address presentation of the specfied address.
54      * Return null if default address presentation is to be used.
55      */

56     public String JavaDoc getAddressPresentation(IMemoryBlock blk, BigInteger JavaDoc address);
57 }
58
Popular Tags