>> Note that the classes contain actually excellent documentation.
>>
> Do you have any particular one in mind?

You asked about the AST nodes.

> I traced OB's execution to
> RBStringReplaceRule and then looked up the hierarchy finding basic
> few-sentence descriptions, but nothing in-depth about how to search and
> replace.

That's a private internal class, you are not supposed to instantiate it. You
find documentation about the rewrite engine in the first link I sent you.

>> Actually you can do it with a few clicks: Select #deprecated:, click
>> on "Refactor method > Add parameter" and follow the instructions.
>>
> Notice I asked about the API, not about the OB GUI.

I couldn't guess that.

> I needed to
> programmatically change each one depending on the sender's timeStamp and
the
> collections of what was deprecated in which version. Also, there are
already
> methods in the system with the name I'm changing to, so OB just mentions
> that and fails.

A few more clicks and you have a refactoring scope on any method set you
want.

> Let me ask maybe a better question - how would you do the following
> programmatically?

I would crete a rewriter for each case, instantiate a RBNamespace, iterate
over all methods within, and apply the rewriters if necessary, then review
the changeset, and apply it.

Cheers,
Lukas

-- 
Lukas Renggli
www.lukas-renggli.ch

Reply via email to