java.lang.Objectcom.ibm.jdg2e.actions.ide.TextEditorWordCountAction
A Workbench toolbar action is defined that counts the words in the selected area of a text file. See Chapter 21 for a discussion of the implementation.
IEditorActionDelegate| Constructor Summary | |
TextEditorWordCountAction()
|
|
| Method Summary | |
void |
run(org.eclipse.jface.action.IAction action)
Counts the words in the selected text and displays the result in a dialog |
void |
selectionChanged(org.eclipse.jface.action.IAction action,
org.eclipse.jface.viewers.ISelection selection)
Enables the action if text has been selected, otherwise, the action is disabled. |
void |
setActiveEditor(org.eclipse.jface.action.IAction action,
org.eclipse.ui.IEditorPart targetEditor)
Saves a reference to the current active editor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TextEditorWordCountAction()
| Method Detail |
public void run(org.eclipse.jface.action.IAction action)
run in interface org.eclipse.ui.IActionDelegateIActionDelegate.run(IAction)
public void selectionChanged(org.eclipse.jface.action.IAction action,
org.eclipse.jface.viewers.ISelection selection)
selectionChanged in interface org.eclipse.ui.IActionDelegateIActionDelegate.selectionChanged(IAction, ISelection)
public void setActiveEditor(org.eclipse.jface.action.IAction action,
org.eclipse.ui.IEditorPart targetEditor)
setActiveEditor in interface org.eclipse.ui.IEditorActionDelegateIEditorActionDelegate.setActiveEditor(IAction,
IEditorPart)