Project.st
changeset 5327 5e5602d156fa
parent 5314 8a4b8d5726a5
child 5328 319b8e3ee60e
equal deleted inserted replaced
5326:8950253bef78 5327:5e5602d156fa
  3347             Smalltalk 
  3347             Smalltalk 
  3348                 allClassesDo:[:aClass |
  3348                 allClassesDo:[:aClass |
  3349                     (true "aClass owningClass isNil"
  3349                     (true "aClass owningClass isNil"
  3350                     and:[aClass isMeta not
  3350                     and:[aClass isMeta not
  3351                     and:[aClass package = packageName
  3351                     and:[aClass package = packageName
  3352                     and:[aClass isNamespace not or:[aClass == Smalltalk]]]]) ifTrue:[
  3352                     and:[aClass isNameSpace not or:[aClass == Smalltalk]]]]) ifTrue:[
  3353                         classes add:aClass
  3353                         classes add:aClass
  3354                     ]
  3354                     ]
  3355                 ].
  3355                 ].
  3356         ].
  3356         ].
  3357     ].
  3357     ].
  3556      This excludes any methods which are already in my class-set."
  3556      This excludes any methods which are already in my class-set."
  3557 
  3557 
  3558     |methods methodsInfo|
  3558     |methods methodsInfo|
  3559 
  3559 
  3560     properties notNil ifTrue:[
  3560     properties notNil ifTrue:[
  3561 	methodsInfo := properties at:#methodsInfo ifAbsent:nil.
  3561         methodsInfo := properties at:#methodsInfo ifAbsent:nil.
  3562 	methodsInfo notNil ifTrue:[
  3562         methodsInfo notNil ifTrue:[
  3563 	    methods := methodsInfo collect:[:i | i className]
  3563             methods := methodsInfo collect:[:i | i className]
  3564 	] ifFalse:[
  3564         ] ifFalse:[
  3565 	    methods := properties at:#methods ifAbsent:nil
  3565             methods := properties at:#methods ifAbsent:nil
  3566 	]
  3566         ]
  3567     ].
  3567     ].
  3568 
  3568 
  3569     methods isNil ifTrue:[
  3569     methods isNil ifTrue:[
  3570 	methods := OrderedCollection new.
  3570         methods := OrderedCollection new.
  3571 	Smalltalk allClassesDo:[:aClass |
  3571         Smalltalk allClassesDo:[:aClass |
  3572 	    (true "aClass owningClass isNil"
  3572             (true "aClass owningClass isNil"
  3573 	    and:[aClass isMeta not
  3573             and:[aClass isMeta not
  3574 	    and:[aClass package ~= packageName
  3574             and:[aClass package ~= packageName
  3575 	    and:[aClass isNamespace not or:[aClass == Smalltalk]]]]) ifTrue:[
  3575             and:[aClass isNameSpace not or:[aClass == Smalltalk]]]]) ifTrue:[
  3576 	    
  3576             
  3577 		aClass methodDictionary keysAndValuesDo:[:sel :mthd |
  3577                 aClass methodDictionary keysAndValuesDo:[:sel :mthd |
  3578 		    mthd package = packageName ifTrue:[
  3578                     mthd package = packageName ifTrue:[
  3579 			methods add:(MethodInfo new
  3579                         methods add:(MethodInfo new
  3580 					className:aClass name;
  3580                                         className:aClass name;
  3581 					methodName:sel;
  3581                                         methodName:sel;
  3582 					yourself)
  3582                                         yourself)
  3583 		    ].
  3583                     ].
  3584 		].
  3584                 ].
  3585 		aClass class methodDictionary keysAndValuesDo:[:sel :mthd |
  3585                 aClass class methodDictionary keysAndValuesDo:[:sel :mthd |
  3586 		    mthd package = packageName ifTrue:[
  3586                     mthd package = packageName ifTrue:[
  3587 			methods add:(MethodInfo new
  3587                         methods add:(MethodInfo new
  3588 					className:(aClass name , ' class');
  3588                                         className:(aClass name , ' class');
  3589 					methodName:sel;
  3589                                         methodName:sel;
  3590 					yourself)
  3590                                         yourself)
  3591 		    ].
  3591                     ].
  3592 		]
  3592                 ]
  3593 	    ]
  3593             ]
  3594 	].
  3594         ].
  3595 	methods isEmpty ifTrue:[^ #()].
  3595         methods isEmpty ifTrue:[^ #()].
  3596     ].
  3596     ].
  3597     ^ methods
  3597     ^ methods
  3598 
  3598 
  3599     "Modified: 4.1.1997 / 16:51:18 / cg"
  3599     "Modified: 4.1.1997 / 16:51:18 / cg"
  3600 ! !
  3600 ! !
  3815 ! !
  3815 ! !
  3816 
  3816 
  3817 !Project class methodsFor:'documentation'!
  3817 !Project class methodsFor:'documentation'!
  3818 
  3818 
  3819 version
  3819 version
  3820     ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.152 2000-03-21 19:49:47 cg Exp $'
  3820     ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.153 2000-03-24 16:43:57 cg Exp $'
  3821 ! !
  3821 ! !
  3822 Project initialize!
  3822 Project initialize!