[squeak-dev] The Trunk: Tools-ct.1175.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Sep 12 17:11:03 UTC 2022
Christoph Thiede uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ct.1175.mcz
==================== Summary ====================
Name: Tools-ct.1175
Author: ct
Time: 12 September 2022, 7:11:01.503585 pm
UUID: 9dd00133-03f0-074f-95da-9aa4bc0bedc0
Ancestors: Tools-ct.1173, Tools-ct.1174
Merges Tools-ct.1173:
Fixes package pane browser to actually use the package organizer instead of parsing the system category list. Resolves https://github.com/squeak-smalltalk/squeak-object-memory/issues/28.
Revision:
Don't use an instance variable for packageOrganizer, as the environment of the browser is already configurable. Remove never-read instvars 'package' and 'packageList'. Update class comment with refined examples.
Thanks to Jakob (jr) for the review!
=============== Diff against Tools-ct.1174 ===============
Item was changed:
Browser subclass: #PackagePaneBrowser
+ instanceVariableNames: 'packageListIndex'
- instanceVariableNames: 'package packageListIndex packageList'
classVariableNames: ''
poolDictionaries: ''
category: 'Tools-Browser'!
+ !PackagePaneBrowser commentStamp: 'ct 9/12/2022 19:09' prior: 0!
+ A package browser represents a hierarchical query path through an organization of class and method information. It nests classes into a two-level hierarchy that consists of the package (e.g., Kernel; FFI-Kernel) and the system category (e.g., Exception, Exceptions-Kernel, etc. for package Kernel; Support and empty for FFI-Kernel).
- !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:
+ packageListIndex <Integer> The current selected index in the package list.!
- 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>>packageList (in category 'package list') -----
packageList
- "Answer a list of the packages in the current system organization."
+ ^ self packageOrganizer packageNames sorted!
- | 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]].
- ^stream contents!
Item was changed:
----- Method: PackagePaneBrowser>>packageListIndex: (in category 'package list') -----
packageListIndex: anInteger
"Set anInteger to be the index of the current package selection."
packageListIndex := anInteger.
- anInteger = 0
- ifFalse: [package := self packageList at: packageListIndex].
selectedMessageCategoryName := nil.
self selectSystemCategory: nil.
selectedMessageName := nil.
selectedClassName := nil.
self setClassOrganizer.
self changed: #packageSelectionChanged.
self changed: #packageListIndex. "update my selection"
self changed: #systemCategoryList. "update the category list"
self selectSystemCategory: nil. "update category list selection"
self changed: #classList. "update the class list"
self selectClass: nil. "update category list selection"!
Item was added:
+ ----- Method: PackagePaneBrowser>>packageOrganizer (in category 'accessing') -----
+ packageOrganizer
+
+ ^ self environment packageOrganizer!
More information about the Squeak-dev
mailing list
|