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:


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.

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.

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?




Please sign in to leave a comment.