Due to changes in the library I'm using, getters have been replaced with direct access to the property. For example:
public class MyLibraryClass { private String field; public String getField() { return field; } }
has become
public class MyLibraryClass { public String field; }
Therefore, I would like to use the IntelliJ SSR to replace getter calls with the Bean property. However, I am stuck on how to use regexp capture groups for my replacement. If there is another IntelliJ shortcut to accomplish what I want, I'm glad to use it.
The following SSR search options find getters, but it seems I can not use the capture group for $property$ in the replacement. I tried \1 and \$1 and $1 to see ( using backlinks in IntelliJ )
I also tried changing the search to $instance$.get$property$() (clearing the constraints for $property$ , but the search did not return any results.
- How to access the capture group (
$1 ) - Is it possible to do any processing at
$1 before replacing (to fix the case)
I noticed a Script text parameter that accepts Groovy code, however I could not find the documentation for this function.



intellij-idea intellij-13 structural-search
kierans
source share