KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > core > memory > IMemoryRenderingManager


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.core.memory;
14
15 import org.eclipse.debug.core.DebugException;
16 import org.eclipse.debug.core.model.IDebugTarget;
17 import org.eclipse.debug.core.model.IMemoryBlock;
18
19
20 /**
21  * Manages all memory renderings in the workbench.
22  * @since 3.0
23  */

24 public interface IMemoryRenderingManager
25 {
26     /**
27      * Tell the manager to add a new memory rendering
28      * @param mem
29      * @param renderingId
30      * @return the IMemoryRendering object created
31      */

32     public IMemoryRendering addMemoryBlockRendering(IMemoryBlock mem, String JavaDoc renderingId) throws DebugException;
33     
34     
35     /**
36      * Tell the manager that a memory rendering has been removed.
37      * Remove all renderings with that same memory block and rendering ids
38      * @param mem
39      */

40     public void removeMemoryBlockRendering(IMemoryBlock mem, String JavaDoc renderingId);
41     
42     /**
43      * Add the specified rendering from the manager and notify listeners
44      * @param rendering
45      */

46     public void addMemoryBlockRendering(IMemoryRendering rendering) throws DebugException;
47     
48     /**
49      * Remove the specified rendering from the manager and notify listeners
50      * @param rendering
51      */

52     public void removeMemoryBlockRendering(IMemoryRendering rendering);
53     
54     /**
55      * Add a listener to the memory rendering manager.
56      * @param listener
57      */

58     public void addListener(IMemoryRenderingListener listener);
59     
60     
61     /**
62      * Remove a listener from the memory rendering manager.
63      * @param listener
64      */

65     public void removeListener(IMemoryRenderingListener listener);
66     
67     /**
68      * Get renderings based on given memory block and rendering id.
69      * Return all renderings related to the memory block if renderingId
70      * is null.
71      * Return an empty array if the rendering cannot be found.
72      * @param mem
73      * @param renderingId
74      */

75     public IMemoryRendering[] getRenderings(IMemoryBlock mem, String JavaDoc renderingId);
76     
77     /**
78      * Get all memory renderings from the given debug target
79      * Return an empty array if nothing can be found for the debug target.
80      * @param target
81      * @return
82      */

83     public IMemoryRendering[] getRenderingsFromDebugTarget(IDebugTarget target);
84     
85     /**
86      * Get all memory renderings from the given memory block
87      * Return an empty array if nothing can be found for the memory block.
88      * @param block
89      * @return
90      */

91     public IMemoryRendering[] getRenderingsFromMemoryBlock(IMemoryBlock block);
92     
93     /**
94      * @param renderingId
95      * @return rendering information of the given rendering id
96      */

97     public IMemoryRenderingInfo getRenderingInfo(String JavaDoc renderingId);
98     
99     /**
100      * @param obj
101      * @return all rendering information valid for the given object
102      */

103     public IMemoryRenderingInfo[] getAllRenderingInfo(Object JavaDoc obj);
104     
105     /**
106      * @param obj
107      * @return default renderings' ids for the given object
108      */

109     public String JavaDoc[] getDefaultRenderings(Object JavaDoc obj);
110     
111 }
112
Popular Tags