String literal inspection question

Hi all,

I'm working on code with a lot of String literals at the moment, and I think the usability of the "Duplicate String literal" inspection could be improved with a relatively simple change. Firstly, say I have a string constant, but I haven't replaced the String with the constant everywhere yet. When viewing the constant definition, the string literal in its definition will be highlighted with a "Duplicate found" warning. This is ok, but the quickfix offered to me is "Introduce constant" (I already have one!) It would be great if the quickfix offered here were to replace all other instances of this string with the constant I already have.

I looked to see if there was a plugin for this already, but I couldn't find it. Should I file a JIRA?

Cheers,
Colin

Please sign in to leave a comment.