Package org.eclipse.debug.ui.actions
Interface IAddMemoryRenderingsTarget
public interface IAddMemoryRenderingsTarget
Adapter for the platform's retargettable "add memory rendering" action.
Clients implementing this adapter are expected to add the necessary memory
blocks and renderings when the adapter is invoked.
Typically, to add a memory rendering, client needs to do the following:
- Create a new memory block
- Add the new memory block to the Memory Block Manager.
(
IMemoryBlockManager
) - Create the new rendering from
IMemoryRenderingTypeDelegate
- Bring the required memory view to the top.
(
IMemoryRenderingSite
) - Find the container from the memory view to host the new memory rendering.
(
IMemoryRenderingContainer
) - Initialize the new rendering with the appropriate memory block and container.
- Add the new rendering to the container.
Clients may implement this interface.
- Since:
- 3.2
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMemoryRenderings
(IWorkbenchPart part, ISelection selection, IMemoryRenderingType[] renderingTypes) Adds memory renderings.boolean
canAddMemoryRenderings
(IWorkbenchPart part, ISelection selection) Returns whether a memory rendering can be added from the specified part, based on the the given selection, which is the active debug context in the current workbench window.getMemoryRenderingTypes
(IWorkbenchPart part, ISelection selection) Returns a list of rendering types that can be added from the given workbench part and active debug context, possibly empty.
-
Method Details
-
canAddMemoryRenderings
Returns whether a memory rendering can be added from the specified part, based on the the given selection, which is the active debug context in the current workbench window.- Parameters:
part
- the part on which the action has been invokedselection
- the active debug context in the active workbench window- Returns:
true
if a memory rendering can be added from the specified part with the given selection,false
otherwise
-
addMemoryRenderings
void addMemoryRenderings(IWorkbenchPart part, ISelection selection, IMemoryRenderingType[] renderingTypes) throws CoreException Adds memory renderings. Based on the part and selection (active debug context), this adapter does the following:- creates and adds the required memory block to the memory block manager
- creates the specified renderings and add the them to the appropriate memory rendering containers
- Parameters:
part
- the part on which the action has been invokedselection
- the active debug contextrenderingTypes
- renderings to add- Throws:
CoreException
- if unable to perform the action- See Also:
-
getMemoryRenderingTypes
Returns a list of rendering types that can be added from the given workbench part and active debug context, possibly empty.- Parameters:
part
- the part on which the action has been invokedselection
- the active debug context- Returns:
- a list of rendering types that can be added, possibly empty
-