KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 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.debug.internal.ui.actions.breakpoints.RulerEnableDisableBreakpointAction;
14 import org.eclipse.jface.action.IAction;
15 import org.eclipse.jface.text.source.IVerticalRulerInfo;
16 import org.eclipse.ui.texteditor.AbstractRulerActionDelegate;
17 import org.eclipse.ui.texteditor.ITextEditor;
18
19 /**
20  * Toggles enablement of a breakpoint in a vertical ruler.
21  * This action can be contributed to a vertical ruler context menu via the
22  * <code>popupMenus</code> extension point, by referencing the ruler's context
23  * menu identifier in the <code>targetID</code> attribute.
24  * <pre>
25  * &lt;extension point="org.eclipse.ui.popupMenus"&gt;
26  * &lt;viewerContribution
27  * targetID="example.rulerContextMenuId"
28  * id="example.RulerPopupActions"&gt;
29  * &lt;action
30  * label="Enable Breakpoint"
31  * class="org.eclipse.debug.ui.actions.RulerEnableDisableBreakpointActionDelegate"
32  * menubarPath="additions"
33  * id="example.rulerContextMenu.toggleBreakpointAction"&gt;
34  * &lt;/action&gt;
35  * &lt;/viewerContribution&gt;
36  * </pre>
37  * </p>
38  * <p>
39  * Clients may refer to this class as an action delegate in plug-in XML. This class
40  * is not intended to be subclassed.
41  * </p>
42  * @since 3.2
43  *
44  */

45 public class RulerEnableDisableBreakpointActionDelegate extends AbstractRulerActionDelegate {
46
47     /* (non-Javadoc)
48      * @see org.eclipse.ui.texteditor.AbstractRulerActionDelegate#createAction(org.eclipse.ui.texteditor.ITextEditor, org.eclipse.jface.text.source.IVerticalRulerInfo)
49      */

50     protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) {
51         return new RulerEnableDisableBreakpointAction(editor, rulerInfo);
52     }
53
54 }
55
Popular Tags