Re-factoring JSP tags

Does anyone have any good/easy to do methods for re-factoring the locations of JSP tags? For instance if I want to move a tag from:

/WEB-INF/tags/a/foo.tag
to 
/WEB-INF/tags/b/foo.tag

The only way I can think of doing it is moving the file, doing a search/replace for the a:foo to b:foo and then making sure that the b tag library is referenced in each of those jsp files, an annoying system of steps.

2 comments
Comment actions Permalink

Idea should do this for you when you move the file.

Move the file using Refactor->Move (or F6) and insure that "Search in comments and strings" and "Search for text occurrences" is selected.

0
Comment actions Permalink

I would have expected the same thing, but IDEA does not work like you described.  The move of the tag works just fine, but none of the usages for the tag file get updated.  If you do a rename, all of the occurrences of the tag file get updated properly.  I suspect the issue may be that for these types of tag files, IDEA can't really know what taglib prefix to use for the new tag location (unless that taglib dir is already defined in the file containing the usage).

Does anyone else have any further input on this issue?

Thanks,

Brian

0

Please sign in to leave a comment.