'From Pharo3.0 of 18 March 2013 [Latest update: #30269] on 12 July 2013 at 4:12:34 pm'! !TClassDescription methodsFor: '*System-Support' stamp: 'SebastianTleye 7/12/2013 15:59'! allUnreferencedClassVariables "Answer a list of the names of all the receiver's unreferenced class vars, including those defined in superclasses" ^ self systemNavigation allUnreferencedClassVariablesOf: self! ! !TClassDescription methodsFor: '*Spec-Builder' stamp: 'SebastianTleye 7/12/2013 15:50'! compileWithoutReturn: code classified: heading self compile: code classified: heading! ! !TClassDescription methodsFor: 'instance variables' stamp: 'SebastianTleye 7/12/2013 16:08'! addInstVarNamed: aString ^self explicitRequirement.! ! !TClassDescription methodsFor: '*Fuel' stamp: 'SebastianTleye 7/12/2013 15:51'! instanceVariableNamesDo: anUnaryBlock "This is part of the interface between the compiler and a class's instance or field names. The class should enumerate anUnaryBlock with the instance variable name strings. The order is important. Names evaluated later will override the same names occurring earlier." | superInstSize | (superInstSize := self superclass notNil ifTrue: [self superclass instSize] ifFalse: [0]) > 0 ifTrue: [self superclass instanceVariableNamesDo: anUnaryBlock]. 1 to: self instSize - superInstSize do: [:i| anUnaryBlock value: (self instanceVariables at: i)]! ! !TClassDescription methodsFor: '*Manifest-Core' stamp: 'SebastianTleye 7/12/2013 15:53'! manifestBuilderForRuleChecker: aRuleChecker "Return the manifestsince the rulechecker is keeping a cache, we ask it back" ^ aRuleChecker manifestBuilderOfClass: self! ! !TClassDescription methodsFor: '*Manifest-Core' stamp: 'SebastianTleye 7/12/2013 15:52'! criticClass "Return the class of the receiver for the critic browser. This behavior may be folded later by changing the name of this method or using another one." ^ self! ! !TClassDescription methodsFor: '*Manifest-Core' stamp: 'SebastianTleye 7/12/2013 15:53'! mcWorkingCopy MCWorkingCopy managersForClass: self do: [: package | ^ package ]! ! !TClassDescription methodsFor: '*Manifest-Core' stamp: 'SebastianTleye 7/12/2013 15:52'! criticNameOn: aStream "This behavior may be folded later by changing the name of this method or using another one." aStream << self name << ' (' << self category << ')' ! ! !TClassDescription methodsFor: '*Manifest-Core' stamp: 'SebastianTleye 7/12/2013 15:53'! textBehavior ^ nil! ! !TClassDescription methodsFor: 'accessing' stamp: 'SebastianTleye 7/12/2013 16:10'! instanceVariables: anObject ^self explicitRequirement.! ! !TClassDescription methodsFor: '*refactoring-core-fixes' stamp: 'SebastianTleye 7/12/2013 15:54'! whichSelectorsReallyRead: aString "This is a modified version of #whichSelectorsRead: that does exclude the writers." | index | index := self instVarIndexFor: aString ifAbsent: [ ^ IdentitySet new ]. ^ self selectors select: [ :each | (self compiledMethodAt: each) readsField: index ]! ! !TClassDescription methodsFor: 'filein/out' stamp: 'SebastianTleye 7/12/2013 16:11'! definition ^self explicitRequirement.! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:56'! packages "the extending packages of a class are the packages that extend it." ^ self extendingPackages asSet copy add: self package; yourself! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:56'! packageOrganizer "Returns the organizer of this class" ^ RPackage organizer ! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:57'! packagesWithoutExtensions ^ Set new add: self package; yourself.! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:56'! package ^ RPackage organizer packageOf: self. ! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:55'! extendingPackages "the extending packages of a class are the packages that extend it." ^ RPackage organizer extendingPackagesOf: self! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:55'! isExtended ^ self extendingPackages isEmpty! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:55'! isExtendedInPackage: aPackage "returns true if aPackage defines an extension to this class" ^ aPackage extendsClass: self.! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:56'! packageFromOrganizer: anOrganizer "returns the package that defines this class" ^ anOrganizer packageOf: self.! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:55'! isDefinedInPackage: aPackage "returns true if aPackage contains the definitino of this class" ^ aPackage includesClass: self.! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:55'! compileSilently: code "Compile the code and classify the resulting method in the given category, leaving no trail in the system log, nor in any change set, nor in the 'recent submissions' list. This should only be used when you know for sure that the compilation will succeed." ^ self compileSilently: code classified: 'not defined category' notifying: nil.! ! !TClassDescription methodsFor: '*System-Support' stamp: 'SebastianTleye 7/12/2013 15:59'! allUnreferencedClassVariables "Answer a list of the names of all the receiver's unreferenced class vars, including those defined in superclasses" ^ self systemNavigation allUnreferencedClassVariablesOf: self! ! !TClassDescription methodsFor: '*Spec-Builder' stamp: 'SebastianTleye 7/12/2013 15:50'! compileWithoutReturn: code classified: heading self compile: code classified: heading! ! !TClassDescription methodsFor: 'instance variables' stamp: 'SebastianTleye 7/12/2013 16:08'! addInstVarNamed: aString ^self explicitRequirement.! ! !TClassDescription methodsFor: '*Fuel' stamp: 'SebastianTleye 7/12/2013 15:51'! instanceVariableNamesDo: anUnaryBlock "This is part of the interface between the compiler and a class's instance or field names. The class should enumerate anUnaryBlock with the instance variable name strings. The order is important. Names evaluated later will override the same names occurring earlier." | superInstSize | (superInstSize := self superclass notNil ifTrue: [self superclass instSize] ifFalse: [0]) > 0 ifTrue: [self superclass instanceVariableNamesDo: anUnaryBlock]. 1 to: self instSize - superInstSize do: [:i| anUnaryBlock value: (self instanceVariables at: i)]! ! !TClassDescription methodsFor: '*Manifest-Core' stamp: 'SebastianTleye 7/12/2013 15:53'! manifestBuilderForRuleChecker: aRuleChecker "Return the manifestsince the rulechecker is keeping a cache, we ask it back" ^ aRuleChecker manifestBuilderOfClass: self! ! !TClassDescription methodsFor: '*Manifest-Core' stamp: 'SebastianTleye 7/12/2013 15:52'! criticClass "Return the class of the receiver for the critic browser. This behavior may be folded later by changing the name of this method or using another one." ^ self! ! !TClassDescription methodsFor: '*Manifest-Core' stamp: 'SebastianTleye 7/12/2013 15:53'! mcWorkingCopy MCWorkingCopy managersForClass: self do: [: package | ^ package ]! ! !TClassDescription methodsFor: '*Manifest-Core' stamp: 'SebastianTleye 7/12/2013 15:52'! criticNameOn: aStream "This behavior may be folded later by changing the name of this method or using another one." aStream << self name << ' (' << self category << ')' ! ! !TClassDescription methodsFor: '*Manifest-Core' stamp: 'SebastianTleye 7/12/2013 15:53'! textBehavior ^ nil! ! !TClassDescription methodsFor: 'accessing' stamp: 'SebastianTleye 7/12/2013 16:10'! instanceVariables: anObject ^self explicitRequirement.! ! !TClassDescription methodsFor: '*refactoring-core-fixes' stamp: 'SebastianTleye 7/12/2013 15:54'! whichSelectorsReallyRead: aString "This is a modified version of #whichSelectorsRead: that does exclude the writers." | index | index := self instVarIndexFor: aString ifAbsent: [ ^ IdentitySet new ]. ^ self selectors select: [ :each | (self compiledMethodAt: each) readsField: index ]! ! !TClassDescription methodsFor: 'filein/out' stamp: 'SebastianTleye 7/12/2013 16:11'! definition ^self explicitRequirement.! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:56'! packages "the extending packages of a class are the packages that extend it." ^ self extendingPackages asSet copy add: self package; yourself! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:56'! packageOrganizer "Returns the organizer of this class" ^ RPackage organizer ! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:57'! packagesWithoutExtensions ^ Set new add: self package; yourself.! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:56'! package ^ RPackage organizer packageOf: self. ! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:55'! extendingPackages "the extending packages of a class are the packages that extend it." ^ RPackage organizer extendingPackagesOf: self! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:55'! isExtended ^ self extendingPackages isEmpty! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:55'! isExtendedInPackage: aPackage "returns true if aPackage defines an extension to this class" ^ aPackage extendsClass: self.! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:56'! packageFromOrganizer: anOrganizer "returns the package that defines this class" ^ anOrganizer packageOf: self.! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:55'! isDefinedInPackage: aPackage "returns true if aPackage contains the definitino of this class" ^ aPackage includesClass: self.! ! !TClassDescription methodsFor: '*rpackage-core' stamp: 'SebastianTleye 7/12/2013 15:55'! compileSilently: code "Compile the code and classify the resulting method in the given category, leaving no trail in the system log, nor in any change set, nor in the 'recent submissions' list. This should only be used when you know for sure that the compilation will succeed." ^ self compileSilently: code classified: 'not defined category' notifying: nil.! ! !Class methodsFor: 'instance variables' stamp: 'SebastianTleye 7/12/2013 16:03'! addInstVarNamed: aString "Add the argument, aString, as one of the receiver's instance variables." ^self classBuilder name: self name inEnvironment: self environment subclassOf: self superclass type: self typeOfClass instanceVariableNames: self instanceVariablesString, ' ', aString classVariableNames: self classVariablesString poolDictionaries: self sharedPoolsString category: self category! ! !Class methodsFor: 'instance variables' stamp: 'SebastianTleye 7/12/2013 16:03'! addInstVarNamed: aString "Add the argument, aString, as one of the receiver's instance variables." ^self classBuilder name: self name inEnvironment: self environment subclassOf: self superclass type: self typeOfClass instanceVariableNames: self instanceVariablesString, ' ', aString classVariableNames: self classVariablesString poolDictionaries: self sharedPoolsString category: self category! ! !TraitDescription methodsFor: 'accessing' stamp: 'SebastianTleye 7/12/2013 16:09'! instanceVariables: anObject "Compatibility purposes"! ! !TraitDescription methodsFor: 'instance variables' stamp: 'SebastianTleye 7/12/2013 16:06'! addInstVarNamed: aString "Compatibility purposes"! ! !TraitDescription methodsFor: 'filein/out' stamp: 'SebastianTleye 7/12/2013 16:11'! definition "Answer a String that defines the receiver" ^String streamContents: [:stream | stream nextPutAll: self class name. stream nextPutAll: ' named: '; store: self name. stream cr; tab; nextPutAll: 'uses: '; nextPutAll: self traitCompositionString. stream cr; tab; nextPutAll: 'category: '; store: self category asString].! ! !TraitDescription methodsFor: 'accessing' stamp: 'SebastianTleye 7/12/2013 16:09'! instanceVariables: anObject "Compatibility purposes"! ! !TraitDescription methodsFor: 'instance variables' stamp: 'SebastianTleye 7/12/2013 16:06'! addInstVarNamed: aString "Compatibility purposes"! ! !TraitDescription methodsFor: 'filein/out' stamp: 'SebastianTleye 7/12/2013 16:11'! definition "Answer a String that defines the receiver" ^String streamContents: [:stream | stream nextPutAll: self class name. stream nextPutAll: ' named: '; store: self name. stream cr; tab; nextPutAll: 'uses: '; nextPutAll: self traitCompositionString. stream cr; tab; nextPutAll: 'category: '; store: self category asString].! ! !TraitDescription reorganize! (#'*NautilusCommon' correspondingForTest) (#'pool variable' usesLocalPoolVarNamed: allSharedPools sharedPoolOfVarNamed: usesPoolVarNamed: hasSharedPools) (#'initialize-release' updateInstances:from:isMeta: superclass:methodDictionary:format: obsolete updateInstancesFrom:) (#accessing instanceVariables: traitVersion instanceVariables version classVersion) (#composition - addExclusionOf: + @) (#'accessing method dictionary' addAndClassifySelector:withMethod:inProtocol:notifying: addSelectorSilently:withMethod: uncategorizedMethods removeSelector: addSelector:withMethod:notifying: removeCategory: allMethodsInCategory: allMethodCategoriesIntegratedThrough: noteAddedSelector:meta: methodsInCategory:) (#private spaceUsed errorCategoryName notifyRepackage:method:oldProtocol:newProtocol: instVarMappingFrom: addOnTheLeft: numberOfMethods setInstVarNames: newInstanceFrom:variable:size:map: linesOfCode addCompositionOnLeft:) (#'accessing parallel hierarchy' isBaseTrait classSide baseTrait isClassTrait hasClassSide isClassSide theMetaClass theNonMetaClass instanceSide isMeta isInstanceSide classTrait) (#'*refactoring-core-fixes' whichSelectorsReallyRead:) (#'organization updating' updateOrganizationDescription:oldCategory:newCategory:changedCategories: updateOrganizationSelector:oldCategory:newCategory: notifyOfRecategorizedSelector:from:to: noteRecategorizedSelectors:oldComposition: noteMethodChanged:to: noteRecategorizedSelector:from:to: applyChangesOfNewTraitCompositionReplacing: noteChangesFrom: noteMethodAdded: noteMethodRemoved: updateOrganizationDescription:oldCategory:newCategory:changed:) (#'instance variables' instVarIndexFor:ifAbsent: addInstVarNamed: checkForInstVarsOK: instVarNames classThatDefinesClassVariable: hasInstVarNamed: forceNewFrom: classThatDefinesInstanceVariable: instVarNameForIndex: allInstVarNamesEverywhere instVarIndexFor:) (#converting asTraitComposition) (#'*FuelTests' duringTestCompileSilently: duringTestCompileSilently:classified:) (#enquiries subject trait aliasesForSelector: changedSelectorsComparedTo: collectMethodsFor:into: allAliasesDict) (#'*Fuel' instanceVariableNamesDo:) (#compiling compile:classified: wantsRecompilationProgressReported compileSilently:classified:notifying: instVarNamesAndOffsetsDo: compile:classified:notifying: compile:classified:withStamp:notifying:logSource: compile:classified:withStamp:notifying: doneCompiling compile:notifying: logMethodSource:forMethod:inCategory:withStamp: noteCompilationOf:meta: acceptsLoggingOfCompilation wantsChangeSetLogging compileSilently:classified: reformatAll) (#printing storeOn: classVariablesString instanceVariablesString printOn: sharedPoolsString) (#'accessing comment' comment: classCommentBlank hasComment comment comment:stamp:) (#'filein/out' fileOutOn:moveSource:toFile: fileOutMethod:on: fileOutCategory: commentStamp:prior: printCategoryChunk:on:withStamp:priorMethod: commentStamp: fileOutChangedMessages:on: fileOutMethod: methodsFor: moveChangesTo: fileOutOn: fileOutChangedMessages:on:moveSource:toFile: fileOutCategory:on:moveSource:toFile: classComment:stamp: localMethods definition printMethodChunk:withPreamble:on:moveSource:toFile: classComment: fileOutOrganizationOn: selectorsToFileOutCategory: putClassCommentToCondensedChangesFile:) (#testing isTestCase) (#'*System-Support' allUnreferencedClassVariables) (#initialization) (#'*Manifest-Core' manifestBuilderForRuleChecker: criticClass mcWorkingCopy criticNameOn: textBehavior) (#'accessing class hierarchy' commentInventory classesThatImplementAllOf: printSubclassesOn:level: subclassesDo:) (#'users notification' notifyUsersOfChangedSelectors: notifyUsersOfRecategorizedSelector:from:to:) (#organization organization whichCategoryIncludesSelector: category basicOrganization basicOrganization: zapOrganization category: reorganize addCategory:before: organization:) (#'*Spec-Builder' compileWithoutReturn:classified:) (#'*rpackage-core' isExtended package isDefinedInPackage: packageOrganizer isExtendedInPackage: packageFromOrganizer: packages packagesWithoutExtensions compileSilently: extendingPackages) (#authors addAuthorsTo: authors) (#copying copyAll:from:classified: copyAllCategoriesFrom: copyTraitExpression copyMethodDictionaryFrom: copyCategory:from: copyCategory:from:classified: copyAll:from: copy:from:classified: copy:from:) ! ClassDescription removeSelector: #allUnreferencedClassVariables! ClassDescription removeSelector: #compileSilently:! ClassDescription removeSelector: #compileWithoutReturn:classified:! ClassDescription removeSelector: #criticClass! ClassDescription removeSelector: #criticNameOn:! ClassDescription removeSelector: #extendingPackages! ClassDescription removeSelector: #instanceVariableNamesDo:! ClassDescription removeSelector: #isDefinedInPackage:! ClassDescription removeSelector: #isExtended! ClassDescription removeSelector: #isExtendedInPackage:! ClassDescription removeSelector: #manifestBuilderForRuleChecker:! ClassDescription removeSelector: #mcWorkingCopy! ClassDescription removeSelector: #package! ClassDescription removeSelector: #packageFromOrganizer:! ClassDescription removeSelector: #packageOrganizer! ClassDescription removeSelector: #packages! ClassDescription removeSelector: #packagesWithoutExtensions! ClassDescription removeSelector: #textBehavior! ClassDescription removeSelector: #whichSelectorsReallyRead:! !TClassDescription reorganize! (#'*FuelTests' duringTestCompileSilently: duringTestCompileSilently:classified:) (#'accessing class hierarchy' commentInventory classesThatImplementAllOf: printSubclassesOn:level: subclassesDo:) (#'*System-Support' allUnreferencedClassVariables) (#testing isTestCase) (#'initialize-release' updateInstances:from:isMeta: superclass:methodDictionary:format: obsolete updateInstancesFrom:) (#'*Spec-Builder' compileWithoutReturn:classified:) (#private notifyRepackage:method:oldProtocol:newProtocol: spaceUsed numberOfMethods setInstVarNames: errorCategoryName newInstanceFrom:variable:size:map: linesOfCode instVarMappingFrom:) (#'pool variable' hasSharedPools allSharedPools usesPoolVarNamed: sharedPoolOfVarNamed: usesLocalPoolVarNamed:) (#copying copyAll:from:classified: copy:from: copyCategory:from: copyCategory:from:classified: copy:from:classified: copyAll:from: copyMethodDictionaryFrom: copyAllCategoriesFrom:) (#authors addAuthorsTo: authors) (#printing storeOn: classVariablesString instanceVariablesString printOn: sharedPoolsString) (#'instance variables' instVarIndexFor:ifAbsent: addInstVarNamed: checkForInstVarsOK: instVarNames classThatDefinesClassVariable: hasInstVarNamed: forceNewFrom: classThatDefinesInstanceVariable: instVarNameForIndex: allInstVarNamesEverywhere instVarIndexFor:) (#'*Fuel' instanceVariableNamesDo:) (#'*Manifest-Core' manifestBuilderForRuleChecker: criticClass mcWorkingCopy criticNameOn: textBehavior) (#organization organization: zapOrganization basicOrganization: organization basicOrganization reorganize addCategory:before: whichCategoryIncludesSelector:) (#compiling compile:classified: wantsRecompilationProgressReported compileSilently:classified:notifying: instVarNamesAndOffsetsDo: compile:classified:notifying: compile:classified:withStamp:notifying:logSource: compile:classified:withStamp:notifying: doneCompiling compile:notifying: logMethodSource:forMethod:inCategory:withStamp: noteCompilationOf:meta: acceptsLoggingOfCompilation wantsChangeSetLogging reformatAll compileSilently:classified:) (#accessing instanceVariables: instanceVariables version classVersion) (#'users notification' notifyUsersOfChangedSelectors: notifyUsersOfRecategorizedSelector:from:to:) (#'accessing method dictionary' addAndClassifySelector:withMethod:inProtocol:notifying: addSelectorSilently:withMethod: methodsInCategory: removeSelector: addSelector:withMethod:notifying: allMethodsInCategory: removeCategory: noteAddedSelector:meta: allMethodCategoriesIntegratedThrough: uncategorizedMethods) (#'accessing parallel hierarchy' isInstanceSide theNonMetaClass theMetaClass isClassSide isMeta instanceSide hasClassSide classSide) (#'*refactoring-core-fixes' whichSelectorsReallyRead:) (#'accessing comment' comment: classCommentBlank hasComment comment comment:stamp:) (#'filein/out' fileOutOn:moveSource:toFile: fileOutMethod:on: fileOutCategory: commentStamp:prior: printCategoryChunk:on:withStamp:priorMethod: commentStamp: fileOutChangedMessages:on: fileOutMethod: methodsFor: fileOutChangedMessages:on:moveSource:toFile: localMethods moveChangesTo: fileOutCategory:on:moveSource:toFile: classComment:stamp: fileOutOn: definition printMethodChunk:withPreamble:on:moveSource:toFile: classComment: fileOutOrganizationOn: selectorsToFileOutCategory: putClassCommentToCondensedChangesFile:) (#'*rpackage-core' packages packageOrganizer packagesWithoutExtensions package extendingPackages isExtended isExtendedInPackage: packageFromOrganizer: isDefinedInPackage: compileSilently:) (#'organization updating' updateOrganizationDescription:oldCategory:newCategory:changedCategories: updateOrganizationSelector:oldCategory:newCategory: notifyOfRecategorizedSelector:from:to: noteRecategorizedSelectors:oldComposition: noteMethodChanged:to: noteRecategorizedSelector:from:to: applyChangesOfNewTraitCompositionReplacing: noteMethodRemoved: noteMethodAdded: noteChangesFrom: updateOrganizationDescription:oldCategory:newCategory:changed:) (#'*NautilusCommon' correspondingForTest) ! TClass removeSelector: #addInstVarNamed:!