<div dir="ltr">The attached Browser>>#updateIfNeeded makes sure to update the system category list in the browser on any system change. For PluggableListMorphs we have a message verifyContents that compares the contents of the list with the newest list provided by the model, and updates only if there have been changes. For HierarchicalListMorphs it's not as straightforward to avoid unnecessary updates because their contents are not just a collection that we can compare with the collection provided by the model, they are built incrementally as the user expands nodes. Anyway, just updating the system category list in updateIfNeeded is simple and seems to work fine, doesn't look slow or anything in my tests.<div><div><br></div><div>Also don't forget the other attached method for BrowserWindow, I posted it in another thread, it fixes a DNU.</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 4, 2022 at 9:26 PM Hernan Wilkinson <<a href="mailto:hernan.wilkinson@gmail.com">hernan.wilkinson@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Luciano<div> thank you for the change! It is on github now.</div><div><br></div><div> Regarding #testCaseClassesAt: I left it in SystemOrganizer because I use it a lot when scripting :-) </div><div><br></div><div> Regarding #linesOfCode:, etc., those methods are the result of doing an extract method from a bigger method a long time ago. I do not really use them, in fact they are disabled in CuisUniversity because they slow down the whole system as you notice for top system categories. </div><div> We talked with Juan about this issue and the best thing to do would be to change from lines of code to message sends (lines of code is an old metric, it made sense in cobol or fortran where one line was one instruction, but it does not make that much sense in Smalltalk because you can have one or many message send per line) and count message sends from the bytecodes, not the source code. That would be much faster, but the problem is the optimized message sends like ifTrue: and so on...</div><div><br></div><div> Regarding cmd+y, I'll take a look later to see what we can do.</div><div><br></div><div> BTW, I found another unexpected behavior. When loading a package the browser is not updated with the new system categories of the package.</div><div> If you can look at it, it would be great, if not let me know and I'll take a look.</div><div><br></div><div>Cheers!</div><div>Hernan.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 4, 2022 at 3:44 AM Luciano Notarfrancesco <<a href="mailto:luchiano@gmail.com" target="_blank">luchiano@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Hernan,<div>I think this should fix cmd-t. I never used this and I'm not sure how you use it, can you test it and let me know if it behaves as you expect? Notice that I moved #classesAt: from Categorizer to SystemOrganizer because the Categorizer is more general (it is used for method categories too), and then I removed #testCaseClassesAt: and put that line of code in the caller (because it made the SystemOrganizer know about test cases and I thought that was unnecessary). I don't think I broke anything, I searched for senders in other packages, but let me know what you think.</div><div><br></div><div>Also I saw the methods for #linesOfCodeOf:, #instanceMethodCountOf: and #classMethodCountOf: you added to SystemOrganizer to show that information in annotations. Currently, they return 0 for top categories without any classes. I made the experiment of including all classes in all subcategories, but it became too slow so I reverted to the original behavior.</div><div><br></div><div>Regarding cmd-y I think there's not much we can do without getting dirty... at the level of SmalltalkEditor we don't know anything of the Browser, what system category is selected, etc, and I wouldn't want to hack my way into a fix. What do you think?<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 2, 2022 at 3:08 PM Hernan Wilkinson via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Luciano,<div> I found another bug... well, I do not know if it is a bug really, maybe a "desired behavior" :-) </div><div> It is related to running the tests for a system category.</div><div> Currently, if you have the mouse over a system category and pressed cmd+t, it runs all the tests of that category. That works ok for the subcategories but if you are in a root category it only runs the tests for that root category and I think it should run the tests of all the categories because they are shown in the class list.</div><div><br></div><div> The same thing should happen when pressing cmd+y in the code pane. cmd+y runs the tests of the system category, so if you are in a root system category it should behave as described in the previous paragraph.</div><div><br></div><div> Does it make sense to you?</div><div><br></div><div>Cheers!</div><div>Hernan.</div></div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>