A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-kfr.657.mcz ==================== Summary ==================== Name: Tools-kfr.657 Author: kfr Time: 25 November 2015, 12:31:59.64 pm UUID: 4c535bc5-5f99-42b3-8caa-4dc9bafb00ba Ancestors: Tools-kfr.656 Adds a toggle to show packages alphabetically in the PackagePaneBrowser =============== Diff against Tools-kfr.656 =============== Item was changed: Browser subclass: #PackagePaneBrowser + instanceVariableNames: 'package packageListIndex packageList packageListSorted' - instanceVariableNames: 'package packageListIndex packageList' classVariableNames: '' poolDictionaries: '' category: 'Tools-Browser'! !PackagePaneBrowser commentStamp: '<historical>' prior: 0! A package browser represents a hierarchical query path through an organization of class and method information. It parses class categories into a two-level hierarchy on the first '-' character, giving "packages" (e.g., Magnitude, Collections, Graphics, etc.), and "categories" (e.g., Magnitude-General and Magnitude-Number). Instance Variables: package <Symbol> the "category header," e.g., #Magnitudes or #Collections packageListIndex <Integer> The index in the package list packageList <OrderedCollection of String> the list of package names ! Item was changed: ----- Method: PackagePaneBrowser>>mainPackageMenu: (in category 'package list') ----- mainPackageMenu: aMenu "Answer a Menu of operations on class packages to be displayed when the operate menu button is pressed." <packageListMenu> ^aMenu addList: #( ('find class...' findClass) ('recent classes...' recent) - ('reorganize' editSystemCategories) + ('show alphabetically' togglePackageListSorted) + ('show unsorted' togglePackageListSorted) ('update' updatePackages)); yourself. ! Item was changed: ----- Method: PackagePaneBrowser>>packageList (in category 'package list') ----- packageList "Answer a list of the packages in the current system organization." | str stream | str := Set new: 100. stream := WriteStream on: (Array new: 100). systemOrganizer categories do: [ :categ | | cats | cats := categ asString copyUpTo: $-. (str includes: cats) ifFalse: [str add: cats. stream nextPut: cats]]. + packageListSorted + ifTrue:[ ^stream contents sorted] + ifFalse:[ ^stream contents]! - ^stream contents! Item was changed: ----- Method: PackagePaneBrowser>>systemOrganizer: (in category 'initialize-release') ----- systemOrganizer: aSystemOrganizer "Initialize the receiver as a perspective on the system organizer, aSystemOrganizer. Typically there is only one--the system variable SystemOrganization." super systemOrganizer: aSystemOrganizer . + packageListIndex := 0. + packageListSorted := false! - packageListIndex := 0! Item was added: + ----- Method: PackagePaneBrowser>>togglePackageListSorted (in category 'package list') ----- + togglePackageListSorted + packageListSorted + ifTrue:[ packageListSorted := false] + ifFalse:[ packageListSorted := true] + ! |
There is already an "alphabetize" function.
On Wed, Nov 25, 2015 at 5:32 AM, <[hidden email]> wrote: > A new version of Tools was added to project The Inbox: > http://source.squeak.org/inbox/Tools-kfr.657.mcz > > ==================== Summary ==================== > > Name: Tools-kfr.657 > Author: kfr > Time: 25 November 2015, 12:31:59.64 pm > UUID: 4c535bc5-5f99-42b3-8caa-4dc9bafb00ba > Ancestors: Tools-kfr.656 > > Adds a toggle to show packages alphabetically in the PackagePaneBrowser > > =============== Diff against Tools-kfr.656 =============== > > Item was changed: > Browser subclass: #PackagePaneBrowser > + instanceVariableNames: 'package packageListIndex packageList packageListSorted' > - instanceVariableNames: 'package packageListIndex packageList' > classVariableNames: '' > poolDictionaries: '' > category: 'Tools-Browser'! > > !PackagePaneBrowser commentStamp: '<historical>' prior: 0! > A package browser represents a hierarchical query path through an organization of class and method information. It parses class categories into a two-level hierarchy on the first '-' character, giving "packages" (e.g., Magnitude, Collections, Graphics, etc.), and "categories" (e.g., Magnitude-General and Magnitude-Number). > > Instance Variables: > package <Symbol> the "category header," e.g., #Magnitudes or #Collections > packageListIndex <Integer> The index in the package list > packageList <OrderedCollection of String> the list of package names > ! > > Item was changed: > ----- Method: PackagePaneBrowser>>mainPackageMenu: (in category 'package list') ----- > mainPackageMenu: aMenu > "Answer a Menu of operations on class packages to be > displayed when the operate menu button is pressed." > <packageListMenu> > ^aMenu addList: #( > ('find class...' findClass) > ('recent classes...' recent) > - > ('reorganize' editSystemCategories) > + ('show alphabetically' togglePackageListSorted) > + ('show unsorted' togglePackageListSorted) > ('update' updatePackages)); > yourself. > ! > > Item was changed: > ----- Method: PackagePaneBrowser>>packageList (in category 'package list') ----- > packageList > "Answer a list of the packages in the current system organization." > > | str stream | > str := Set new: 100. > stream := WriteStream on: (Array new: 100). > systemOrganizer categories do: > [ :categ | | cats | > cats := categ asString copyUpTo: $-. > (str includes: cats) ifFalse: > [str add: cats. > stream nextPut: cats]]. > + packageListSorted > + ifTrue:[ ^stream contents sorted] > + ifFalse:[ ^stream contents]! > - ^stream contents! > > Item was changed: > ----- Method: PackagePaneBrowser>>systemOrganizer: (in category 'initialize-release') ----- > systemOrganizer: aSystemOrganizer > "Initialize the receiver as a perspective on the system organizer, > aSystemOrganizer. Typically there is only one--the system variable > SystemOrganization." > > super systemOrganizer: aSystemOrganizer . > + packageListIndex := 0. > + packageListSorted := false! > - packageListIndex := 0! > > Item was added: > + ----- Method: PackagePaneBrowser>>togglePackageListSorted (in category 'package list') ----- > + togglePackageListSorted > + packageListSorted > + ifTrue:[ packageListSorted := false] > + ifFalse:[ packageListSorted := true] > + ! > > |
In the package pane menu? I could not see it. It was just 4 items in the menu. Best, Karl On Wed, Nov 25, 2015 at 5:14 PM, Chris Muller <[hidden email]> wrote: There is already an "alphabetize" function. |
Ah, looks like our difference is in the "Browser shows package pane" preference.
When it is off, there is a "alphabetize" there. When its on, the "alphabetize" is in the second pane. In both cases it alphabetizes all system categories.. On Wed, Nov 25, 2015 at 1:01 PM, karl ramberg <[hidden email]> wrote: > In the package pane menu? > I could not see it. It was just 4 items in the menu. > > Best, > Karl > > > On Wed, Nov 25, 2015 at 5:14 PM, Chris Muller <[hidden email]> wrote: >> >> There is already an "alphabetize" function. >> >> On Wed, Nov 25, 2015 at 5:32 AM, <[hidden email]> wrote: >> > A new version of Tools was added to project The Inbox: >> > http://source.squeak.org/inbox/Tools-kfr.657.mcz >> > >> > ==================== Summary ==================== >> > >> > Name: Tools-kfr.657 >> > Author: kfr >> > Time: 25 November 2015, 12:31:59.64 pm >> > UUID: 4c535bc5-5f99-42b3-8caa-4dc9bafb00ba >> > Ancestors: Tools-kfr.656 >> > >> > Adds a toggle to show packages alphabetically in the PackagePaneBrowser >> > >> > =============== Diff against Tools-kfr.656 =============== >> > >> > Item was changed: >> > Browser subclass: #PackagePaneBrowser >> > + instanceVariableNames: 'package packageListIndex packageList >> > packageListSorted' >> > - instanceVariableNames: 'package packageListIndex packageList' >> > classVariableNames: '' >> > poolDictionaries: '' >> > category: 'Tools-Browser'! >> > >> > !PackagePaneBrowser commentStamp: '<historical>' prior: 0! >> > A package browser represents a hierarchical query path through an >> > organization of class and method information. It parses class categories >> > into a two-level hierarchy on the first '-' character, giving "packages" >> > (e.g., Magnitude, Collections, Graphics, etc.), and "categories" (e.g., >> > Magnitude-General and Magnitude-Number). >> > >> > Instance Variables: >> > package <Symbol> the "category header," e.g., #Magnitudes or >> > #Collections >> > packageListIndex <Integer> The index in the package list >> > packageList <OrderedCollection of String> the list of package >> > names >> > ! >> > >> > Item was changed: >> > ----- Method: PackagePaneBrowser>>mainPackageMenu: (in category >> > 'package list') ----- >> > mainPackageMenu: aMenu >> > "Answer a Menu of operations on class packages to be >> > displayed when the operate menu button is pressed." >> > <packageListMenu> >> > ^aMenu addList: #( >> > ('find class...' findClass) >> > ('recent classes...' recent) >> > - >> > ('reorganize' editSystemCategories) >> > + ('show alphabetically' togglePackageListSorted) >> > + ('show unsorted' togglePackageListSorted) >> > ('update' >> > updatePackages)); >> > yourself. >> > ! >> > >> > Item was changed: >> > ----- Method: PackagePaneBrowser>>packageList (in category 'package >> > list') ----- >> > packageList >> > "Answer a list of the packages in the current system >> > organization." >> > >> > | str stream | >> > str := Set new: 100. >> > stream := WriteStream on: (Array new: 100). >> > systemOrganizer categories do: >> > [ :categ | | cats | >> > cats := categ asString copyUpTo: $-. >> > (str includes: cats) ifFalse: >> > [str add: cats. >> > stream nextPut: cats]]. >> > + packageListSorted >> > + ifTrue:[ ^stream contents sorted] >> > + ifFalse:[ ^stream contents]! >> > - ^stream contents! >> > >> > Item was changed: >> > ----- Method: PackagePaneBrowser>>systemOrganizer: (in category >> > 'initialize-release') ----- >> > systemOrganizer: aSystemOrganizer >> > "Initialize the receiver as a perspective on the system >> > organizer, >> > aSystemOrganizer. Typically there is only one--the system >> > variable >> > SystemOrganization." >> > >> > super systemOrganizer: aSystemOrganizer . >> > + packageListIndex := 0. >> > + packageListSorted := false! >> > - packageListIndex := 0! >> > >> > Item was added: >> > + ----- Method: PackagePaneBrowser>>togglePackageListSorted (in category >> > 'package list') ----- >> > + togglePackageListSorted >> > + packageListSorted >> > + ifTrue:[ packageListSorted := false] >> > + ifFalse:[ packageListSorted := true] >> > + ! >> > >> > >> > |
Ok, I'll remove this change Best, Karl On Thu, Nov 26, 2015 at 12:49 AM, Chris Muller <[hidden email]> wrote: Ah, looks like our difference is in the "Browser shows package pane" preference. |
Hi Karl,
On 26.11.2015, at 06:35, karl ramberg <[hidden email]> wrote: > Ok, > I'll remove this change I'm fine with the change. Also, contrary to 'alphabetize', you change just sorts the packages as presented, not in the system organizer, which has benefits on its own :) Best regards -Tobias > > Best, > Karl > > On Thu, Nov 26, 2015 at 12:49 AM, Chris Muller <[hidden email]> wrote: > Ah, looks like our difference is in the "Browser shows package pane" preference. > > When it is off, there is a "alphabetize" there. When its on, the > "alphabetize" is in the second pane. In both cases it alphabetizes > all system categories.. > > On Wed, Nov 25, 2015 at 1:01 PM, karl ramberg <[hidden email]> wrote: > > In the package pane menu? > > I could not see it. It was just 4 items in the menu. > > > > Best, > > Karl > > > > > > On Wed, Nov 25, 2015 at 5:14 PM, Chris Muller <[hidden email]> wrote: > >> > >> There is already an "alphabetize" function. > >> > >> On Wed, Nov 25, 2015 at 5:32 AM, <[hidden email]> wrote: > >> > A new version of Tools was added to project The Inbox: > >> > http://source.squeak.org/inbox/Tools-kfr.657.mcz > >> > > >> > ==================== Summary ==================== > >> > > >> > Name: Tools-kfr.657 > >> > Author: kfr > >> > Time: 25 November 2015, 12:31:59.64 pm > >> > UUID: 4c535bc5-5f99-42b3-8caa-4dc9bafb00ba > >> > Ancestors: Tools-kfr.656 > >> > > >> > Adds a toggle to show packages alphabetically in the PackagePaneBrowser > >> > > >> > =============== Diff against Tools-kfr.656 =============== > >> > > >> > Item was changed: > >> > Browser subclass: #PackagePaneBrowser > >> > + instanceVariableNames: 'package packageListIndex packageList > >> > packageListSorted' > >> > - instanceVariableNames: 'package packageListIndex packageList' > >> > classVariableNames: '' > >> > poolDictionaries: '' > >> > category: 'Tools-Browser'! > >> > > >> > !PackagePaneBrowser commentStamp: '<historical>' prior: 0! > >> > A package browser represents a hierarchical query path through an > >> > organization of class and method information. It parses class categories > >> > into a two-level hierarchy on the first '-' character, giving "packages" > >> > (e.g., Magnitude, Collections, Graphics, etc.), and "categories" (e.g., > >> > Magnitude-General and Magnitude-Number). > >> > > >> > Instance Variables: > >> > package <Symbol> the "category header," e.g., #Magnitudes or > >> > #Collections > >> > packageListIndex <Integer> The index in the package list > >> > packageList <OrderedCollection of String> the list of package > >> > names > >> > ! > >> > > >> > Item was changed: > >> > ----- Method: PackagePaneBrowser>>mainPackageMenu: (in category > >> > 'package list') ----- > >> > mainPackageMenu: aMenu > >> > "Answer a Menu of operations on class packages to be > >> > displayed when the operate menu button is pressed." > >> > <packageListMenu> > >> > ^aMenu addList: #( > >> > ('find class...' findClass) > >> > ('recent classes...' recent) > >> > - > >> > ('reorganize' editSystemCategories) > >> > + ('show alphabetically' togglePackageListSorted) > >> > + ('show unsorted' togglePackageListSorted) > >> > ('update' > >> > updatePackages)); > >> > yourself. > >> > ! > >> > > >> > Item was changed: > >> > ----- Method: PackagePaneBrowser>>packageList (in category 'package > >> > list') ----- > >> > packageList > >> > "Answer a list of the packages in the current system > >> > organization." > >> > > >> > | str stream | > >> > str := Set new: 100. > >> > stream := WriteStream on: (Array new: 100). > >> > systemOrganizer categories do: > >> > [ :categ | | cats | > >> > cats := categ asString copyUpTo: $-. > >> > (str includes: cats) ifFalse: > >> > [str add: cats. > >> > stream nextPut: cats]]. > >> > + packageListSorted > >> > + ifTrue:[ ^stream contents sorted] > >> > + ifFalse:[ ^stream contents]! > >> > - ^stream contents! > >> > > >> > Item was changed: > >> > ----- Method: PackagePaneBrowser>>systemOrganizer: (in category > >> > 'initialize-release') ----- > >> > systemOrganizer: aSystemOrganizer > >> > "Initialize the receiver as a perspective on the system > >> > organizer, > >> > aSystemOrganizer. Typically there is only one--the system > >> > variable > >> > SystemOrganization." > >> > > >> > super systemOrganizer: aSystemOrganizer . > >> > + packageListIndex := 0. > >> > + packageListSorted := false! > >> > - packageListIndex := 0! > >> > > >> > Item was added: > >> > + ----- Method: PackagePaneBrowser>>togglePackageListSorted (in category > >> > 'package list') ----- > >> > + togglePackageListSorted > >> > + packageListSorted > >> > + ifTrue:[ packageListSorted := false] > >> > + ifFalse:[ packageListSorted := true] > >> > + ! > >> > > >> > > >> > > > > |
I like the "soft" sorting, too. Sometimes it's nice to have different views on the class tree. With "hard" sorting it's a one way street. Best, Karl On Thu, Nov 26, 2015 at 7:14 AM, Tobias Pape <[hidden email]> wrote: Hi Karl, |
Free forum by Nabble | Edit this page |