KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > actions > RetargetToggleLineBreakpointAction


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.internal.ui.actions;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.debug.ui.actions.*;
15 import org.eclipse.jface.viewers.ISelection;
16 import org.eclipse.ui.IWorkbenchPart;
17
18
19 /**
20  * Global retargettable toggle line breakpoint action.
21  *
22  * @since 3.0
23  */

24 public class RetargetToggleLineBreakpointAction extends RetargetBreakpointAction {
25     
26     /* (non-Javadoc)
27      * @see org.eclipse.debug.internal.ui.actions.RetargetBreakpointAction#performAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
28      */

29     protected void performAction(Object JavaDoc target, ISelection selection, IWorkbenchPart part) throws CoreException {
30         ((IToggleBreakpointsTarget)target).toggleLineBreakpoints(part, selection);
31     }
32     /* (non-Javadoc)
33      * @see org.eclipse.debug.internal.ui.actions.RetargetBreakpointAction#canPerformAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
34      */

35     protected boolean canPerformAction(Object JavaDoc target, ISelection selection, IWorkbenchPart part) {
36         return ((IToggleBreakpointsTarget)target).canToggleLineBreakpoints(part, selection);
37     }
38 }
39
Popular Tags