Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 91284ce4a8a5840f1d4815cc14fc849d677540df (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*******************************************************************************
 * Copyright (c) 2004, 2010 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 org.eclipse.debug.core.model.IMemoryBlock;


/**
 * A rendering bindings provider provides rendering type bindings for a memory block.
 * <p>
 * By default, bindings for a memory block are provided by the memory rendering
 * manager. However, a client can provide dynamic renderings for a memory block
 * by contributing a dynamic rendering binding in the <code>renderingBindings</code>
 * element of a <code>memoryRenderings</code> extension.
 * </p>
 * <p>
 * Clients contributing dynamic rendering bindings are intended to implement this
 * interface.
 * </p>
 * @since 3.1
 */
public interface IMemoryRenderingBindingsProvider {

	/**
     * Returns all rendering types bound to the given memory block.
     * This includes default and primary rendering types.
     *
     * @param block memory block
	 * @return all rendering types bound to the given memory block
	 */
	IMemoryRenderingType[] getRenderingTypes(IMemoryBlock block);

    /**
     * Returns default rendering types bound to the given memory block,
     * possibly empty.
     *
     * @param block memory block
     * @return default rendering types bound to the given memory block,
     * possibly empty
     */
    IMemoryRenderingType[] getDefaultRenderingTypes(IMemoryBlock block);

    /**
     * Returns the primary rendering type bound to the given memory block,
     * or <code>null</code> if none.
     *
     * @param block memory block
     * @return the primary rendering type bound to the given memory block,
     * or <code>null</code> if none
     */
    IMemoryRenderingType getPrimaryRenderingType(IMemoryBlock block);

    /**
     * Adds a listener to this binding provider.  The listener will be notified
     * when rendering bindings change.
     * <p>
     * Has no effect if an identical listener is already registered.
     * </p>
     * @param listener listener to add
     */
	void addListener(IMemoryRenderingBindingsListener listener);

    /**
     * Removes a listener from this binding provider.
     * <p>
     * Has no effect if an identical listener is not already registered.
     * </p>
     * @param listener listener to remove
     */
	void removeListener(IMemoryRenderingBindingsListener listener);
}

Back to the top