| java.lang.Object org.eclipse.ui.internal.texteditor.CompoundEditExitStrategy
CompoundEditExitStrategy | final public class CompoundEditExitStrategy (Code) | | Exit strategy for commands that want to fold repeated execution into one compound edit. See
org.eclipse.jface.text.IRewriteTarget.endCompoundChange IRewriteTarget.endCompoundChange .
As long as a strategy is installed on an
ITextViewer , it will detect the end of a
compound operation when any of the following conditions becomes true:
- the viewer's text widget loses the keyboard focus
- the mouse is clicked or double clicked inside the viewer's widget
- a command other than the ones specified is executed
- the viewer receives any key events that are not modifier combinations
If the end of a compound edit is detected, any registered
ICompoundEditListener s are
notified and the strategy is disarmed (spring-loaded).
since: 3.1 |
CompoundEditExitStrategy | public CompoundEditExitStrategy(String commandId)(Code) | | Creates a new strategy, equivalent to calling
.
Parameters: commandId - the command id of the repeatable command |
CompoundEditExitStrategy | public CompoundEditExitStrategy(String[] commandIds)(Code) | | Creates a new strategy, ending upon execution of any command other than the ones
specified.
Parameters: commandIds - the ids of the repeatable commands |
addCompoundListener | public void addCompoundListener(ICompoundEditListener listener)(Code) | | Adds a compound edit listener. Multiple registration is possible. Note that the receiver is
automatically disarmed before the listeners are notified.
Parameters: listener - the new listener |
arm | public void arm(ITextViewer viewer)(Code) | | Installs the receiver on viewer and arms it. After this call returns, any
registered listeners will be notified if a compound edit ends.
Parameters: viewer - the viewer to install on |
disarm | public void disarm()(Code) | | Disarms the receiver. After this call returns, any registered listeners will be not be
notified any more until install is called again. Note that the listeners are
not removed.
Note that the receiver is automatically disarmed when the end of a compound edit has
been detected and before the listeners are notified.
|
removeCompoundListener | public void removeCompoundListener(ICompoundEditListener listener)(Code) | | Removes a compound edit listener. If listener is registered multiple times, an
arbitrary instance is removed. If listener is not currently registered,
nothing happens.
Parameters: listener - the listener to be removed. |
|
|