pharo-project / pharo

Pharo is a dynamic reflective pure object-oriented language supporting live programming inspired by Smalltalk.
http://pharo.org
Other
1.21k stars 356 forks source link

EPBrowserVisitor should not blindly refer to global variables. #17397

Open Ducasse opened 2 hours ago

Ducasse commented 2 hours ago
visitPackageTagChange: aPackageTagChange

    Smalltalk tools browser openOnPackage: ((self packageOrganizer
              packageNamed: aPackageTagChange packageName
              ifAbsent: [ ^ self inform: 'Package named ' , aPackageTagChange packageName , ' not found in the system' ])
             tagNamed: aPackageTagChange tagName
             ifAbsent: [ ^ self inform: 'Tag named ' , aPackageTagChange tagName , ' not found in package named ' , aPackageTagChange packageName ])

=>

visitPackageTagChange: aPackageTagChange

    application tools browser openOnPackage: ((self packageOrganizer
              packageNamed: aPackageTagChange packageName
              ifAbsent: [ ^ self inform: 'Package named ' , aPackageTagChange packageName , ' not found in the system' ])
             tagNamed: aPackageTagChange tagName
             ifAbsent: [ ^ self inform: 'Tag named ' , aPackageTagChange tagName , ' not found in package named ' , aPackageTagChange packageName ])
Ducasse commented 2 hours ago

Please read http://rmod-pharo-mooc.lille.inria.fr/AdvancedDesignMooc/Slides/M9-4-CaseStudy-06-LayeredSettingsArchitecture.pdf