ProjectDefinition.st
changeset 15760 5c670f6b5d7f
parent 15603 7da6f15bd81c
child 15761 36c017b9fe58
equal deleted inserted replaced
15759:3d3ab3a446e5 15760:5c670f6b5d7f
   712       stx_libbasic projectIsLoaded
   712       stx_libbasic projectIsLoaded
   713       (ProjectDefinition definitionClassForPackage:#'stx:libbasic') projectIsLoaded
   713       (ProjectDefinition definitionClassForPackage:#'stx:libbasic') projectIsLoaded
   714     "
   714     "
   715 !
   715 !
   716 
   716 
   717 projectIsLoaded:something
   717 projectIsLoaded:aBoolean
   718     projectIsLoaded := something.
   718     projectIsLoaded := aBoolean.
   719     something ifTrue:[
   719     aBoolean ifTrue:[
   720         "register myself as dependent - I want to get notified on method changes"
   720         "register myself as dependent - I want to get notified on method changes"
   721         self class addDependent:self.
   721         self class addDependent:self.
       
   722         self postLoadAction.
       
   723         self executeHooks: #postLoad.
   722     ].
   724     ].
   723 !
   725 !
   724 
   726 
   725 topRelativePathTo:aBaseFilename inPackage:aPackageID architecture:arch
   727 topRelativePathTo:aBaseFilename inPackage:aPackageID architecture:arch
   726     "Returns the path to stx counting the number of $/ and $: in the package name
   728     "Returns the path to stx counting the number of $/ and $: in the package name
   835      self unixPathToTopFor: #'stx:goodies/foo'
   837      self unixPathToTopFor: #'stx:goodies/foo'
   836     "
   838     "
   837 
   839 
   838     "Created: / 14-09-2006 / 14:59:53 / cg"
   840     "Created: / 14-09-2006 / 14:59:53 / cg"
   839 ! !
   841 ! !
   840 
       
   841 
   842 
   842 !ProjectDefinition class methodsFor:'accessing - packaging'!
   843 !ProjectDefinition class methodsFor:'accessing - packaging'!
   843 
   844 
   844 classNames:aCollectionOfClassNames
   845 classNames:aCollectionOfClassNames
   845     "set the set of classes"
   846     "set the set of classes"
  1165     "Modified: / 18-08-2011 / 13:48:31 / cg"
  1166     "Modified: / 18-08-2011 / 13:48:31 / cg"
  1166 !
  1167 !
  1167 
  1168 
  1168 initializeAllProjectDefinitions
  1169 initializeAllProjectDefinitions
  1169     "needs everything else (especially the compiler etc.) to be initialized.
  1170     "needs everything else (especially the compiler etc.) to be initialized.
  1170      Therefore, its not invoked by #initialize, but instead explicitely,
  1171      Therefore, it's not invoked by #initialize, but instead explicitely,
  1171      by Smalltalk"
  1172      by Smalltalk"
  1172 
  1173 
  1173     |isStandAloneApp|
  1174     |isStandAloneApp|
  1174 
  1175 
  1175     isStandAloneApp := Smalltalk isStandAloneApp.
  1176     isStandAloneApp := Smalltalk isStandAloneApp.
  2545 
  2546 
  2546     ^ '-warnNonStandard'
  2547     ^ '-warnNonStandard'
  2547 
  2548 
  2548     "Created: / 18-08-2006 / 12:51:38 / cg"
  2549     "Created: / 18-08-2006 / 12:51:38 / cg"
  2549 ! !
  2550 ! !
  2550 
       
  2551 
  2551 
  2552 !ProjectDefinition class methodsFor:'description - project information'!
  2552 !ProjectDefinition class methodsFor:'description - project information'!
  2553 
  2553 
  2554 applicationAdditionalIconFileNames
  2554 applicationAdditionalIconFileNames
  2555     "Return the icon-filenames for additional icons of the application
  2555     "Return the icon-filenames for additional icons of the application
  5021         ].
  5021         ].
  5022         self activityNotification:('Executing post-load action for %1' bindWith:self package).
  5022         self activityNotification:('Executing post-load action for %1' bindWith:self package).
  5023 
  5023 
  5024         "/ mhmh - already done for dll-loaded packages
  5024         "/ mhmh - already done for dll-loaded packages
  5025         "/ meOrMySecondIncarnation initializeAllClasses.
  5025         "/ meOrMySecondIncarnation initializeAllClasses.
  5026         meOrMySecondIncarnation postLoadAction.
       
  5027         meOrMySecondIncarnation executeHooks: #postLoad.
       
  5028 
  5026 
  5029         meOrMySecondIncarnation projectIsLoaded:true.
  5027         meOrMySecondIncarnation projectIsLoaded:true.
  5030         meOrMySecondIncarnation ~~ self ifTrue:[
  5028         meOrMySecondIncarnation ~~ self ifTrue:[
  5031             self projectIsLoaded:true.
  5029             self projectIsLoaded:true.
  5032         ].
  5030         ].
  5863     "
  5861     "
  5864      stx_libjavascript checkPrerequisitesForLoading
  5862      stx_libjavascript checkPrerequisitesForLoading
  5865     "
  5863     "
  5866 !
  5864 !
  5867 
  5865 
  5868 executeHooks: hook
  5866 executeHooks: hookSymbol
  5869     "Execute all hooks annotate by given symbol. Currently supported
  5867     "Execute all hooks annotated by the given hook-symbol. 
  5870      hooks are: #preLoad, #postLoad, #preUnload."
  5868      Currently supported hooks are: #preLoad, #postLoad, #preUnload."
  5871 
  5869 
  5872     | cls |
  5870     | cls |
  5873 
  5871 
  5874     cls := self.
  5872     cls := self.
  5875 
  5873 
  5876     [ cls notNil ] whileTrue:[
  5874     [ cls notNil ] whileTrue:[
  5877         cls class selectorsAndMethodsDo:[:selector :method|
  5875         cls class selectorsAndMethodsDo:[:selector :method|
  5878             (method annotationAt: hook) notNil ifTrue:[
  5876             (method annotationAt: hookSymbol) notNil ifTrue:[
  5879                 method numArgs == 0 ifTrue:[
  5877                 method numArgs == 0 ifTrue:[
  5880                     self perform: selector
  5878                     self perform: selector
  5881                 ] ifFalse:[
  5879                 ] ifFalse:[
  5882                     self error:'Hook for %1 must have no arguments' mayProceed: true.
  5880                     self error:'Hook for %1 may not have arguments' mayProceed: true.
  5883                 ]
  5881                 ]
  5884             ]
  5882             ]
  5885         ].
  5883         ].
  5886         cls := cls superclass.
  5884         cls := cls superclass.
  5887     ].
  5885     ].
  7465 ! !
  7463 ! !
  7466 
  7464 
  7467 !ProjectDefinition class methodsFor:'documentation'!
  7465 !ProjectDefinition class methodsFor:'documentation'!
  7468 
  7466 
  7469 version
  7467 version
  7470     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.482 2013-08-07 09:53:31 stefan Exp $'
  7468     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.483 2013-09-17 16:02:01 cg Exp $'
  7471 !
  7469 !
  7472 
  7470 
  7473 version_CVS
  7471 version_CVS
  7474     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.482 2013-08-07 09:53:31 stefan Exp $'
  7472     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.483 2013-09-17 16:02:01 cg Exp $'
  7475 !
  7473 !
  7476 
  7474 
  7477 version_SVN
  7475 version_SVN
  7478     ^ '$ Id: ProjectDefinition.st 10645 2011-06-09 15:28:45Z vranyj1  $'
  7476     ^ '$ Id: ProjectDefinition.st 10645 2011-06-09 15:28:45Z vranyj1  $'
  7479 ! !
  7477 ! !