What if rules that need metaclasses ask for them explicitly to the class?environment allClasses do: [ :theInstanceSide |�� ��self doSomethingWith: theInstanceSide.�� ��self doSomethingWith: theInstanceSide classSide. ]Just putting another possibility on the table...
El lun., 22 de jun. de 2015 a la(s) 10:40 p. m., Nicolai Hess <nicolaihess@web.de> escribi��:2014-12-18 22:32 GMT+01:00 Yuriy Tymchuk <yuriy.tymchuk@me.com>:I���m ready to help with this issue, but as far as I can tell, it���s not hard to implement the mentors. Here we should decide on the meaning of the phrases. What are "all behaviors��� and so on. The reason of the refactoring that I���ve done was that there were two methods with similar names that were doing different things.UkoOn 18 Dec 2014, at 21:19, Nicolai Hess <nicolaihess@web.de> wrote:for the different Environments changed (compared with Pharo3The fix was good and necessary (I think). But they had an impactHi,some time ago Yuriy cleaned up the RBBrowserEnvironment methods for
allClassesAndTraits(Do), classesDo, ....
on some SmallLint-rules (they arent applied on the class side) and the behavior
(-> 14621 Some RBBrowserEnvironments don't work well with Metaclasses))As some SmallLint-rules need to iterate over the metaclasses as well and
I don't want to revert Yuriys change, I 'll add another method thatcollect classes and metaclasses.
So, I need some help, how to name this methods:all classes (Object, Integer, ....) -> allClasses, okall classes and metaclasses (Object, Object class, Integer class ) -> ? allBehaviors?all classes and traits -> allClassesAndTraits, okall classes and meta classes and traits and class traits -> ? no idea!all metaclasses and class traits -> allMeta(ClassesAndTraits) ? I don't know if we need thisOne problem with "allBehaviors" is, SystemNavigation uses allBehaviors to iterate
over classes, metaclasses, traits and class traits,
allthough a Trait is not a Behavior. (TClass isBehavior -> false)feedback is welcomenicolaiPharo 3.0:
SystemNavigation default allClasses size. 4024
Smalltalk allClasses size. 4024.
RBBrowserEnvironment default allClasses size. 4024
RBBrowserEnvironment default classes size. 8048Pharo 4.0:
SystemNavigation default allClasses size. 5012
Smalltalk allClasses size. 5012
RBBrowserEnvironment default allClasses size. 5012
RBBrowserEnvironment default classes size.�� 5012-> I "define" the Pharo 4.0 behavior as the correct one. RBEnvironment>>#classes should not contain meta classes.Some other RBEnvironments and/or RBRules rely on the "classes = classes and metaclasses" (-> see issueSome RBBrowserEnvironments don't work well with MetaclassesSome rules aren't applied on the classside anymorea RBEnvironment from #referencesTo: does not list meta classesI will change them, and if appropiate, add a newclassesAndMetaclasses resp. classesAndMetaclassesDo:I don't know about classesAndMetaclassesTraits. And I skip "behaviors" for now.
#allBehaviors is suspicious to me, I still don'tknow what they are:
Smalltalk globals allBehaviors includes:TBehavior. -> true (1)
TBehavior isBehavior. -> false (!)