Dear Koh,
>In a method browser we can choose 'local implementors' and 'hierarchy
>implementors'. What is the difference?
>
Each Refactoring Browser has an environment that determines what portion
of the image it can see; see BrowserEnvironment and subclasses, or in
more recent VW versions, AbstractBrowserEnvironment and subclasses. An
instance of BrowserEnvironment itself can see the whole image. An
instance of a subclass can see only a subset. An environment is the
immediate model-layer of a RefactoringBrowser.
'Local implementors/senders' will search only within the environment of
the browser it is invoked from. Thus if you search for all implementors
of #initialize, select one of them that sends #new and thus search for
all local senders of #new, you will see only implementors of #initialize
that send #new.
It is possible to do programmatic construction and composition of
environments, using & and | and various other methods, and all
environments respond to #openEditor.
All this is a long-winded way of saying what Terry said. If you can see
an item in a browser, it will be found by a 'Local...' search. If you
cannot see that item in that browser, it will not be found by a local
search, though it might be found by a hierarchy or global search.
In older versions of the RB, 'Spawn Hierarchy' worked by constructing an
environment that only contained the class and its super and subclasses.
Newer versions do not do that - they open a browser on the whole image
with the class selected and displayed in hierarchy mode.
It is unfortunate that the "Local" nomenclature (chosen by John Brant)
happens to overlap with Envy's nomenclature for menus that do hierarchy
searches. I would defend John from the 'logical meaning of words' point
of view.
Yours faithfully
Niall Ross
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc