KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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 package org.eclipse.debug.ui.actions;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.jface.viewers.ISelection;
15 import org.eclipse.ui.IWorkbenchPart;
16
17 /**
18  * Extension interface for {@link org.eclipse.debug.ui.actions.IToggleBreakpointsTarget}.
19  * This interface provides the ability to selectively create any type of breakpoint
20  * when invoked, rather than a specific type of breakpoint (for example, a line
21  * breakpoint). This allows targets to choose the type of breakpoint to create
22  * when the user double-clicks in the vertical ruler.
23  * <p>
24  * Clients implementing <code>IToggleBreakpointsTarget</code> may optionally
25  * implement this interface.
26  * </p>
27  * @since 3.1
28  * @see org.eclipse.debug.ui.actions.ToggleBreakpointAction
29  */

30 public interface IToggleBreakpointsTargetExtension extends IToggleBreakpointsTarget {
31     
32     /**
33      * Creates new line breakpoints or removes existing breakpoints.
34      * The selection varies depending on the given part. For example,
35      * a text selection is provided for text editors, and a structured
36      * selection is provided for tree views, and may be a multi-selection.
37      *
38      * @param part the part on which the action has been invoked
39      * @param selection selection on which line breakpoints should be toggled
40      * @throws CoreException if unable to perform the action
41      */

42     public void toggleBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException;
43     
44     /**
45      * Returns whether line breakpoints can be toggled on the given selection.
46      * The selection varies depending on the given part. For example,
47      * a text selection is provided for text editors, and a structured
48      * selection is provided for tree views, and may be a multi-selection.
49      *
50      * @param part the part on which the action has been invoked
51      * @param selection selection on which line breakpoints may be toggled
52      * @return whether line breakpoints can be toggled on the given selection
53      */

54     public boolean canToggleBreakpoints(IWorkbenchPart part, ISelection selection);
55
56 }
57
Popular Tags