Highlight %X patterns in String.format() as cursor moves through arguments

See the image attached - long or complex String.format() expressions may contain quite some %X patterns and lot's of corresponding actual arguments. When it happens - tracking to which %X belongs every actual argument is becoming not very easy, one has to simply do it with his eyes. I think IDEA could help a lot in that point by highlighting the %X portion of the pattern (with a red square border, may be ?) when cursor moves through the actual arguments.

This way "visually binding" every argument to where it belongs in a potentially long and complex pattern will be just a pleasure ..



Attachment(s):
1.png
5 comments
Comment actions Permalink

+1

Similar behavior could be implemented for MessageFormat.format().

Regards,
Jens

0
Comment actions Permalink

Right, that would be outstanding.

0
Comment actions Permalink

String.printf() is another candidate.

0
Comment actions Permalink

And / or everything corresponding to an argument labeled with IntelliLang's @PrintFormat annotation.

RRS

0
Comment actions Permalink

+1
Great idea. It'd be nice if it went both ways; In other words hovering over the %X highlights the corresponding argument, and hovering over the argument highlights the corresponding %X.

Sounds like enough people like the idea. Might I suggest opening a JIRA so we can vote for it.

0

Please sign in to leave a comment.