JetBrains/kotlin — pull request #355 by ElliotM (2014-02-06 12:06:27+00:00)
Title: Task 0 First Pull Request

Hi, Ross Hanson here. Here's my work for task 0.

The intention is named 'ReplaceGetWithBrackets' and is fairly straightforward. I have one construct (using ':?' to preemptively return a value if a variable is null) that may not be very idiomatic to Kotlin. Perl has something similar that is quite popular so I figured I'd give it a go; if this is a wrong choice, style-wise, I'll be happy to change it.

I have a number of test cases that cover standalone get functions, named arguments, no arguments, and multiple arguments. These all work and appear to cover the use cases as far as I can tell, but I'm sure I could have missed a case or two. The only potentially undesirable behavior is caret placement after the transform, which could be more consistent.

Finally, I have a bit of an odd build on my end that required pretty extensive changes to IDEA's setup. I can't imagine this will affect the plugin's performance but please let me know if environment differences could be a factor and I'll do my best to fix them.

Thanks,
Ross