1 /*******************************************************************************
 
   2  * Copyright (c) 2005, 2008 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
 
   9  *     IBM Corporation - initial API and implementation
 
  11  *     Mauro "Incastrix" Casciari
 
  12  *******************************************************************************/
 
  13 package net.sourceforge.phpeclipse.xdebug.ui.actions;
 
  15 import net.sourceforge.phpeclipse.xdebug.ui.actions.RulerEnableDisableXDebugBreakpointAction;
 
  16 import org.eclipse.jface.action.IAction;
 
  17 import org.eclipse.jface.text.source.IVerticalRulerInfo;
 
  18 import org.eclipse.ui.texteditor.AbstractRulerActionDelegate;
 
  19 import org.eclipse.ui.texteditor.ITextEditor;
 
  22  * Toggles enablement of a breakpoint in a vertical ruler.
 
  23  * This action can be contributed to a vertical ruler context menu via the
 
  24  * <code>popupMenus</code> extension point, by referencing the ruler's context
 
  25  * menu identifier in the <code>targetID</code> attribute.
 
  27  * <extension point="org.eclipse.ui.popupMenus">
 
  28  *   <viewerContribution
 
  29  *     targetID="example.rulerContextMenuId"
 
  30  *     id="example.RulerPopupActions">
 
  32  *         label="Enable Breakpoint"
 
  33  *         class="org.eclipse.debug.ui.actions.RulerEnableDisableBreakpointActionDelegate"
 
  34  *         menubarPath="additions"
 
  35  *         id="example.rulerContextMenu.toggleBreakpointAction">
 
  37  *   </viewerContribution>
 
  41  * Clients may refer to this class as an action delegate in plug-in XML. 
 
  44  * @noextend This class is not intended to be subclassed by clients.
 
  45  * @noinstantiate This class is not intended to be instantiated by clients.
 
  48 public class RulerEnableDisableXDebugBreakpointActionDelegate extends AbstractRulerActionDelegate {
 
  51          * @see org.eclipse.ui.texteditor.AbstractRulerActionDelegate#createAction(org.eclipse.ui.texteditor.ITextEditor, org.eclipse.jface.text.source.IVerticalRulerInfo)
 
  53         protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) {
 
  54                 return new RulerEnableDisableXDebugBreakpointAction(editor, rulerInfo);