Le 22/09/2015 19:14, Jan Vrany a écrit :
RBTransformationRule (you need to activate that verificationBlock
when
you create your rewriter).
Yes, and this is the tricky bit :-) Because there's no guarantee that
this block is functional. For example, it may access context ivar
which, by the time UI is retrieving intervals is already nilled out
or even filled again with some other unrelated context if you're
reusing rule instances (but if not, you may run into performance
problems...)
I'm not sure I see the issue. That block is evaluated just when you
match, before the rewrite. So, at that point, everything is valid.
You're right, the node may not be valid anymore after the rewrite if I
record the node. But if I record a copy of that source and the index
(you ask complete source to that node and startPosition / stopPosition)
then you're set for highlighting.
Thierry