Fix #759.
[phpeclipse.git] / net.sourceforge.phpeclipse.xdebug.ui / src / net / sourceforge / phpeclipse / xdebug / ui / actions / RulerEnableDisableXDebugBreakpointActionDelegate.java
diff --git a/net.sourceforge.phpeclipse.xdebug.ui/src/net/sourceforge/phpeclipse/xdebug/ui/actions/RulerEnableDisableXDebugBreakpointActionDelegate.java b/net.sourceforge.phpeclipse.xdebug.ui/src/net/sourceforge/phpeclipse/xdebug/ui/actions/RulerEnableDisableXDebugBreakpointActionDelegate.java
new file mode 100644 (file)
index 0000000..4bae8ae
--- /dev/null
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     PHPEclipse team
+ *     Mauro "Incastrix" Casciari
+ *******************************************************************************/
+package net.sourceforge.phpeclipse.xdebug.ui.actions;
+
+import net.sourceforge.phpeclipse.xdebug.ui.actions.RulerEnableDisableXDebugBreakpointAction;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.source.IVerticalRulerInfo;
+import org.eclipse.ui.texteditor.AbstractRulerActionDelegate;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+/**
+ * Toggles enablement of a breakpoint in a vertical ruler.
+ * This action can be contributed to a vertical ruler context menu via the
+ * <code>popupMenus</code> extension point, by referencing the ruler's context
+ * menu identifier in the <code>targetID</code> attribute.
+ * <pre>
+ * &lt;extension point="org.eclipse.ui.popupMenus"&gt;
+ *   &lt;viewerContribution
+ *     targetID="example.rulerContextMenuId"
+ *     id="example.RulerPopupActions"&gt;
+ *       &lt;action
+ *         label="Enable Breakpoint"
+ *         class="org.eclipse.debug.ui.actions.RulerEnableDisableBreakpointActionDelegate"
+ *         menubarPath="additions"
+ *         id="example.rulerContextMenu.toggleBreakpointAction"&gt;
+ *       &lt;/action&gt;
+ *   &lt;/viewerContribution&gt;
+ * </pre>
+ * </p>
+ * <p>
+ * Clients may refer to this class as an action delegate in plug-in XML. 
+ * </p>
+ * @since 3.2
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ *
+ */
+public class RulerEnableDisableXDebugBreakpointActionDelegate extends AbstractRulerActionDelegate {
+
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.texteditor.AbstractRulerActionDelegate#createAction(org.eclipse.ui.texteditor.ITextEditor, org.eclipse.jface.text.source.IVerticalRulerInfo)
+        */
+       protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) {
+               return new RulerEnableDisableXDebugBreakpointAction(editor, rulerInfo);
+       }
+
+}