|
Tim,
The entry in the UserPreferences is because the SUnitBrowser class
declared itself to be a Tool (see the SUnitBrowser class>>initialize
method). The #publishedAspects of the class now appear as changeable
options in the UserPreferences.
The ability to change the class used for a specific task (e.g. which
formatter class to use) is a different thing, although it uses the same
mechanism. For those the DevelopmentSystem defines #publishedAspects
for each tool type and allows you to change the default tool class. To
access the choice programatically you ask the default SmalltalkSystem ,
as in ....
SmalltalkSystem current formatterClass
To get the same behaviour for the SUnitBrowser you would have to add
support for it as a #publishedAspect of the DevelopmentSystem (aka the
(Refactoring)SmalltalkSystem class) and then change all references to
SUnitBrowser to ask the DevelopmentSystem which class to use when
browsing unit tests.
So the short answer is no, you have to use the Class name. FWIW, I
would guess the
Smalltalk at: #SUnitBrowser ifAbsent: []
test was needed because the SUnitBrowser wasn't originally supplied with
the Dolphin image but was a, possibly missing, add-on.
Ian
|