Hi Jakob,<br>
<br>
thanks for the review! I have revised this proposal and merged it via Tools-ct.1175 into the Trunk.<br>
<br>
> There is one "regression" in this: the packages (and therefore categories) are not ordered the same way as the class categories in the system browser anymore. I would not mind it personally, but does somebody else?<br>
<br>
I would not, too. The package browser is not for system categories. They are different artifacts and any relationship between their orders could only be constructed through a brittle heuristic. If any one would like to object anyway, please do. :-)<br>
<br>
Best,<br>
Christoph<br>
<br>
<font color="#808080">---<br>
</font><font color="#808080"><i>Sent from </i></font><font color="#808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><u><font color="#808080">Squeak Inbox Talk</font></u></a></i></font><br>
<br>
On 2022-09-11T20:16:15+02:00, jakres+squeak@gmail.com wrote:<br>
<br>
> Looks reasonable to me in general. There is one "regression" in this:<br>
> the packages (and therefore categories) are not ordered the same way<br>
> as the class categories in the system browser anymore. I would not<br>
> mind it personally, but does somebody else?<br>
> <br>
> Do we actually need an instance variable for the package organizer?<br>
> Could we not always use ^ self environment packages packageNames<br>
> sorted?<br>
> <br>
> The new class comment sounds a bit confusing to me because the<br>
> examples for "system category" are not put in relation with the<br>
> examples for "package". In the previous example (that did not match up<br>
> with the actual presentation) that was more obvious. :o)<br>
> <br>
> Am Do., 8. Sept. 2022 um 15:05 Uhr schrieb <commits at source.squeak.org>:<br>
> ><br>
> > A new version of Tools was added to project The Inbox:<br>
> > http://source.squeak.org/inbox/Tools-ct.1173.mcz<br>
> ><br>
> > ==================== Summary ====================<br>
> ><br>
> > Name: Tools-ct.1173<br>
> > Author: ct<br>
> > Time: 8 September 2022, 3:05:12.665836 pm<br>
> > UUID: f0fe2b64-b27c-6d4b-9670-d920d0580baf<br>
> > Ancestors: Tools-ct.1171<br>
> ><br>
> > 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.<br>
> ><br>
> > =============== Diff against Tools-ct.1171 ===============<br>
> ><br>
> > Item was changed:<br>
> >   Browser subclass: #PackagePaneBrowser<br>
> > +       instanceVariableNames: 'packageOrganizer package packageListIndex packageList'<br>
> > -       instanceVariableNames: 'package packageListIndex packageList'<br>
> >         classVariableNames: ''<br>
> >         poolDictionaries: ''<br>
> >         category: 'Tools-Browser'!<br>
> ><br>
> > + !PackagePaneBrowser commentStamp: 'ct 9/8/2022 15:05' prior: 0!<br>
> > + 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; Support, empty).<br>
> > - !PackagePaneBrowser commentStamp: '<historical>' prior: 0!<br>
> > - 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).<br>
> ><br>
> >   Instance Variables:<br>
> > +       packageOrganizer        <PackageOrganizer> the organizer of packages in the current environment<br>
> >         package  <Symbol> the "category header," e.g., #Magnitudes or #Collections<br>
> >         packageListIndex <Integer> The index in the package list<br>
> > +       packageList  <OrderedCollection of String> the list of package names!<br>
> > -       packageList  <OrderedCollection of String> the list of package names<br>
> > - !<br>
> ><br>
> > Item was added:<br>
> > + ----- Method: PackagePaneBrowser>>initialize (in category 'initialize-release') -----<br>
> > + initialize<br>
> > +<br>
> > +       super initialize.<br>
> > +<br>
> > +       self packageOrganizer: self environment packageOrganizer.!<br>
> ><br>
> > Item was changed:<br>
> >   ----- Method: PackagePaneBrowser>>packageList (in category 'package list') -----<br>
> >   packageList<br>
> > -       "Answer a list of the packages in the current system organization."<br>
> ><br>
> > +       ^ self packageOrganizer packageNames sorted!<br>
> > -       | str stream |<br>
> > -       str := Set new: 100.<br>
> > -       stream := WriteStream on: (Array new: 100).<br>
> > -       systemOrganizer categories do:<br>
> > -               [ :categ | | cats |<br>
> > -               cats := categ asString copyUpTo: $-.<br>
> > -               (str includes: cats) ifFalse:<br>
> > -                       [str add: cats.<br>
> > -                       stream nextPut: cats]].<br>
> > -       ^stream contents!<br>
> ><br>
> > Item was added:<br>
> > + ----- Method: PackagePaneBrowser>>packageOrganizer (in category 'accessing') -----<br>
> > + packageOrganizer<br>
> > +<br>
> > +       ^ packageOrganizer!<br>
> ><br>
> > Item was added:<br>
> > + ----- Method: PackagePaneBrowser>>packageOrganizer: (in category 'initialize-release') -----<br>
> > + packageOrganizer: aPackageOrganizer<br>
> > +<br>
> > +       packageOrganizer := aPackageOrganizer.<br>
> > +<br>
> > +       self systemOrganizer: self systemOrganizer. "reset selections"!<br>
> ><br>
> > Item was added:<br>
> > + ----- Method: PackagePaneBrowser>>selectEnvironment: (in category 'accessing') -----<br>
> > + selectEnvironment: anEnvironment<br>
> > +<br>
> > +       super selectEnvironment: anEnvironment.<br>
> > +       self packageOrganizer: anEnvironment packages.!<br>
> ><br>
> ><br>
> <br>