A macro consists of a series of commonly used keystroke combinations, which are invoked by a simpler keystroke. The Java Source Editor comes with a few predefined macros. You can define your own macro by recording a series of keystrokes.
To record a Source Editor macro:
You should not use the mouse while recording a macro. If any of the steps of your macro cannot be done with a keyboard shortcut, create a shortcut for that step as described in Setting Keyboard Shortcuts.
"Recording" appears in the Source Editor status line.
The Recorded Macro dialog box is displayed.
The Add Shortcut Sequence dialog box is displayed. Press the key sequence you want to use to run this macro in the Shortcut Sequence field, and click OK.
As you press the key sequence, the correct syntax for that sequence automatically appears in the text field. For example, if you simultaneously hold down the Alt key, the Control key, and the J key, "Ctrl+Alt+J" appears.
![]() |
While recording a macro, do not rely on time-out features like the automatic
display of the Code Completion box. The time-out will not happen during
playback. If you want to use the code completion box in a macro, display it
explicitly while recording using Ctrl-spacebar.
See also | |
---|---|
Editing a Macro
Running a Macro Key Bindings Property Editor Using Code Completion |