Parenthesizing expressions
Does IDEA have a way to taken an unparenthesized or incompletely
parenthesized expression and make it fully parenthesized? For example,
taking this:
int a =0, b=0, c=0, d=0, e=0,f=0;
a = b = c+ - d + --e / -f;
and producing this for the assignment?
a = (b = (((c+) - d) + ((--e) / (-f))));
I don't see any such function, but wanted to ask as there have been
times that functionality was tucked away somewhere that I didn't notice.
Thanks,
Jon
Please sign in to leave a comment.
Perhaps a more important question is: why would you write code like that? :)
"Jon Steelman" <steelman@mindspring.com> wrote in message
news:auj47o$rh4$1@is.intellij.net...
>
>
Blessed are those who maintain the elder's code, because the kingdom of heaven is theirs.
I think this could be done with the PSI api...
--
Composed with Newz Crawler 1.3 http://www.newzcrawler.com/
dimiter wrote:
>>Perhaps a more important question is: why would you write code like that? :)
You answer Ian question well.
That's encouraging.
Jon
Ian wrote:
Somebody I know wrote code with a 600 line anonymous inner class (that
also included a trailing method invocation at the end of the
declaration). Once you see enough stuff like that, you say to yourself,
"Why ask why?" followed by "Just give me the proper instruments so I can
give that code an enema." Over-the-counter or by prescription, IDEA is
the best enema around. ;)
Jon
Jon Steelman wrote:
Now there's a quote for the IntelliJ front page!
Ciao,
Gordon
--
Gordon Tyler
Software Developer, R&D
Sitraka (now part of Quest Software)
"Performance is Mission Critical"