[squeak-dev] The Inbox: Tools-kfr.657.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Nov 25 11:32:20 UTC 2015
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]
+ !
More information about the Squeak-dev
mailing list
|