ProjectDefinition.st
changeset 12624 6caeb35528b4
parent 12596 5ed54f811010
child 12635 6309bdcd2be0
equal deleted inserted replaced
12623:389426d8f6eb 12624:6caeb35528b4
  4519         safeForOverwrittenMethods := Dictionary new.
  4519         safeForOverwrittenMethods := Dictionary new.
  4520     ].
  4520     ].
  4521     safeForOverwrittenMethods at:(aClass name -> selector) put:oldMethod.
  4521     safeForOverwrittenMethods at:(aClass name -> selector) put:oldMethod.
  4522 !
  4522 !
  4523 
  4523 
       
  4524 restoreOverwrittenExtensionMethods
       
  4525     "after unloading, tell other packages to restore any safed reference to any method
       
  4526      which got overloaded by me."
       
  4527 
       
  4528     self extensionMethodNames pairWiseDo:[:className :selector |
       
  4529         |class oldMethod oldPackage|
       
  4530 
       
  4531         oldPackage := extensionOverwriteInfo at:(className,'>>',selector).
       
  4532         oldPackage notNil ifTrue:[
       
  4533             class := Smalltalk classNamed:className.
       
  4534             class notNil ifTrue:[
       
  4535                 oldMethod := oldPackage savedOverwrittenMethodForClass:class selector:selector.
       
  4536                 oldMethod notNil ifTrue:[
       
  4537                     self halt.    
       
  4538                 ].
       
  4539             ]
       
  4540         ].
       
  4541     ].
       
  4542 !
       
  4543 
  4524 savedOverwrittenMethodForClass:aClass selector:aSelector
  4544 savedOverwrittenMethodForClass:aClass selector:aSelector
  4525     "return one of my saved original methods"
  4545     "return one of my saved original methods"
  4526 
  4546 
  4527     ^ safeForOverwrittenMethods at:(aClass name,'>>',aSelector) ifAbsent:nil
  4547     ^ safeForOverwrittenMethods at:(aClass name,'>>',aSelector) ifAbsent:nil
  4528 ! !
  4548 ! !
  4769 
  4789 
  4770 safeForOverwrittenMethods
  4790 safeForOverwrittenMethods
  4771     ^ safeForOverwrittenMethods
  4791     ^ safeForOverwrittenMethods
  4772 !
  4792 !
  4773 
  4793 
       
  4794 unloadAllClasses
       
  4795     Transcript showCR:'unloading not yet fully supported'
       
  4796 !
       
  4797 
       
  4798 unloadClassLibrary
       
  4799     Transcript showCR:'unloading not yet fully supported'
       
  4800 !
       
  4801 
       
  4802 unloadSubProjects
       
  4803     "unload other packages"
       
  4804 
       
  4805     self subProjects do:[:p |
       
  4806         |subDef|
       
  4807 
       
  4808         subDef := self definitionClassForPackage:p.
       
  4809         subDef notNil ifTrue:[
       
  4810             subDef unloadSubProjects.
       
  4811             subDef unloadPackage.
       
  4812         ].
       
  4813     ].
       
  4814 !
       
  4815 
  4774 update:anAspectSymbol with:argument from:changedObject
  4816 update:anAspectSymbol with:argument from:changedObject
  4775     "when any of my class methods is changed, we mark the project as unloaded.
  4817     "when any of my class methods is changed, we mark the project as unloaded.
  4776      May be some mor classes have to be loaded"
  4818      May be some mor classes have to be loaded"
  4777 
  4819 
  4778     (changedObject == self class and:[anAspectSymbol == #methodDictionary]) ifTrue:[
  4820     (changedObject == self class and:[anAspectSymbol == #methodDictionary]) ifTrue:[
  5247 ! !
  5289 ! !
  5248 
  5290 
  5249 !ProjectDefinition class methodsFor:'documentation'!
  5291 !ProjectDefinition class methodsFor:'documentation'!
  5250 
  5292 
  5251 version
  5293 version
  5252     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.294 2009-12-07 19:12:23 cg Exp $'
  5294     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.295 2009-12-17 19:50:36 cg Exp $'
  5253 !
  5295 !
  5254 
  5296 
  5255 version_CVS
  5297 version_CVS
  5256     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.294 2009-12-07 19:12:23 cg Exp $'
  5298     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.295 2009-12-17 19:50:36 cg Exp $'
  5257 ! !
  5299 ! !
  5258 
  5300 
  5259 ProjectDefinition initialize!
  5301 ProjectDefinition initialize!