I have many JSP files with EL expressions of the form ${foo.bar.baz.phleem1} , ${foo.bar.baz.phleem2} , etc. (the first two or three segments are equal). To reduce the EL search, I am refactoring these pages:
A source:
<c:out value="${foo.bar.baz.phleem1}" /> <c:out value="${foo.bar.baz.phleem2}" /> <c:out value="${foo.bar.baz.phleem3}" />
After refactoring:
<c:set var="baz" value="${foo.bar.baz}" /> <c:out value="${baz.phleem1}" /> <c:out value="${baz.phleem2}" /> <c:out value="${baz.phleem3}" />
I know that I can do most of this with search / replace, but it feels unsafe as it ignores the code structure.
Is there any support for this type of refactoring in Eclipse or IntelliJ Idea?
source share