Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.debug.ui.actions
Class RulerToggleBreakpointActionDelegate


java.lang.Object
  extended by 

org.eclipse.ui.actions.ActionDelegate
      extended by 

org.eclipse.ui.texteditor.AbstractRulerActionDelegate
          extended by 
org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate
All Implemented Interfaces:
EventListener, IMenuListener, MouseListener, org.eclipse.swt.internal.SWTEventListener, IActionDelegate, IActionDelegate2, IEditorActionDelegate

public class RulerToggleBreakpointActionDelegate
extends AbstractRulerActionDelegate
implements IActionDelegate2

Toggles a breakpoint when ruler is double-clicked. This action delegate can be contributed to an editor with the editorActions extension point. This action is as a factory that creates another action that performs the actual breakpoint toggling. The created action acts on the editor's IToggleBreakpointsTagret to toggle breakpoints.

Following is example plug-in XML used to contribute this action to an editor. Note that the label attribute of this action is not displayed in the editor. Instead, the label of the created action is displayed.

 <extension point="org.eclipse.ui.editorActions">
    <editorContribution
          targetID="example.editor"
          id="example.rulerActions">
       <action
             label="Not Used"
             class="org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
             style="push"
             actionID="RulerDoubleClick"
             id="example.doubleClickBreakpointAction"/>
    </editorContribution>
 </extension>
 

This action can also be contributed to a vertical ruler context menu via the popupMenus extension point, by referencing the ruler's context menu identifier in the targetID attribute.

 <extension point="org.eclipse.ui.popupMenus">
   <viewerContribution
     targetID="example.rulerContextMenuId"
     id="example.RulerPopupActions">
       <action
         label="Toggle Breakpoint"
         class="org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
         menubarPath="additions"
         id="example.rulerContextMenu.toggleBreakpointAction">
       </action>
   </viewerContribution>
 

Clients may refer to this class as an action delegate in plug-in XML.

Since:
3.1
Restriction:
This class is not intended to be subclassed by clients.
Restriction:
This class is not intended to be instantiated by clients.

Constructor Summary
RulerToggleBreakpointActionDelegate ()
           
 
Method Summary
protected   IAction createAction ( ITextEditor editor, IVerticalRulerInfo rulerInfo)
          The factory method creating the underlying action.
 void dispose ()
          The ActionDelegate implementation of this IActionDelegate2 method does nothing.
 void init ( IAction action)
          The ActionDelegate implementation of this IActionDelegate2 method does nothing.
 void runWithEvent ( IAction action, Event event)
          The ActionDelegate implementation of this IActionDelegate2 method redirects to the run method.
 void setActiveEditor ( IAction callerAction, IEditorPart targetEditor)
          Sets the active editor for the delegate.
 
Methods inherited from class org.eclipse.ui.texteditor. AbstractRulerActionDelegate
menuAboutToShow, mouseDoubleClick, mouseDown, mouseUp, run, selectionChanged
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui. IActionDelegate
run, selectionChanged
 

Constructor Detail

RulerToggleBreakpointActionDelegate

public RulerToggleBreakpointActionDelegate()
Method Detail

createAction

protected 
IAction createAction(
ITextEditor editor,
                               
IVerticalRulerInfo rulerInfo)
Description copied from class: AbstractRulerActionDelegate
The factory method creating the underlying action.

Specified by:
createAction in class AbstractRulerActionDelegate
Parameters:
editor - the editor the action to be created will work on
rulerInfo - the vertical ruler the action to be created will work on
Returns:
the created action

setActiveEditor

public void setActiveEditor(
IAction callerAction,
                            
IEditorPart targetEditor)
Description copied from interface: IEditorActionDelegate
Sets the active editor for the delegate. Implementors should disconnect from the old editor, connect to the new editor, and update the action to reflect the new editor.

Specified by:
setActiveEditor in interface IEditorActionDelegate
Overrides:
setActiveEditor in class AbstractRulerActionDelegate
Parameters:
callerAction - the action proxy that handles presentation portion of the action
targetEditor - the new editor target

init

public void init(
IAction action)
Description copied from class: ActionDelegate
The ActionDelegate implementation of this IActionDelegate2 method does nothing. Subclasses may reimplement.

Specified by:
init in interface IActionDelegate2
Overrides:
init in class ActionDelegate
Parameters:
action - the proxy action that handles the presentation portion of the action.

dispose

public void dispose()
Description copied from class: ActionDelegate
The ActionDelegate implementation of this IActionDelegate2 method does nothing. Subclasses may reimplement.

Specified by:
dispose in interface IActionDelegate2
Overrides:
dispose in class ActionDelegate

runWithEvent

public void runWithEvent(
IAction action,
                         
Event event)
Description copied from class: ActionDelegate
The ActionDelegate implementation of this IActionDelegate2 method redirects to the run method. Subclasses may reimplement.

Specified by:
runWithEvent in interface IActionDelegate2
Overrides:
runWithEvent in class AbstractRulerActionDelegate
Parameters:
action - the action proxy that handles the presentation portion of the action
event - the SWT event which triggered this action being run

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire