--- a/ProjectDefinition.st Tue Sep 19 17:24:10 2006 +0200
+++ b/ProjectDefinition.st Tue Sep 19 17:24:42 2006 +0200
@@ -2719,20 +2719,34 @@
s nextPutLine:' ^ #('.
s tab; nextPutLine:'"/ <className> or (<className> attributes...)'.
self searchForClasses do:[:eachClass |
- |attributes oldSpecEntry|
+ |oldSpec attributes oldSpecEntry|
+
+ oldSpec := self classNamesAndAttributes.
(eachClass isLoaded not or:[eachClass isPrivate not]) ifTrue:[
- ignoreOldDefinition ifFalse:[
- oldSpecEntry := self classNamesAndAttributes detect:[:entry | entry first = eachClass name] ifNone:nil.
- ].
- oldSpecEntry isNil ifTrue:[
+ oldSpecEntry := oldSpec detect:[:entry | entry first = eachClass name] ifNone:nil.
+ ignoreOldDefinition ifTrue:[
+ "/ take autoload attribute from current state
+ oldSpecEntry notNil ifTrue:[
+ attributes := oldSpecEntry copyFrom:2.
+ attributes := attributes copyWithout:#autoload.
+ ] ifFalse:[
+ attributes := #()
+ ].
eachClass isLoaded ifFalse:[
- attributes := #( autoload ).
+ attributes isEmpty ifTrue:[
+ attributes := attributes , #( autoload ).
+ ]
].
] ifFalse:[
- attributes := oldSpecEntry copyFrom:2.
+ "/ keep any existing attribute
+ oldSpecEntry notNil ifTrue:[
+ attributes := oldSpecEntry copyFrom:2.
+ ] ifFalse:[
+ attributes := eachClass isLoaded ifTrue:[ #() ] ifFalse:[ #( autoload ) ].
+ ].
].
-
+
s tab.
attributes isEmptyOrNil ifTrue:[
s nextPutAll:eachClass name asString storeString.
@@ -2753,7 +2767,7 @@
"Modified: / 08-08-2006 / 19:24:34 / fm"
"Created: / 17-08-2006 / 21:03:07 / cg"
- "Modified: / 14-09-2006 / 10:52:40 / cg"
+ "Modified: / 19-09-2006 / 17:14:17 / cg"
!
companyName_code
@@ -2913,7 +2927,7 @@
!ProjectDefinition class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.68 2006-09-16 17:02:19 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.69 2006-09-19 15:24:42 cg Exp $'
! !
ProjectDefinition initialize!