ProjectDefinition.st
changeset 14021 11d015697e44
parent 13968 03b79717bd2b
child 14042 05b7b61d7e59
equal deleted inserted replaced
14020:3cbf9505591c 14021:11d015697e44
  1169 initialize
  1169 initialize
  1170     LibraryType := #'Library'.
  1170     LibraryType := #'Library'.
  1171     GUIApplicationType := #'GUI-Application'.
  1171     GUIApplicationType := #'GUI-Application'.
  1172     NonGUIApplicationType := #'NonGUI-Application'.
  1172     NonGUIApplicationType := #'NonGUI-Application'.
  1173     AccessLock := Semaphore forMutualExclusion.
  1173     AccessLock := Semaphore forMutualExclusion.
       
  1174     Verbose := false.
  1174 
  1175 
  1175     "
  1176     "
  1176      self initialize
  1177      self initialize
  1177     "
  1178     "
  1178 
  1179 
  5586             self loadClass: eachClassName asAutoloaded: true language: (classNamesToLangs at: eachClassName) .
  5587             self loadClass: eachClassName asAutoloaded: true language: (classNamesToLangs at: eachClassName) .
  5587         ].
  5588         ].
  5588 
  5589 
  5589         classesWhichFailedToLoad := OrderedCollection new.
  5590         classesWhichFailedToLoad := OrderedCollection new.
  5590         classNamesToLoad notEmpty ifTrue:[
  5591         classNamesToLoad notEmpty ifTrue:[
  5591             Verbose == true ifTrue:[
  5592             Verbose ifTrue:[
  5592                 Transcript showCR:('  %1: filing in missing classes (%2) individually...'
  5593                 Transcript showCR:('  %1: filing in missing classes (%2) individually...'
  5593                                     bindWith:self name with:classNamesToLoad size).
  5594                                     bindWith:self name with:classNamesToLoad size).
  5594             ]
  5595             ]
  5595         ].
  5596         ].
  5596         classNamesToLoad withIndexDo:[:eachClassName :index|
  5597         classNamesToLoad withIndexDo:[:eachClassName :index|
  5605                  loading it"
  5606                  loading it"
  5606 
  5607 
  5607                 classesWhichFailedToLoad add:eachClassName.
  5608                 classesWhichFailedToLoad add:eachClassName.
  5608                 self loadClass: eachClassName asAutoloaded: true language: (classNamesToLangs at: eachClassName).
  5609                 self loadClass: eachClassName asAutoloaded: true language: (classNamesToLangs at: eachClassName).
  5609             ] do:[
  5610             ] do:[
  5610                 Verbose == true ifTrue:[
  5611                 Verbose ifTrue:[
  5611                     Transcript showCR:('  %1: filing in %2...' bindWith:self name with:eachClassName).
  5612                     Transcript showCR:('  %1: filing in %2...' bindWith:self name with:eachClassName).
  5612                 ].
  5613                 ].
  5613                 cls := self loadClass: eachClassName asAutoloaded: false language: (classNamesToLangs at: eachClassName).
  5614                 cls := self loadClass: eachClassName asAutoloaded: false language: (classNamesToLangs at: eachClassName).
  5614                 cls notNil ifTrue:[
  5615                 cls notNil ifTrue:[
  5615                     loadedClasses add:cls
  5616                     loadedClasses add:cls
  5690 
  5691 
  5691     (Smalltalk isClassLibraryLoaded:libraryName) ifTrue:[
  5692     (Smalltalk isClassLibraryLoaded:libraryName) ifTrue:[
  5692         "already loaded"
  5693         "already loaded"
  5693         ^ true
  5694         ^ true
  5694     ].
  5695     ].
  5695     Verbose == true ifTrue:[
  5696     Verbose ifTrue:[
  5696         Transcript showCR:('  %1: loading classLibrary...' bindWith:self name).
  5697         Transcript showCR:('  %1: loading classLibrary...' bindWith:self name).
  5697     ].
  5698     ].
  5698     self activityNotification:'Loading classLibrary'.
  5699     self activityNotification:'Loading classLibrary'.
  5699 
  5700 
  5700     ^ Smalltalk fileInClassLibrary:libraryName inPackage:self package.
  5701     ^ Smalltalk fileInClassLibrary:libraryName inPackage:self package.
  5703 loadExtensions
  5704 loadExtensions
  5704     "load extension methods - do not load if they are already present"
  5705     "load extension methods - do not load if they are already present"
  5705 
  5706 
  5706     self hasAllExtensionsLoaded ifFalse:[
  5707     self hasAllExtensionsLoaded ifFalse:[
  5707         self breakPoint:#cg.
  5708         self breakPoint:#cg.
  5708         Verbose == true ifTrue:[
  5709         Verbose ifTrue:[
  5709             Transcript showCR:('  %1: filing in extensions...' bindWith:self name).
  5710             Transcript showCR:('  %1: filing in extensions...' bindWith:self name).
  5710         ].
  5711         ].
  5711         Smalltalk loadExtensionsForPackage:self package.
  5712         Smalltalk loadExtensionsForPackage:self package.
  5712         ^ true.
  5713         ^ true.
  5713     ].
  5714     ].
  5756 
  5757 
  5757     |prereq|
  5758     |prereq|
  5758 
  5759 
  5759     prereq := self effectivePreRequisites.
  5760     prereq := self effectivePreRequisites.
  5760     prereq notEmptyOrNil ifTrue:[
  5761     prereq notEmptyOrNil ifTrue:[
  5761         Verbose == true ifTrue:[
  5762         Verbose ifTrue:[
  5762             Transcript showCR:('  %1 loading prerequisites...' bindWith:self name).
  5763             Transcript showCR:('  %1 loading prerequisites...' bindWith:self name).
  5763         ].
  5764         ].
  5764         self loadPackages:prereq asAutoloaded:asAutoloaded
  5765         self loadPackages:prereq asAutoloaded:asAutoloaded
  5765     ].
  5766     ].
  5766 !
  5767 !
  5855                 numClassInstVars:0.     "FIXME"
  5856                 numClassInstVars:0.     "FIXME"
  5856         ].
  5857         ].
  5857 
  5858 
  5858         classesWhichFailedToLoad := OrderedCollection new.
  5859         classesWhichFailedToLoad := OrderedCollection new.
  5859         classNamesToLoad notEmpty ifTrue:[
  5860         classNamesToLoad notEmpty ifTrue:[
  5860             Verbose == true ifTrue:[
  5861             Verbose ifTrue:[
  5861                 Transcript showCR:('  %1: filing in missing classes (%2) individually...'
  5862                 Transcript showCR:('  %1: filing in missing classes (%2) individually...'
  5862                                     bindWith:self name with:classNamesToLoad size).
  5863                                     bindWith:self name with:classNamesToLoad size).
  5863             ]
  5864             ]
  5864         ].
  5865         ].
  5865         classNamesToLoad withIndexDo:[:eachClassName :index|
  5866         classNamesToLoad withIndexDo:[:eachClassName :index|
  5879                     category:#autoloaded    "FIXME"
  5880                     category:#autoloaded    "FIXME"
  5880                     package:self package
  5881                     package:self package
  5881                     revision:nil
  5882                     revision:nil
  5882                     numClassInstVars:0.     "FIXME"
  5883                     numClassInstVars:0.     "FIXME"
  5883             ] do:[
  5884             ] do:[
  5884                 Verbose == true ifTrue:[
  5885                 Verbose ifTrue:[
  5885                     Transcript showCR:('  %1: filing in %2...' bindWith:self name with:eachClassName).
  5886                     Transcript showCR:('  %1: filing in %2...' bindWith:self name with:eachClassName).
  5886                 ].
  5887                 ].
  5887                 cls := Smalltalk
  5888                 cls := Smalltalk
  5888                             fileInClass:eachClassName
  5889                             fileInClass:eachClassName
  5889                             package:self package
  5890                             package:self package
  6390     self extensionMethodNames pairWiseDo:[:className :selector |
  6391     self extensionMethodNames pairWiseDo:[:className :selector |
  6391         |cls|
  6392         |cls|
  6392 
  6393 
  6393         cls := Smalltalk loadedClassNamed:className.
  6394         cls := Smalltalk loadedClassNamed:className.
  6394         cls isNil ifTrue:[
  6395         cls isNil ifTrue:[
  6395             Verbose == true ifTrue:[
  6396             Verbose ifTrue:[
  6396                 Transcript showCR:(self name,' missing extension class "',className,'".').
  6397                 Transcript showCR:(self name,' missing extension class "',className,'".').
  6397             ].
  6398             ].
  6398             ^ false
  6399             ^ false
  6399         ].
  6400         ].
  6400         "there is no possibility that we installed an extension method in an unloaded class"
  6401         "there is no possibility that we installed an extension method in an unloaded class"
  6401         (cls isLoaded not or:[(cls compiledMethodAt:selector) isNil]) ifTrue:[
  6402         (cls isLoaded not or:[(cls compiledMethodAt:selector) isNil]) ifTrue:[
  6402             Verbose == true ifTrue:[
  6403             Verbose ifTrue:[
  6403                 Transcript showCR:(self name,' missing extension method "',className,'>>',selector,'".').
  6404                 Transcript showCR:(self name,' missing extension method "',className,'>>',selector,'".').
  6404             ].
  6405             ].
  6405             ^ false
  6406             ^ false
  6406         ].
  6407         ].
  6407     ].
  6408     ].
  6419     classNames do:[:eachClassName |
  6420     classNames do:[:eachClassName |
  6420         |cls|
  6421         |cls|
  6421 
  6422 
  6422         cls := Smalltalk loadedClassNamed:eachClassName.
  6423         cls := Smalltalk loadedClassNamed:eachClassName.
  6423         cls isNil ifTrue:[
  6424         cls isNil ifTrue:[
  6424             (self name,' [info]: missing class: ',eachClassName) infoPrintCR.
  6425             Verbose ifTrue:[
       
  6426                (self name, ' [info]: missing class: ', eachClassName) infoPrintCR.
       
  6427             ].
  6425             ^ false
  6428             ^ false
  6426         ].
  6429         ].
  6427         (checkIfFullyLoaded and:[cls isLoaded not]) ifTrue:[
  6430         (checkIfFullyLoaded and:[cls isLoaded not]) ifTrue:[
  6428             (self name,' [info]: unloaded class: ',eachClassName) infoPrintCR.
  6431             Verbose ifTrue:[
       
  6432                 (self name,' [info]: unloaded class: ', eachClassName) infoPrintCR.
       
  6433             ].
  6429             ^ false.
  6434             ^ false.
  6430         ].
  6435         ].
  6431     ].
  6436     ].
  6432 
  6437 
  6433     ^ true
  6438     ^ true
  6663 ! !
  6668 ! !
  6664 
  6669 
  6665 !ProjectDefinition class methodsFor:'documentation'!
  6670 !ProjectDefinition class methodsFor:'documentation'!
  6666 
  6671 
  6667 version
  6672 version
  6668     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.380 2012-01-22 10:08:54 cg Exp $'
  6673     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.381 2012-02-23 11:50:27 stefan Exp $'
  6669 !
  6674 !
  6670 
  6675 
  6671 version_CVS
  6676 version_CVS
  6672     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.380 2012-01-22 10:08:54 cg Exp $'
  6677     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.381 2012-02-23 11:50:27 stefan Exp $'
  6673 !
  6678 !
  6674 
  6679 
  6675 version_SVN
  6680 version_SVN
  6676     ^ '§ Id: ProjectDefinition.st 10645 2011-06-09 15:28:45Z vranyj1  §'
  6681     ^ '§ Id: ProjectDefinition.st 10645 2011-06-09 15:28:45Z vranyj1  §'
  6677 ! !
  6682 ! !