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 |
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 <[hidden email]> 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 > > |
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 On Fri, Jan 19, 2018 at 15:21 Chris Muller <[hidden email]> wrote: I've wanted to see that before, too. There is a work-around by |
Hi Kjell,
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
|
Hi, there.
Like this? Find attached the ChangeSet. Best, Marcel
show-extension-classes.1.cs (12K) Download Attachment |
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 <[hidden email]> wrote: >Hi, there. > >Like this? > > >Find attached the ChangeSet. > >Best, >Marcel >Am 20.01.2018 00:52:50 schrieb Eliot Miranda <[hidden email]>: >Hi Kjell, > >On Jan 19, 2018, at 3:32 PM, Kjell Godo <[hidden email] [mailto:[hidden email]]> 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 <[hidden email] [mailto:[hidden email]]> 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 ><[hidden email] [mailto:[hidden email]]> 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 |
In reply to this post by marcel.taeumel
Hi Marcel, it's a tangent I know but I'm proud of it ;-). This method: !Browser class methodsFor: 'preferences' stamp: 'mt 1/20/2018 09:36'! showExtensionClasses: aBoolean ShowExtensionClasses := aBoolean.! ! is unnecessary. Delete it and try to change the preference. _,,,^..^,,,_ (phone)
|
In reply to this post by Louis LaBrunda
Hi,
there have been extensions to environments-related interfaces in the trunk since 5.1. You can replace "self environment" by "self selectedEnvironment" (in Browser and its subclasses), which should make it work in 5.1. Kind regards, Jakob 2018-01-20 17:14 GMT+01:00 Louis LaBrunda <[hidden email]>: > 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 <[hidden email]> wrote: > >>Hi, there. >> >>Like this? >> >> >>Find attached the ChangeSet. >> >>Best, >>Marcel >>Am 20.01.2018 00:52:50 schrieb Eliot Miranda <[hidden email]>: >>Hi Kjell, >> >>On Jan 19, 2018, at 3:32 PM, Kjell Godo <[hidden email] [mailto:[hidden email]]> 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 <[hidden email] [mailto:[hidden email]]> 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 >><[hidden email] [mailto:[hidden email]]> 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 > > |
In reply to this post by Eliot Miranda-2
> On 20.01.2018, at 18:34, Eliot Miranda <[hidden email]> wrote: > > Hi Marcel, > > it's a tangent I know but I'm proud of it ;-). This method: > > !Browser class methodsFor: 'preferences' stamp: 'mt 1/20/2018 09:36'! > showExtensionClasses: aBoolean > > ShowExtensionClasses := aBoolean.! ! > > is unnecessary. Delete it and try to change the preference. > IN what way? I would send Browser showExtensionClasses: true to change the pref... Best regards -Tobias > _,,,^..^,,,_ (phone) > > On Jan 20, 2018, at 1:57 AM, Marcel Taeumel <[hidden email]> wrote: > >> Hi, there. >> >> Like this? >> >> <image.png> >> >> Find attached the ChangeSet. >> >> Best, >> Marcel >>> Am 20.01.2018 00:52:50 schrieb Eliot Miranda <[hidden email]>: >>> >>> Hi Kjell, >>> >>> On Jan 19, 2018, at 3:32 PM, Kjell Godo <[hidden email]> 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 <[hidden email]> 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 >>>> <[hidden email]> 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 >>>> > >>>> > >>>> >>>> >> <show-extension-classes.1.cs> >> > |
In reply to this post by marcel.taeumel
> On 20-01-2018, at 1:57 AM, Marcel Taeumel <[hidden email]> wrote: > > <show-extension-classes.1.cs> I like the idea but Wholly Khao does it slow things down horribly! A Spyon of PackageInfo>>extensionClasses is a bit scary. 3% of time just to hash ISO88597ClipboardInterpreter class ? Another 7+% for other hashing? Using ProtoObject>>withAllSubclassesDo: interactively seems a bit crazy too. A little code improvement in a few places ought to make it usable though tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim As far as we know, our computer has never had an undetected error. |
In reply to this post by Tobias Pape
Hi Tobias,
> On Jan 20, 2018, at 11:21 AM, Tobias Pape <[hidden email]> wrote: > > >> On 20.01.2018, at 18:34, Eliot Miranda <[hidden email]> wrote: >> >> Hi Marcel, >> >> it's a tangent I know but I'm proud of it ;-). This method: >> >> !Browser class methodsFor: 'preferences' stamp: 'mt 1/20/2018 09:36'! >> showExtensionClasses: aBoolean >> >> ShowExtensionClasses := aBoolean.! ! >> >> is unnecessary. Delete it and try to change the preference. >> > > IN what way? I would send > Browser showExtensionClasses: true > to change the pref... But if you use the preferences browser it doesn't need the setter. It can access the variable by analyzing the getter method. > > Best regards > -Tobias > > >> _,,,^..^,,,_ (phone) >> >>> On Jan 20, 2018, at 1:57 AM, Marcel Taeumel <[hidden email]> wrote: >>> >>> Hi, there. >>> >>> Like this? >>> >>> <image.png> >>> >>> Find attached the ChangeSet. >>> >>> Best, >>> Marcel >>>> Am 20.01.2018 00:52:50 schrieb Eliot Miranda <[hidden email]>: >>>> >>>> Hi Kjell, >>>> >>>>> On Jan 19, 2018, at 3:32 PM, Kjell Godo <[hidden email]> 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 <[hidden email]> 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 >>>>> <[hidden email]> 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 >>>>>> >>>>>> >>>>> >>>>> >>> <show-extension-classes.1.cs> >>> >> > > |
> On 21.01.2018, at 06:46, Eliot Miranda <[hidden email]> wrote: > > Hi Tobias, > > >> On Jan 20, 2018, at 11:21 AM, Tobias Pape <[hidden email]> wrote: >> >> >>> On 20.01.2018, at 18:34, Eliot Miranda <[hidden email]> wrote: >>> >>> Hi Marcel, >>> >>> it's a tangent I know but I'm proud of it ;-). This method: >>> >>> !Browser class methodsFor: 'preferences' stamp: 'mt 1/20/2018 09:36'! >>> showExtensionClasses: aBoolean >>> >>> ShowExtensionClasses := aBoolean.! ! >>> >>> is unnecessary. Delete it and try to change the preference. >>> >> >> IN what way? I would send >> Browser showExtensionClasses: true >> to change the pref... > > But if you use the preferences browser it doesn't need the setter. It can access the variable by analyzing the getter method. Cool. No really :D But how do I set that during image provisioning without the setter? Best regards -Tobias > >> >> Best regards >> -Tobias >> >> >>> _,,,^..^,,,_ (phone) >>> >>>> On Jan 20, 2018, at 1:57 AM, Marcel Taeumel <[hidden email]> wrote: >>>> >>>> Hi, there. >>>> >>>> Like this? >>>> >>>> <image.png> >>>> >>>> Find attached the ChangeSet. >>>> >>>> Best, >>>> Marcel >>>>> Am 20.01.2018 00:52:50 schrieb Eliot Miranda <[hidden email]>: >>>>> >>>>> Hi Kjell, >>>>> >>>>>> On Jan 19, 2018, at 3:32 PM, Kjell Godo <[hidden email]> 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 <[hidden email]> 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 >>>>>> <[hidden email]> 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 >>>>>>> >>>>>>> >>>>>> >>>>>> >>>> <show-extension-classes.1.cs> |
In reply to this post by Eliot Miranda-2
Hi Eliot, I do need the setter to update all existing browsers. Yet, that side effect is not in the change set at the moment. :-) Best, Marcel
|
In reply to this post by Jakob Reschke
Hi Louis, here is a change set for Squeak 5.1. Best, Marcel
show-extension-classes-squeak51.1.cs (13K) Download Attachment |
Hi Marcel,
Thanks you very much, that is exactly what I was looking for. Lou On Sun, 21 Jan 2018 09:52:08 +0100, Marcel Taeumel <[hidden email]> wrote: >Hi Louis, > >here is a change set for Squeak 5.1. > >Best, >Marcel >Am 20.01.2018 19:40:55 schrieb Jakob Reschke <[hidden email]>: >Hi, > >there have been extensions to environments-related interfaces in the >trunk since 5.1. You can replace "self environment" by "self >selectedEnvironment" (in Browser and its subclasses), which should >make it work in 5.1. > >Kind regards, >Jakob > >2018-01-20 17:14 GMT+01:00 Louis LaBrunda : >> 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 wrote: >> >>>Hi, there. >>> >>>Like this? >>> >>> >>>Find attached the ChangeSet. >>> >>>Best, >>>Marcel >>>Am 20.01.2018 00:52:50 schrieb Eliot Miranda : >>>Hi Kjell, >>> >>>On Jan 19, 2018, at 3:32 PM, Kjell Godo 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 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 >>> 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 >> >> > Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon |
Free forum by Nabble | Edit this page |