Trying to do a structural find and replace
Answered
I want to rename my @RequestMapping annotations to @GetMapping, @PutMapping ... annotations.
I tried adding the following in the search
@RequestMapping( $key$ = $value$)
Added a filter on the key. text=method
Now I want to extract the from the value (RequestMethod.GET) , the word after . (period). and then in the replacement add
@[Word]Mapping( [everything except the key,value that was extracted in the search])
Is this possible in IntelliJ using structural replace without having to write a custom plugin?
Please sign in to leave a comment.
This is currently not supported by Structural Search and Replace, because of a bug. Follow the issue to get a notification when it is fixed.
Bas
Hi. Could you please provide example of original string and a string after the replace?
Here is an example of before and after:
Before:
After:
Hi.
This is currently not supported by Structural Search and Replace, because of a bug. Follow the issue to get a notification when it is fixed.
Bas
Is this still not supported? If so, making intellij plugin is the only valid way for now?