--- a/ProjectDefinition.st Sun Jul 03 17:07:10 2011 +0200
+++ b/ProjectDefinition.st Sun Jul 03 21:52:47 2011 +0200
@@ -3478,7 +3478,7 @@
classNamesByCategory
"answer a dictionary
- category -> classNames topological sorted"
+ category -> classNames topological sorted"
|pivateClassesOf sorter classes classNames mapping|
@@ -3489,54 +3489,57 @@
classes do:[:each | pivateClassesOf at:each put:(each allPrivateClasses)].
sorter := [:a :b |
- "/ a must come before b iff:
- "/ b is a subclass of a
- "/ b has a private class which is a subclass of a
- "/ a is a sharedPool, used by b
-
- |mustComeBefore pivateClassesOfB|
-
- mustComeBefore := false.
- mustComeBefore := (a isSharedPool and:[(b sharedPoolNames includes: a name)]).
- mustComeBefore := mustComeBefore or:[b isSubclassOf:a].
- mustComeBefore ifFalse:[
- pivateClassesOfB := pivateClassesOf at:b ifAbsent:[ #() ].
- pivateClassesOfB do:[:eachClassInB |
- mustComeBefore := mustComeBefore or:[eachClassInB isSubclassOf:a]
- ].
- ].
- mustComeBefore
+ "/ a must come before b iff:
+ "/ b is a subclass of a
+ "/ b has a private class which is a subclass of a
+ "/ a is a sharedPool, used by b
+
+ |mustComeBefore pivateClassesOfB|
+
+ mustComeBefore := false.
+ mustComeBefore := (a isSharedPool and:[(b sharedPoolNames includes: a name)]).
+ mustComeBefore := mustComeBefore or:[b isSubclassOf:a].
+ mustComeBefore ifFalse:[
+ pivateClassesOfB := pivateClassesOf at:b ifAbsent:[ #() ].
+ pivateClassesOfB do:[:eachClassInB |
+ mustComeBefore := mustComeBefore or:[eachClassInB isSubclassOf:a]
+ ].
+ ].
+ mustComeBefore
].
classes topologicalSort:sorter.
OperatingSystem knownPlatformNames do:[:platformID |
- |prefix depClasses depClassNames|
-
- prefix := platformID asUppercase.
- depClasses := self compiled_classesForArchitecture:platformID.
- depClasses notEmpty ifTrue:[
- (depClasses includes:nil) ifTrue:[
- (Dialog confirm:'Dependencies are not in order (some classes are not present).\\Continue anyway ?' withCRs)
- ifFalse:[
- AbortOperationRequest raise.
- ].
- depClassNames := self compiled_classNamesForPlatform:platformID.
- ] ifFalse:[
- depClasses topologicalSort:sorter.
- depClassNames := depClasses collect:[:eachClass| eachClass name].
- ].
- mapping at:prefix put:depClassNames.
- ].
-
- classNames := classes collect:[:eachClass| eachClass name].
- self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr |
- (attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[
- classNames add:nm.
- ].
- ].
-
- mapping at:'COMMON' put:classNames.
+ |prefix depClasses depClassNames|
+
+ prefix := platformID asUppercase.
+ depClasses := self compiled_classesForArchitecture:platformID.
+ depClasses notEmpty ifTrue:[
+ (self compiled_classNamesForPlatform:platformID)
+ select:[:nm | (Smalltalk at:nm ifAbsent:nil) isNil]
+ thenDo:[:nm | Transcript showCR:nm].
+ (depClasses includes:nil) ifTrue:[
+ (Dialog confirm:'Dependencies are not in correct (some classes are not present).\\Continue anyway ?' withCRs)
+ ifFalse:[
+ AbortOperationRequest raise.
+ ].
+ depClassNames := self compiled_classNamesForPlatform:platformID.
+ ] ifFalse:[
+ depClasses topologicalSort:sorter.
+ depClassNames := depClasses collect:[:eachClass| eachClass name].
+ ].
+ mapping at:prefix put:depClassNames.
+ ].
+
+ classNames := classes collect:[:eachClass| eachClass name].
+ self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr |
+ (attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[
+ classNames add:nm.
+ ].
+ ].
+
+ mapping at:'COMMON' put:classNames.
].
^ mapping
@@ -3547,7 +3550,7 @@
"
"Created: / 09-08-2006 / 11:24:39 / fm"
- "Modified: / 18-01-2011 / 17:58:29 / cg"
+ "Modified: / 03-07-2011 / 21:51:36 / cg"
!
commonSymbolsFlag
@@ -6384,11 +6387,11 @@
!ProjectDefinition class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.338 2011-06-28 13:54:21 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.339 2011-07-03 19:52:47 cg Exp $'
!
version_SVN
- ^ ' Id: ProjectDefinition.st 10645 2011-06-09 15:28:45Z vranyj1 '
+ ^ '§ Id: ProjectDefinition.st 10645 2011-06-09 15:28:45Z vranyj1 §'
! !
ProjectDefinition initialize!