[squeak-dev] System Browser feature request

Louis LaBrunda Lou at Keystone-Software.com
Sat Jan 20 16:14:46 UTC 2018


Hi Marcel,

Thanks for the change set.  Unfortunately when I try to file it in the method below gets a DNU
sending: self environment.  It seems Browser is missing the #environment method.

I'm using a Squeak 5.1 image.  I'm willing to upgrade it and played around trying to do that
but no luck.

What am I missing?

Lou

hierarchicalClassList
	"classNames are an arbitrary collection of classNames of the system.
	Reorder those class names so that they are sorted and indended by inheritance"
	
	| classes flatTree |
	
	self flag: #performance. "mt: Creating the hierarchy is *really slow* for the full class
list. Skip it for now."
	self selectedSystemCategory = SystemOrganizer allCategory
		ifTrue: [^ self defaultClassList].
		
	classes := self defaultClassList collect: [:sym | self environment classNamed: sym].
	flatTree := OrderedCollection new.
	
	self
		flattenHierarchyTree: (self createHierarchyTreeOf: classes)
		on: flatTree
		indent: ''.
	
	Browser showExtensionClasses ifTrue: [
		| extensionClasses extensionFlatTree |
		extensionClasses := self extensionClasses collect: [:ea | ea theNonMetaClass].
		extensionFlatTree := OrderedCollection new.
		self
			flattenHierarchyTree: (self createHierarchyTreeOf: extensionClasses)
			on: extensionFlatTree
			indent: ''.
		extensionFlatTree := extensionFlatTree collect: [:ea |
			ea asText
				addAttribute: (TextColor color: (self userInterfaceTheme extensionClassColor ifNil:
[Color gray: 0.75]));
				yourself].
		flatTree addAll: extensionFlatTree].
		
	^ flatTree
	
	




On Sat, 20 Jan 2018 10:57:20 +0100, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:

>Hi, there.
>
>Like this?
>
>
>Find attached the ChangeSet.
>
>Best,
>Marcel
>Am 20.01.2018 00:52:50 schrieb Eliot Miranda <eliot.miranda at gmail.com>:
>Hi Kjell,
>
>On Jan 19, 2018, at 3:32 PM, Kjell Godo <squeaklist at gmail.com [mailto:squeaklist at gmail.com]> wrote:
>
>
>this Monticello trick is very nice to know
>
>Dolphin Smalltalk has this in all the Class browsers and it is very nice
>and you can use it in your programming to make
>system wide cross package groupings or changes
>
>it is probably easy to do in Squeak Pharo
>
>just using a script 
>
>it would be cool to know what that script is
>
>just getting a sequence of Methods or method names would be good
>
>self systemNavigation alImplementorsOf: #foo
>
>answers a sequence of MethodReference which respond to #actualClass.  So...
>
>(self systemNavigation alImplementorsOf: #foo) do:
>    [:mr |
>     mr actualClass organization
>        classify: mr selector
>        under: '*MyPackage-daylight robbery']
>
>A hint is to inspect tool buttons that do things you'd like to do by script and trace through their implementation, ideally in the debugger.  Remember that in a self-implemented system everything will be accessible at the language level.  Just practice exploring a bit.
>
>Another hint is to use MethodFinder or Message Names.  I use the latter to program/browse across package and class boundaries.  Message Names takes s semicolon separated list of patterns so you can type things like
>    *senders*;*implementors*
>to find all selectors and methods in the system that match either of those.
>
>The system is so large now that this exploration is much more difficult than when it had 2,200 methods; it now has that number of classes and metaclasses.  But it is still possible and fruitful.  And looking at the core classes like Behavior, ClassDescription and CompiledMethod will provide you with tools you can use.
>
>HTH
>
>
>
>On Fri, Jan 19, 2018 at 15:21 Chris Muller <asqueaker at gmail.com [mailto:asqueaker at gmail.com]> wrote:
>
>I've wanted to see that before, too.  There is a work-around by
>browsing the package from the Monticello browser.  In there, you can
>see all the method extensions by class.
>
>On Fri, Jan 19, 2018 at 3:11 PM, Louis LaBrunda
><Lou at keystone-software.com [mailto:Lou at keystone-software.com]> wrote:
>> Hi All,
>>
>> In the System Browser with a category selected it would be nice to see not only the classes
>> defined as in the category but classes with methods added for the category.  This would allow
>> one to see classes extended by the category.  Different colors or highlighting to distinguish
>> them would also be nice.
>>
>> Sorry if I'm not using the correct terms for the browser and category.
>>
>> I have no idea how the Squeak browsers work nor how much effort this feature might take, so I
>> hope I'm not asking for too much.  It goes without saying, I don't think I know Squeak well
>> enough to tackle this myself.
>>
>> Lou
>> --
>> Louis LaBrunda
>> Keystone Software Corp.
>> SkypeMe callto://PhotonDemon [callto://PhotonDemon]
>>
>>
>
-- 
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon



More information about the Squeak-dev mailing list