On Friday 07 May 2010 20:37:24 Kevin Wright wrote:
> So this one will be a question for Mirko then :)
And here I am :-)
> How does the refactoring tool cope in the face of synthetic methods?
> A good example would be the getters/setters produced by the @BeanProperty
> annotation, or some of the stuff done for case classes
Yes, there's a lot of stuff in the AST generated by the compiler that has no
direct representation in the source code. But luckily, all these Trees have an
Offset-Position, whereas "real" Trees have a RangePosition. For the most parts
in the refactorings, all trees with an OffsetPosition are simply ignored..
> I ask because I'm looking to do more of this kind of trickery with
> compiler-plugins in the future.
As long as all the new things you introduce have OffsetPositions, the
refactorings won't be irritated :-)
Cheers
Mirko
--
Mirko Stocker |
m...@misto.ch
Work:
http://ifs.hsr.ch |
http://infoq.com
Personal:
http://misto.ch |
http://twitter.com/m_st