Book Image

Mastering Netbeans

5 (1)
Book Image

Mastering Netbeans

5 (1)

Overview of this book

Table of Contents (17 chapters)
Mastering NetBeans
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Macro recording and playback


In the previous sections, we've seen how to quickly insert stock code into a source code file via both code templates and dragging and dropping palette items. The next technique for modifying or inserting new code into a file that we will look at is macros.

Within NetBeans, macros allow us to capture screen recording and then assign the recording to a keyboard shortcut, which, when selected, will playback the recorded keystrokes. This can be very useful for performing automated tasks against a source code file or indeed, any editable file.

A basic installation of NetBeans is supplied with three existing macros. To view the macros that are stored within NetBeans, access the NetBeans Options menu (select Tools and then Options from the main menu on Windows and Linux or select NetBeans and then Preferences… from the menu on a Mac). In the Options dialog, select the Editor option and then the Macros tab to see how macros are defined within NetBeans:

As can be seen in...