There's low traffic in the eap forum, so if you have some
time left, check this statement:
return format(rec.getMinX() + "," + format(rec.getMinY() + " - " +
format(rec.getMaxX() + "," + format(rec.getMaxY() +
" w=" + format(rec.getWidth() + " h=" + format(rec.getHeight();
obviously there are some closing brackets missing.
What I did was doing a replace on the original statement, which looked like this:
return (long) rec.getMinX() ...
So I replaced (long) by format(
which of coursed leaded to missing closing brackets.
-> so this leads to the first possible improvement that
comes to my mind: if I could make the replace like this:
replace "(long) $EXPRESSION" with "format($EXPRESSION)"
I guess it's not that trivial - but you get the IDEA ;)
-> second possible improvement:
if you take the first statement above and try shift-ctrl-enter (complete statement)I with it, you'll
see it fail gracefully ;) it just ends a lot of braces
at the very end of the statement.
So, what kind of intellig(j)ence would be required to
place the correct closing braces automatically?
I'm aware that it might not be 100% determinable.
But what about this: first do the current logic, then
find out that the resulting statement causes compiler failure. Then try the other logic = directly add a closing
bracket after each format(rec.getMinX()
-> find out that after it, the compiler is green and
leave it that way.
Would sth. like this be yet possible by current open APIs?
It can't be that difficult... ;)