KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > ui > actions > IAddMemoryBlocksTarget


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

11
12 package org.eclipse.debug.ui.actions;
13
14 import org.eclipse.core.runtime.CoreException;
15 import org.eclipse.jface.viewers.ISelection;
16 import org.eclipse.ui.IWorkbenchPart;
17
18 /**
19  * An adapter for an "add memory block" operation. The Memory View provides
20  * a retargettable "add memory block" action that debuggers may plug into
21  * by providing an adapter (see <code>IAdaptable</code>) of this type.
22  * <p>
23  * Clients may implement this interface.
24  * </p>
25  * @since 3.2
26  */

27 public interface IAddMemoryBlocksTarget {
28     
29     /**
30      * Returns whether an add memory block operation can be performed from the specified
31      * part and the given selection.
32      *
33      * @param part the part on which the action has been invoked
34      * @param selection the selection on which the action has been invoked
35      * @throws CoreException if unable to perform the action
36      */

37     public boolean canAddMemoryBlocks(IWorkbenchPart part, ISelection selection) throws CoreException;
38     
39     /**
40      * Returns whether this target will support adding memory block from the specified
41      * part.
42      * @param part
43      * @return true if the target wants to support adding memory block from the given
44      * part, false otherwise.
45      */

46     public boolean supportsAddMemoryBlocks(IWorkbenchPart part);
47     
48     
49     /**
50      * Perform an add memory block on the given element that is
51      * currently selected in the Debug view. If a memory block can be successfully
52      * created, implementations must add the resulted memory block to <code>IMemoryBlockManager</code>
53      * In addition, implementations must query to see if default renderings should be created
54      * for the given memory block and add these renderings accordingly.
55      *
56      * @param part the part on which the action has been invoked
57      * @param selection the selection on which the action has been invoked
58      * @throws CoreException if unable to perform the action
59      *
60      * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval
61      * @see org.eclipse.debug.ui.memory.IMemoryRenderingManager
62      * @see org.eclipse.debug.core.IMemoryBlockManager
63      */

64     public void addMemoryBlocks(IWorkbenchPart part, ISelection selection) throws CoreException;
65 }
66
Popular Tags