Issue
Is it possible to write replacement macros for NetBeans?
I need to replace function is_active
with function isActive
. It seems that is not possible with short regex.
So I wonder is it possible to write such macros?
Solution
Crazy macros code....
We cannot use find properly, so I decieded to use find-selection
caret-begin
"function[^(]*_[a-z]"
selection-begin-line
find-selection
remove-selection
find
# there is no loop, so you need to repeat this lines many-many times (too many may hang your IDE)
caret-begin
find-next
caret-forward
caret-backward
delete-previous
to-upper-case
To use this macros you need to set the focus on a document and have turned on regex find option.
Warning, could spoil your code.
Answered By - sectus
Answer Checked By - Willingham (JavaFixing Volunteer)