The Inbox: PackageInfo-Base-mt.71.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: PackageInfo-Base-mt.71.mcz

commits-2
A new version of PackageInfo-Base was added to project The Inbox:
http://source.squeak.org/inbox/PackageInfo-Base-mt.71.mcz

==================== Summary ====================

Name: PackageInfo-Base-mt.71
Author: mt
Time: 4 August 2019, 12:16:40.254314 pm
UUID: 9a97317a-1734-6740-9988-202aa1045196
Ancestors: PackageInfo-Base-jr.70

Merges and extends PackageInfo-Base-ct.70, which I moved to treated inbox due to incompatible ancestry.

Adds ifPresent-interface (known from Dictionary) to package organizer.

=============== Diff against PackageInfo-Base-jr.70 ===============

Item was removed:
- (PackageInfo named: 'PackageInfo-Base') preamble: '"below, add code to be run before the loading of this package"
- PackageOrganizer default
- unregisterPackageNamed: ''PackageInfo'';
- unregisterPackageNamed: ''ToolBuilder'';
- unregisterPackageNamed: ''Morphic-TrueType'''!

Item was removed:
- SystemOrganization addCategory: #'PackageInfo-Base'!

Item was removed:
- ----- Method: Character>>escapeEntities (in category '*packageinfo-base') -----
- escapeEntities
- #($< '&lt;' $> '&gt;' $& '&amp;') pairsDo:
- [:k :v |
- self = k ifTrue: [^ v]].
- ^ String with: self!

Item was removed:
- ----- Method: Environment>>packageOrganizer (in category '*PackageInfo-Base') -----
- packageOrganizer
- ^ info packages!

Item was removed:
- Object subclass: #PackageInfo
- instanceVariableNames: 'packageName methodCategoryPrefix preamble postscript preambleOfRemoval postscriptOfRemoval'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'PackageInfo-Base'!
- PackageInfo class
- instanceVariableNames: 'default'!
-
- !PackageInfo commentStamp: 'bf 7/28/2012 14:11' prior: 0!
- PackageInfo is used by the system to figure out which classes and methods belong to which package. By default, class categories and method categories are matched against my packageName, but subclasses could override this behavior.
-
- For an interesting use of PackageInfo subclasses have a look at OMeta2. It presents the same code base as two different packages, one using decompiled code for bootstrapping, the other using the actual OMeta syntax.!
- PackageInfo class
- instanceVariableNames: 'default'!

Item was removed:
- ----- Method: PackageInfo class>>allPackages (in category 'packages access') -----
- allPackages
- ^PackageOrganizer default packages!

Item was removed:
- ----- Method: PackageInfo class>>default (in category 'compatibility') -----
- default
- ^ self allPackages detect: [:ea | ea class = self] ifNone: [self new register]!

Item was removed:
- ----- Method: PackageInfo class>>initialize (in category 'class initialization') -----
- initialize
- self allSubclassesDo: [:ea | ea new register]!

Item was removed:
- ----- Method: PackageInfo class>>named: (in category 'packages access') -----
- named: aString
- ^ Environment current packageOrganizer packageNamed: aString ifAbsent: [(self new packageName: aString) register]!

Item was removed:
- ----- Method: PackageInfo class>>registerPackage: (in category 'registration / unregistration') -----
- registerPackage: aString
- "for compatibility with old fileOuts"
- ^ Smalltalk at: #FilePackageManager ifPresent: [:p | p registerPackage: aString]!

Item was removed:
- ----- Method: PackageInfo class>>registerPackageName: (in category 'registration / unregistration') -----
- registerPackageName: aString
- ^ PackageOrganizer default registerPackageNamed: aString!

Item was removed:
- ----- Method: PackageInfo>>= (in category 'comparing') -----
- = other
- ^ other species = self species and: [other packageName = self packageName]!

Item was removed:
- ----- Method: PackageInfo>>actualMethodsDo: (in category 'enumerating') -----
- actualMethodsDo: aBlock
- "Evaluate aBlock with the actual method objects in this package."
- | enum |
- self extensionMethods do:
- [:mr|
- aBlock value: mr compiledMethod].
- enum := [:behavior|
- behavior organization categories do:
- [:cat|
- (self isForeignClassExtension: cat) ifFalse:
- [(behavior organization listAtCategoryNamed: cat) do:
- [:s|
- aBlock value: (behavior compiledMethodAt: s)]]]].
- self classes do:
- [:c| enum value: c; value: c classSide]
- !

Item was removed:
- ----- Method: PackageInfo>>addCoreMethod: (in category 'modifying') -----
- addCoreMethod: aMethodReference
- | category |
- category := self baseCategoryOfMethod: aMethodReference.
- aMethodReference actualClass organization
- classify: aMethodReference methodSymbol
- under: category
- suppressIfDefault: false!

Item was removed:
- ----- Method: PackageInfo>>addExtensionMethod: (in category 'modifying') -----
- addExtensionMethod: aMethodReference
- | category |
- category := self baseCategoryOfMethod: aMethodReference.
- aMethodReference actualClass organization
- classify: aMethodReference methodSymbol
- under: self methodCategoryPrefix, '-', category!

Item was removed:
- ----- Method: PackageInfo>>addMethod: (in category 'modifying') -----
- addMethod: aMethodReference
- (self includesClass: aMethodReference class)
- ifTrue: [self addCoreMethod: aMethodReference]
- ifFalse: [self addExtensionMethod: aMethodReference]!

Item was removed:
- ----- Method: PackageInfo>>allOverriddenMethods (in category 'listing') -----
- allOverriddenMethods
- "search classes and meta classes"
- ^ Array streamContents: [:stream |
- self allOverriddenMethodsDo: [:each | stream nextPut: each]]
- !

Item was removed:
- ----- Method: PackageInfo>>allOverriddenMethodsDo: (in category 'enumerating') -----
- allOverriddenMethodsDo: aBlock
- "Evaluates aBlock with all the overridden methods in the system"
- ^ ProtoObject withAllSubclassesDo: [:class |
- self overriddenMethodsInClass: class do: aBlock]
- !

Item was removed:
- ----- Method: PackageInfo>>baseCategoryOfMethod: (in category 'modifying') -----
- baseCategoryOfMethod: aMethodReference
- | oldCat oldPrefix tokens |
- oldCat := aMethodReference category.
- ({ 'as yet unclassified'. 'all' } includes: oldCat) ifTrue: [ oldCat := '' ].
- tokens := oldCat findTokens: '*-' keep: '*'.
-
- "Strip off any old prefixes"
- ((tokens at: 1 ifAbsent: [ '' ]) = '*') ifTrue: [
- [ ((tokens at: 1 ifAbsent: [ '' ]) = '*') ]
- whileTrue: [ tokens removeFirst ].
- oldPrefix := tokens removeFirst asLowercase.
- [ (tokens at: 1 ifAbsent: [ '' ]) asLowercase = oldPrefix ]
- whileTrue: [ tokens removeFirst ].
- ].
-
- tokens isEmpty ifTrue: [^ 'as yet unclassified'].
- ^ String streamContents:
- [ :s |
- tokens
- do: [ :tok | s nextPutAll: tok ]
- separatedBy: [ s nextPut: $- ]]!

Item was removed:
- ----- Method: PackageInfo>>category:matches: (in category 'testing') -----
- category: categoryName matches: prefix
- | prefixSize catSize |
- categoryName ifNil: [ ^false ].
- catSize := categoryName size.
- prefixSize := prefix size.
- catSize < prefixSize ifTrue: [ ^false ].
- (categoryName findString: prefix startingAt: 1 caseSensitive: false) = 1
- ifFalse: [ ^false ].
- ^(categoryName at: prefix size + 1 ifAbsent: [ ^true ]) = $-!

Item was removed:
- ----- Method: PackageInfo>>categoryName (in category 'naming') -----
- categoryName
- |category|
- category := self class category.
- ^ (category endsWith: '-Info')
- ifTrue: [category copyUpToLast: $-]
- ifFalse: [category]!

Item was removed:
- ----- Method: PackageInfo>>changeRecordForOverriddenMethod: (in category 'testing') -----
- changeRecordForOverriddenMethod: aMethodReference
- self changeRecordsForMethod: aMethodReference do: [:record |
- (self includesMethodCategory: record category
- ofClass: aMethodReference actualClass)
- ifTrue: [^record]].
- ^nil!

Item was removed:
- ----- Method: PackageInfo>>changeRecordsForMethod:do: (in category 'enumerating') -----
- changeRecordsForMethod: aMethodReference do: aBlock
- "Evaluate aBlock with one ChangeRecord per overriding package, followed by the latest non-override"
- | overridingPackages method position sourceFilesCopy |
- overridingPackages := Set new.
- method := aMethodReference compiledMethod.
- position := method filePosition.
- sourceFilesCopy := SourceFiles collect: [:x | x ifNotNil: [x readOnlyCopy]].
- [ | file prevPos prevFileIndex chunk stamp methodCategory methodPackage tokens |
- method fileIndex = 0 ifTrue: [^ nil].
- file := sourceFilesCopy at: method fileIndex.
- [position notNil & file notNil]
- whileTrue:
- [file position: (0 max: position-150).  "Skip back to before the preamble"
- [file position < (position-1)]  "then pick it up from the front"
- whileTrue: [chunk := file nextChunk].
-
- "Preamble is likely a linked method preamble, if we're in
- a changes file (not the sources file).  Try to parse it
- for prior source position and file index"
- prevPos := nil.
- stamp := ''.
- (chunk findString: 'methodsFor:' startingAt: 1) > 0
- ifTrue: [tokens := Scanner new scanTokens: chunk]
- ifFalse: [tokens := Array new  "ie cant be back ref"].
- ((tokens size between: 7 and: 8)
- and: [(tokens at: tokens size-5) = #methodsFor:])
- ifTrue:
- [(tokens at: tokens size-3) = #stamp:
- ifTrue: ["New format gives change stamp and unified prior pointer"
- stamp := tokens at: tokens size-2.
- prevPos := tokens last.
- prevFileIndex := sourceFilesCopy fileIndexFromSourcePointer: prevPos.
- prevPos := sourceFilesCopy filePositionFromSourcePointer: prevPos]
- ifFalse: ["Old format gives no stamp; prior pointer in two parts"
- prevPos := tokens at: tokens size-2.
- prevFileIndex := tokens last].
- (prevPos = 0 or: [prevFileIndex = 0]) ifTrue: [prevPos := nil]].
- ((tokens size between: 5 and: 6)
- and: [(tokens at: tokens size-3) = #methodsFor:])
- ifTrue:
- [(tokens at: tokens size-1) = #stamp:
- ifTrue: ["New format gives change stamp and unified prior pointer"
- stamp := tokens at: tokens size]].
- methodCategory := tokens after: #methodsFor: ifAbsent: [ClassOrganizer default].
- methodPackage := PackageOrganizer default packageOfMethodCategory: methodCategory ofClass: aMethodReference actualClass ifNone: [#unknown].
- (overridingPackages includes: methodPackage)
- ifFalse: [aBlock value: (ChangeRecord new
- file: file position: position type: #method
- class: aMethodReference classSymbol category: methodCategory
- meta: aMethodReference classIsMeta stamp: stamp)].
- (self isOverrideCategory: methodCategory)
- ifTrue: [overridingPackages add: methodPackage]
- ifFalse: [(overridingPackages includes: methodPackage)
- ifFalse: [^nil]].
- position := prevPos.
- prevPos notNil ifTrue:
- [file := sourceFilesCopy at: prevFileIndex]].
- ^nil]
- ensure: [sourceFilesCopy do: [:x | x ifNotNil: [x close]]]
- !

Item was removed:
- ----- Method: PackageInfo>>classes (in category 'listing') -----
- classes
- | environment organization |
- environment := Environment  current.
- organization := environment organization.
- ^(self systemCategories gather:
- [:cat |
- (organization listAtCategoryNamed: cat)
- collect: [:className | environment valueOf: className]])
- sorted: [:a :b | a className <= b className]!

Item was removed:
- ----- Method: PackageInfo>>classesAndMetaClasses (in category 'listing') -----
- classesAndMetaClasses
- "Return a Set with all classes and metaclasses belonging to this package"
-
- | baseClasses result |
- baseClasses := self classes.
- result := (Set new: baseClasses size * 2)
- addAll: baseClasses;
- yourself.
- baseClasses do: [ :c |
- result add: c classSide].
- ^result
- !

Item was removed:
- ----- Method: PackageInfo>>coreCategoriesForClass: (in category 'testing') -----
- coreCategoriesForClass: aClass
- ^ aClass organization categories select: [:cat | (self isForeignClassExtension: cat) not]!

Item was removed:
- ----- Method: PackageInfo>>coreMethods (in category 'listing') -----
- coreMethods
- ^ self classesAndMetaClasses gather: [:class | self coreMethodsForClass: class]!

Item was removed:
- ----- Method: PackageInfo>>coreMethodsForClass: (in category 'testing') -----
- coreMethodsForClass: aClass
- ^ (aClass selectors difference:
- ((self foreignExtensionMethodsForClass: aClass) collect: [:r | r methodSymbol]))
- asArray collect: [:sel | self referenceForMethod: sel ofClass: aClass]!

Item was removed:
- ----- Method: PackageInfo>>extensionCategoriesForClass: (in category 'testing') -----
- extensionCategoriesForClass: aClass
- ^ aClass organization categories select: [:cat | self isYourClassExtension: cat]!

Item was removed:
- ----- Method: PackageInfo>>extensionClasses (in category 'listing') -----
- extensionClasses
- ^ self externalBehaviors reject: [:classOrTrait | (self extensionCategoriesForClass: classOrTrait) isEmpty]!

Item was removed:
- ----- Method: PackageInfo>>extensionMethods (in category 'listing') -----
- extensionMethods
- ^ self externalBehaviors gather: [:classOrTrait | self extensionMethodsForClass: classOrTrait]!

Item was removed:
- ----- Method: PackageInfo>>extensionMethodsForClass: (in category 'testing') -----
- extensionMethodsForClass: aClass
- ^ (self extensionCategoriesForClass: aClass)
- gather: [:cat | self methodsInCategory: cat ofClass: aClass ]!

Item was removed:
- ----- Method: PackageInfo>>extensionMethodsFromClasses: (in category 'testing') -----
- extensionMethodsFromClasses: classes
- ^classes
- gather: [:class | self extensionMethodsForClass: class]!

Item was removed:
- ----- Method: PackageInfo>>externalBehaviors (in category 'modifying') -----
- externalBehaviors
- ^self externalClasses , self externalTraits!

Item was removed:
- ----- Method: PackageInfo>>externalCallers (in category 'dependencies') -----
- externalCallers
- ^ self
- externalRefsSelect: [:literal | literal isKindOf: Symbol]
- thenCollect: [:l | l].!

Item was removed:
- ----- Method: PackageInfo>>externalClasses (in category 'dependencies') -----
- externalClasses
- | myClasses |
- myClasses := self classesAndMetaClasses.
- ^ Array streamContents:
- [:s |
- ProtoObject withAllSubclassesDo:
- [:class |
- (myClasses includes: class) ifFalse: [s nextPut: class]]]!

Item was removed:
- ----- Method: PackageInfo>>externalName (in category 'naming') -----
- externalName
- ^ self packageName!

Item was removed:
- ----- Method: PackageInfo>>externalRefsSelect:thenCollect: (in category 'dependencies') -----
- externalRefsSelect: selBlock thenCollect: colBlock
- | pkgMethods dependents extMethods otherClasses otherMethods classNames |
-
- classNames := self classes collect: [:c | c name].
- extMethods := self extensionMethods collect: [:mr | mr methodSymbol].
- otherClasses := self externalClasses difference: self externalSubclasses.
- otherMethods :=  otherClasses gather: [:c | c selectors].
- pkgMethods := self methods asSet collect: [:mr | mr methodSymbol].
- pkgMethods removeAllFoundIn: otherMethods.
-
- dependents := Set new.
- otherClasses do: [:c |
- c selectorsAndMethodsDo:
- [:sel :compiled |
- | refs |
- (extMethods includes: sel) ifFalse:
- [refs := compiled literals select: selBlock thenCollect: colBlock.
- refs do: [:ea |
- ((classNames includes: ea) or: [pkgMethods includes: ea])
- ifTrue: [dependents add: (self referenceForMethod: sel ofClass: c) -> ea]]]]].
- ^ dependents!

Item was removed:
- ----- Method: PackageInfo>>externalSubclasses (in category 'dependencies') -----
- externalSubclasses
- | pkgClasses subClasses |
- pkgClasses := self classes.
- subClasses := Set new.
- pkgClasses do: [:c | subClasses addAll: (c allSubclasses)].
- ^ subClasses difference: pkgClasses
- !

Item was removed:
- ----- Method: PackageInfo>>externalTraits (in category 'modifying') -----
- externalTraits
- ^ Array streamContents: [:s |
- | behaviors |
- behaviors := self classesAndMetaClasses.
- Environment current allTraits do: [:trait |
- (behaviors includes: trait) ifFalse: [s nextPut: trait].
- (behaviors includes: trait classSide) ifFalse: [s nextPut: trait classSide]]]. !

Item was removed:
- ----- Method: PackageInfo>>externalUsers (in category 'dependencies') -----
- externalUsers
- ^ self
- externalRefsSelect: [:literal | literal isVariableBinding]
- thenCollect: [:l | l key]!

Item was removed:
- ----- Method: PackageInfo>>foreignClasses (in category 'listing') -----
- foreignClasses
- | s environment |
- s := IdentitySet new.
- environment := Environment current.
- self foreignSystemCategories
- do: [:c | (SystemOrganization listAtCategoryNamed: c)
- do: [:cl |
- | cls |
- cls := environment valueOf: cl.
- s add: cls;
-  add: cls class]].
- ^ s!

Item was removed:
- ----- Method: PackageInfo>>foreignExtensionCategoriesForClass: (in category 'testing') -----
- foreignExtensionCategoriesForClass: aClass
- ^ aClass organization categories select: [:cat | self isForeignClassExtension: cat]!

Item was removed:
- ----- Method: PackageInfo>>foreignExtensionMethodsForClass: (in category 'testing') -----
- foreignExtensionMethodsForClass: aClass
- ^ (self foreignExtensionCategoriesForClass: aClass)
- gather: [:cat | (aClass organization listAtCategoryNamed: cat)
-  collect: [:sel | self referenceForMethod: sel ofClass: aClass]]!

Item was removed:
- ----- Method: PackageInfo>>foreignSystemCategories (in category 'listing') -----
- foreignSystemCategories
- ^ SystemOrganization categories
- reject: [:cat | self includesSystemCategory: cat] !

Item was removed:
- ----- Method: PackageInfo>>hasPostscript (in category 'preamble/postscript') -----
- hasPostscript
- ^ self isScript: postscript not: self postscriptDefault!

Item was removed:
- ----- Method: PackageInfo>>hasPostscriptOfRemoval (in category 'preamble/postscript') -----
- hasPostscriptOfRemoval
- ^ self isScript: postscriptOfRemoval not: self postscriptOfRemovalDefault!

Item was removed:
- ----- Method: PackageInfo>>hasPreamble (in category 'preamble/postscript') -----
- hasPreamble
- ^ self isScript: preamble not: self preambleDefault!

Item was removed:
- ----- Method: PackageInfo>>hasPreambleOfRemoval (in category 'preamble/postscript') -----
- hasPreambleOfRemoval
- ^ self isScript: preambleOfRemoval not: self preambleOfRemovalDefault!

Item was removed:
- ----- Method: PackageInfo>>hash (in category 'comparing') -----
- hash
- ^ packageName hash!

Item was removed:
- ----- Method: PackageInfo>>includesChangeRecord: (in category 'testing') -----
- includesChangeRecord: aChangeRecord
- ^ aChangeRecord methodClass notNil and:
- [self
- includesMethodCategory: aChangeRecord category
- ofClass: aChangeRecord methodClass]!

Item was removed:
- ----- Method: PackageInfo>>includesClass: (in category 'testing') -----
- includesClass: aClass
- ^ self includesSystemCategory: aClass category!

Item was removed:
- ----- Method: PackageInfo>>includesClassNamed: (in category 'testing') -----
- includesClassNamed: aClassName
- ^ self includesSystemCategory: ((SystemOrganization categoryOfElement: aClassName) ifNil: [^false])!

Item was removed:
- ----- Method: PackageInfo>>includesMethod:ofClass: (in category 'testing') -----
- includesMethod: aSymbol ofClass: aClass
- aClass ifNil: [^ false].
- ^ self
- includesMethodCategory: ((aClass organization categoryOfElement: aSymbol)
- ifNil: [' '])
- ofClass: aClass!

Item was removed:
- ----- Method: PackageInfo>>includesMethodCategory:ofClass: (in category 'testing') -----
- includesMethodCategory: categoryName ofClass: aClass
- ^ (self isYourClassExtension: categoryName)
- or: [(self includesClass: aClass)
- and: [(self isForeignClassExtension: categoryName) not]]!

Item was removed:
- ----- Method: PackageInfo>>includesMethodCategory:ofClassNamed: (in category 'testing') -----
- includesMethodCategory: categoryName ofClassNamed: aClass
- ^ (self isYourClassExtension: categoryName)
- or: [(self includesClassNamed: aClass)
- and: [(self isForeignClassExtension: categoryName) not]]!

Item was removed:
- ----- Method: PackageInfo>>includesMethodReference: (in category 'testing') -----
- includesMethodReference: aMethodRef
- ^ self includesMethod: aMethodRef methodSymbol ofClass: aMethodRef actualClass!

Item was removed:
- ----- Method: PackageInfo>>includesSystemCategory: (in category 'testing') -----
- includesSystemCategory: categoryName
- ^ self category: categoryName matches: self systemCategoryPrefix!

Item was removed:
- ----- Method: PackageInfo>>isForeignClassExtension: (in category 'testing') -----
- isForeignClassExtension: categoryName
- ^ categoryName first = $* and: [(self isYourClassExtension: categoryName) not]!

Item was removed:
- ----- Method: PackageInfo>>isOverrideCategory: (in category 'testing') -----
- isOverrideCategory: aString
- ^ aString first = $* and: [aString endsWith: '-override']!

Item was removed:
- ----- Method: PackageInfo>>isOverrideMethod: (in category 'testing') -----
- isOverrideMethod: aMethodReference
- ^ self isOverrideCategory: aMethodReference category!

Item was removed:
- ----- Method: PackageInfo>>isOverrideOfYourMethod: (in category 'testing') -----
- isOverrideOfYourMethod: aMethodReference
- "Answers true if the argument overrides a method in this package"
- ^ (self isYourClassExtension: aMethodReference category) not and:
- [(self changeRecordForOverriddenMethod: aMethodReference) notNil]!

Item was removed:
- ----- Method: PackageInfo>>isScript:not: (in category 'preamble/postscript') -----
- isScript: script not: default
- ^ script notNil
- and: [ | contents |
- contents := script contents asString withBlanksTrimmed.
- contents notEmpty and: [contents ~= default and: [contents ~= 'nil']]]!

Item was removed:
- ----- Method: PackageInfo>>isYourClassExtension: (in category 'testing') -----
- isYourClassExtension: categoryName
- ^ categoryName notNil and: [self category: categoryName asLowercase matches: self methodCategoryPrefix]!

Item was removed:
- ----- Method: PackageInfo>>linesOfCode (in category 'source code management') -----
- linesOfCode
- "An approximate measure of lines of code.
- Includes comments, but excludes blank lines."
- ^self methods inject: 0 into: [:sum :each | sum + each compiledMethod linesOfCode]!

Item was removed:
- ----- Method: PackageInfo>>methodCategoryPrefix (in category 'naming') -----
- methodCategoryPrefix
- ^ methodCategoryPrefix ifNil: [methodCategoryPrefix := '*', self packageName asLowercase]!

Item was removed:
- ----- Method: PackageInfo>>methods (in category 'listing') -----
- methods
- ^ (self extensionMethods, self coreMethods) select: [:method |
- method isValid
- and: [method isLocalSelector]]!

Item was removed:
- ----- Method: PackageInfo>>methodsInCategory:ofClass: (in category 'testing') -----
- methodsInCategory: aString ofClass: aClass
- ^Array streamContents: [:stream |
- self methodsInCategory: aString ofClass: aClass
- do: [:each | stream nextPut: each]]
- !

Item was removed:
- ----- Method: PackageInfo>>methodsInCategory:ofClass:do: (in category 'enumerating') -----
- methodsInCategory: aString ofClass: aClass do: aBlock
- ((aClass organization listAtCategoryNamed: aString) ifNil: [^self])
- do: [:sel | aBlock value: (self referenceForMethod: sel ofClass: aClass)]!

Item was removed:
- ----- Method: PackageInfo>>name (in category 'naming') -----
- name
-
- ^ self packageName!

Item was removed:
- ----- Method: PackageInfo>>outsideClasses (in category 'testing') -----
- outsideClasses
- ^ProtoObject withAllSubclasses asSet difference: self classesAndMetaClasses!

Item was removed:
- ----- Method: PackageInfo>>overriddenMethods (in category 'listing') -----
- overriddenMethods
- ^ Array streamContents: [:stream |
- self overriddenMethodsDo: [:each | stream nextPut: each]]
- !

Item was removed:
- ----- Method: PackageInfo>>overriddenMethodsDo: (in category 'enumerating') -----
- overriddenMethodsDo: aBlock
- "Enumerates the methods the receiver contains which have been overridden by other packages"
- ^ self allOverriddenMethodsDo: [:ea |
- (self isOverrideOfYourMethod: ea)
- ifTrue: [aBlock value: ea]]!

Item was removed:
- ----- Method: PackageInfo>>overriddenMethodsInClass: (in category 'listing') -----
- overriddenMethodsInClass: aClass
- ^Array streamContents: [:stream |
- self overriddenMethodsInClass: aClass
- do: [:each | stream nextPut: each]]
- !

Item was removed:
- ----- Method: PackageInfo>>overriddenMethodsInClass:do: (in category 'enumerating') -----
- overriddenMethodsInClass: aClass do: aBlock
- "Evaluates aBlock with the overridden methods in aClass"
- ^ self overrideCategoriesForClass: aClass do: [:cat |
- self methodsInCategory: cat ofClass: aClass do: aBlock]!

Item was removed:
- ----- Method: PackageInfo>>overrideCategoriesForClass: (in category 'testing') -----
- overrideCategoriesForClass: aClass
- ^Array streamContents: [:stream |
- self overrideCategoriesForClass: aClass
- do: [:each | stream nextPut: each]]
- !

Item was removed:
- ----- Method: PackageInfo>>overrideCategoriesForClass:do: (in category 'enumerating') -----
- overrideCategoriesForClass: aClass do: aBlock
- "Evaluates aBlock with all the *foo-override categories in aClass"
- ^ aClass organization categories do: [:cat |
- (self isOverrideCategory: cat) ifTrue: [aBlock value: cat]]!

Item was removed:
- ----- Method: PackageInfo>>overrideMethods (in category 'listing') -----
- overrideMethods
- ^ self extensionMethods select: [:ea | self isOverrideMethod: ea]!

Item was removed:
- ----- Method: PackageInfo>>packageName (in category 'naming') -----
- packageName
- ^ packageName ifNil: [packageName := self categoryName]!

Item was removed:
- ----- Method: PackageInfo>>packageName: (in category 'naming') -----
- packageName: aString
- packageName := aString!

Item was removed:
- ----- Method: PackageInfo>>postscript (in category 'preamble/postscript') -----
- postscript
- ^ postscript ifNil: [
- postscript := StringHolder new contents: self postscriptDefault]!

Item was removed:
- ----- Method: PackageInfo>>postscript: (in category 'preamble/postscript') -----
- postscript: aString
-
- postscript := StringHolder new contents: aString!

Item was removed:
- ----- Method: PackageInfo>>postscriptDefault (in category 'preamble/postscript') -----
- postscriptDefault
- ^ '"below, add code to be run after the loading of this package"'!

Item was removed:
- ----- Method: PackageInfo>>postscriptOfRemoval (in category 'preamble/postscript') -----
- postscriptOfRemoval
- ^ postscriptOfRemoval ifNil: [
- postscriptOfRemoval := StringHolder new contents: self postscriptOfRemovalDefault]!

Item was removed:
- ----- Method: PackageInfo>>postscriptOfRemoval: (in category 'preamble/postscript') -----
- postscriptOfRemoval: aString
-
- postscriptOfRemoval := StringHolder new contents: aString
- !

Item was removed:
- ----- Method: PackageInfo>>postscriptOfRemovalDefault (in category 'preamble/postscript') -----
- postscriptOfRemovalDefault
- ^ '"below, add code to clean up after the unloading of this package"'!

Item was removed:
- ----- Method: PackageInfo>>preamble (in category 'preamble/postscript') -----
- preamble
- ^ preamble ifNil: [
- preamble := StringHolder new contents: self preambleDefault]!

Item was removed:
- ----- Method: PackageInfo>>preamble: (in category 'preamble/postscript') -----
- preamble: aString
-
- preamble := StringHolder new contents: aString!

Item was removed:
- ----- Method: PackageInfo>>preambleDefault (in category 'preamble/postscript') -----
- preambleDefault
- ^ '"below, add code to be run before the loading of this package"'
- !

Item was removed:
- ----- Method: PackageInfo>>preambleOfRemoval (in category 'preamble/postscript') -----
- preambleOfRemoval
- ^ preambleOfRemoval ifNil: [
- preambleOfRemoval := StringHolder new contents: self preambleOfRemovalDefault]!

Item was removed:
- ----- Method: PackageInfo>>preambleOfRemoval: (in category 'preamble/postscript') -----
- preambleOfRemoval: aString
-
- preambleOfRemoval := StringHolder new contents: aString
- !

Item was removed:
- ----- Method: PackageInfo>>preambleOfRemovalDefault (in category 'preamble/postscript') -----
- preambleOfRemovalDefault
- ^'"below, add code to prepare for the unloading of this package"'!

Item was removed:
- ----- Method: PackageInfo>>printOn: (in category 'printing') -----
- printOn: aStream
- super printOn: aStream.
- aStream
- nextPut: $(;
- nextPutAll: self packageName;
- nextPut: $)!

Item was removed:
- ----- Method: PackageInfo>>referenceForMethod:ofClass: (in category 'testing') -----
- referenceForMethod: aSymbol ofClass: aClass
- ^ MethodReference class: aClass selector: aSymbol!

Item was removed:
- ----- Method: PackageInfo>>register (in category 'registering') -----
- register
- Environment current packageOrganizer registerPackage: self!

Item was removed:
- ----- Method: PackageInfo>>removeMethod: (in category 'modifying') -----
- removeMethod: aMethodReference!

Item was removed:
- ----- Method: PackageInfo>>selectors (in category 'listing') -----
- selectors
- ^ self methods collect: [:ea | ea methodSymbol]!

Item was removed:
- ----- Method: PackageInfo>>systemCategories (in category 'listing') -----
- systemCategories
- ^ Environment current organization categories select: [:cat | self includesSystemCategory: cat]!

Item was removed:
- ----- Method: PackageInfo>>systemCategoryPrefix (in category 'naming') -----
- systemCategoryPrefix
- ^ self packageName!

Item was removed:
- Object subclass: #PackageOrganizer
- instanceVariableNames: 'packages'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'PackageInfo-Base'!
- PackageOrganizer class
- instanceVariableNames: 'default'!
- PackageOrganizer class
- instanceVariableNames: 'default'!

Item was removed:
- ----- Method: PackageOrganizer class>>default (in category 'as yet unclassified') -----
- default
- ^ default ifNil: [default := self new]!

Item was removed:
- ----- Method: PackageOrganizer class>>new (in category 'as yet unclassified') -----
- new
- ^ self basicNew initialize!

Item was removed:
- ----- Method: PackageOrganizer>>flushObsoletePackages: (in category 'registering') -----
- flushObsoletePackages: aBlock
- "Flush all packages considered obsolete by evaluating the argument block."
-
- packages keys do:[:key|
- (aBlock value: (packages at: key)) ifTrue:[packages removeKey: key].
- ].
- self changed: #packages; changed: #packageNames.!

Item was removed:
- ----- Method: PackageOrganizer>>initialize (in category 'initializing') -----
- initialize
- packages := Dictionary new!

Item was removed:
- ----- Method: PackageOrganizer>>noPackageFound (in category 'searching') -----
- noPackageFound
- self error: 'No package found'!

Item was removed:
- ----- Method: PackageOrganizer>>packageNamed:ifAbsent: (in category 'searching') -----
- packageNamed: aString ifAbsent: errorBlock
- ^ packages at: aString ifAbsent: errorBlock!

Item was removed:
- ----- Method: PackageOrganizer>>packageNames (in category 'accessing') -----
- packageNames
- ^ packages keys!

Item was removed:
- ----- Method: PackageOrganizer>>packageOfClass: (in category 'searching') -----
- packageOfClass: aClass
- ^ self packageOfClass: aClass ifNone: [self noPackageFound]!

Item was removed:
- ----- Method: PackageOrganizer>>packageOfClass:ifNone: (in category 'searching') -----
- packageOfClass: aClass ifNone: errorBlock
- ^ self packages detect: [:ea | ea includesClass: aClass] ifNone: errorBlock!

Item was removed:
- ----- Method: PackageOrganizer>>packageOfMethod: (in category 'searching') -----
- packageOfMethod: aMethodReference
- ^ self packageOfMethod: aMethodReference ifNone: [self noPackageFound]!

Item was removed:
- ----- Method: PackageOrganizer>>packageOfMethod:ifNone: (in category 'searching') -----
- packageOfMethod: aMethodReference ifNone: errorBlock
- ^ self packages detect: [:ea | ea includesMethodReference: aMethodReference] ifNone: errorBlock!

Item was removed:
- ----- Method: PackageOrganizer>>packageOfMethodCategory:ofClass: (in category 'searching') -----
- packageOfMethodCategory: categoryName ofClass: aClass
- ^self packageOfMethodCategory: categoryName ofClass: aClass ifNone: [ self noPackageFound ]
- !

Item was removed:
- ----- Method: PackageOrganizer>>packageOfMethodCategory:ofClass:ifNone: (in category 'searching') -----
- packageOfMethodCategory: categoryName ofClass: aClass ifNone: errorBlock
- ^ self packages detect: [:ea | ea includesMethodCategory: categoryName ofClassNamed: aClass name] ifNone: errorBlock
-
-
- !

Item was removed:
- ----- Method: PackageOrganizer>>packageOfSystemCategory: (in category 'searching') -----
- packageOfSystemCategory: aSystemCategory
- ^ self packageOfSystemCategory: aSystemCategory ifNone: [ self noPackageFound ]
- !

Item was removed:
- ----- Method: PackageOrganizer>>packageOfSystemCategory:ifNone: (in category 'searching') -----
- packageOfSystemCategory: aSystemCategory ifNone: errorBlock
- ^ self packages detect: [:ea | ea includesSystemCategory: aSystemCategory] ifNone: errorBlock
- !

Item was removed:
- ----- Method: PackageOrganizer>>packages (in category 'accessing') -----
- packages
- ^ packages values!

Item was removed:
- ----- Method: PackageOrganizer>>registerPackage: (in category 'registering') -----
- registerPackage: aPackageInfo
- packages at: aPackageInfo packageName put: aPackageInfo.
- self changed: #packages; changed: #packageNames.
- !

Item was removed:
- ----- Method: PackageOrganizer>>registerPackageNamed: (in category 'registering') -----
- registerPackageNamed: aString
- ^ self registerPackage: (PackageInfo named: aString)!

Item was removed:
- ----- Method: PackageOrganizer>>unregisterPackage: (in category 'registering') -----
- unregisterPackage: aPackageInfo
- packages removeKey: aPackageInfo packageName ifAbsent: [].
- self changed: #packages; changed: #packageNames.
- !

Item was removed:
- ----- Method: PackageOrganizer>>unregisterPackageNamed: (in category 'registering') -----
- unregisterPackageNamed: aString
- self unregisterPackage: (self packageNamed: aString ifAbsent: [^ self])!

Item was removed:
- Object subclass: #PackageServices
- instanceVariableNames: ''
- classVariableNames: 'ServiceClasses'
- poolDictionaries: ''
- category: 'PackageInfo-Base'!

Item was removed:
- ----- Method: PackageServices class>>allServices (in category 'as yet unclassified') -----
- allServices
- ^ ServiceClasses gather: [:ea | ea services]!

Item was removed:
- ----- Method: PackageServices class>>initialize (in category 'as yet unclassified') -----
- initialize
- ServiceClasses := Set new!

Item was removed:
- ----- Method: PackageServices class>>register: (in category 'as yet unclassified') -----
- register: aClass
- ServiceClasses add: aClass!

Item was removed:
- ----- Method: PackageServices class>>unregister: (in category 'as yet unclassified') -----
- unregister: aClass
- ServiceClasses remove: aClass!

Item was removed:
- ----- Method: PositionableStream>>untilEnd:displayingProgress: (in category '*packageinfo-base') -----
- untilEnd: aBlock displayingProgress: aString
- aString
- displayProgressFrom: 0 to: self size
- during:
- [:bar |
- [self atEnd] whileFalse:
- [bar value: self position.
- aBlock value]].!

Item was removed:
- ----- Method: String>>escapeEntities (in category '*packageinfo-base') -----
- escapeEntities
- ^ self species streamContents: [:s | self do: [:c | s nextPutAll: c escapeEntities]]
- !