KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > actions > breakpoints > RetargetMethodBreakpointAction


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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.breakpoints;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
15 import org.eclipse.jface.viewers.ISelection;
16 import org.eclipse.ui.IWorkbenchPart;
17
18
19 /**
20  * Global retargettable toggle method breakpoint action.
21  *
22  * @since 3.0
23  */

24 public class RetargetMethodBreakpointAction 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).toggleMethodBreakpoints(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).canToggleMethodBreakpoints(part, selection);
37     }
38     /* (non-Javadoc)
39      * @see org.eclipse.debug.internal.ui.actions.RetargetAction#getOperationUnavailableMessage()
40      */

41     protected String JavaDoc getOperationUnavailableMessage() {
42         return Messages.RetargetMethodBreakpointAction_0;
43     }
44 }
45
Popular Tags