ProjectDefinition.st
branchjv
changeset 17866 abe5bdd75639
parent 17864 e6010e48defb
child 17869 9610c6c94e71
equal deleted inserted replaced
17865:598963c6ff8e 17866:abe5bdd75639
  1319     oldSpec := self classNamesAndAttributesAsSpecArray.
  1319     oldSpec := self classNamesAndAttributesAsSpecArray.
  1320     ignored := self ignoredClassNames asSet.
  1320     ignored := self ignoredClassNames asSet.
  1321     newSpec := OrderedCollection new.
  1321     newSpec := OrderedCollection new.
  1322 
  1322 
  1323     ignoreOldEntries ifFalse:[
  1323     ignoreOldEntries ifFalse:[
  1324 	oldSpec do:[:oldEntry |
  1324         oldSpec do:[:oldEntry |
  1325 	    |newEntry className cls |
  1325             |newEntry className cls |
  1326 
  1326 
  1327 	    newEntry := oldEntry copy.
  1327             newEntry := oldEntry copy.
  1328 	    className := newEntry first.
  1328             className := newEntry first.
  1329 
  1329 
  1330 	    (ignored includes:className) ifFalse:[
  1330             (ignored includes:className) ifFalse:[
  1331 		cls := Smalltalk classNamed:className.
  1331                 cls := Smalltalk classNamed:className.
  1332 		ignoreOldDefinition ifTrue:[
  1332                 ignoreOldDefinition ifTrue:[
  1333 		    (cls notNil and:[cls isLoaded not]) ifTrue:[
  1333                     (cls notNil and:[cls isLoaded not]) ifTrue:[
  1334 			(newEntry includes:#autoload) ifFalse:[
  1334                         (newEntry includes:#autoload) ifFalse:[
  1335 			    newEntry := newEntry copyWith:#autoload.
  1335                             newEntry := newEntry copyWith:#autoload.
  1336 			].
  1336                         ].
  1337 		    ].
  1337                     ].
  1338 		].
  1338                 ].
  1339 		cls notNil ifTrue:[
  1339                 cls notNil ifTrue:[
  1340 		    "JV @ 2010-06-19
  1340                     "JV @ 2010-06-19
  1341 		     Force merge default class attributes with existing ones"
  1341                      Force merge default class attributes with existing ones"
  1342 		    newEntry := self mergeDefaultClassAttributesFor: cls with: newEntry.
  1342                     newEntry := self mergeDefaultClassAttributesFor: cls with: newEntry.
  1343 		    newSpec add:newEntry.
  1343                 ].
  1344 		]
  1344                 newSpec add:newEntry.
  1345 	    ].
  1345             ].
  1346 	].
  1346         ].
  1347     ].
  1347     ].
  1348 
  1348 
  1349     self searchForClasses do:[:eachClass |
  1349     self searchForClasses do:[:eachClass |
  1350 	|className attributes oldSpecEntry oldAttributes newEntry|
  1350         |className attributes oldSpecEntry oldAttributes newEntry|
  1351 
  1351 
  1352 	className := eachClass name.
  1352         className := eachClass name.
  1353 	(ignored includes:className) ifFalse:[
  1353         (ignored includes:className) ifFalse:[
  1354 	    oldSpecEntry := oldSpec detect:[:entry | entry first = className] ifNone:nil.
  1354             oldSpecEntry := oldSpec detect:[:entry | entry first = className] ifNone:nil.
  1355 
  1355 
  1356 	    (ignoreOldEntries or:[ oldSpecEntry isNil]) ifTrue:[
  1356             (ignoreOldEntries or:[ oldSpecEntry isNil]) ifTrue:[
  1357 		(eachClass isLoaded not or:[eachClass isPrivate not]) ifTrue:[
  1357                 (eachClass isLoaded not or:[eachClass isPrivate not]) ifTrue:[
  1358 		    (self additionalClassNamesAndAttributes includes:className) ifFalse:[
  1358                     (self additionalClassNamesAndAttributes includes:className) ifFalse:[
  1359 			(oldSpecEntry size > 1) ifTrue:[
  1359                         (oldSpecEntry size > 1) ifTrue:[
  1360 			    oldAttributes := oldSpecEntry copyFrom:2.
  1360                             oldAttributes := oldSpecEntry copyFrom:2.
  1361 			].
  1361                         ].
  1362 
  1362 
  1363 			ignoreOldDefinition ifTrue:[
  1363                         ignoreOldDefinition ifTrue:[
  1364 			    "take autoload attribute from classes state in the image"
  1364                             "take autoload attribute from classes state in the image"
  1365 			    oldAttributes notNil ifTrue:[
  1365                             oldAttributes notNil ifTrue:[
  1366 				attributes := oldAttributes copyWithout:#autoload.
  1366                                 attributes := oldAttributes copyWithout:#autoload.
  1367 			    ] ifFalse:[
  1367                             ] ifFalse:[
  1368 				attributes := #()
  1368                                 attributes := #()
  1369 			    ].
  1369                             ].
  1370 			    eachClass isLoaded ifFalse:[
  1370                             eachClass isLoaded ifFalse:[
  1371 				attributes := attributes copyWith:#autoload.
  1371                                 attributes := attributes copyWith:#autoload.
  1372 			    ].
  1372                             ].
  1373 			] ifFalse:[
  1373                         ] ifFalse:[
  1374 			    "keep any existing attribute"
  1374                             "keep any existing attribute"
  1375 			    oldAttributes notNil ifTrue:[
  1375                             oldAttributes notNil ifTrue:[
  1376 				attributes := oldAttributes.
  1376                                 attributes := oldAttributes.
  1377 			    ] ifFalse:[
  1377                             ] ifFalse:[
  1378 				attributes := eachClass isLoaded ifTrue:[ #() ] ifFalse:[ #(autoload) ].
  1378                                 attributes := eachClass isLoaded ifTrue:[ #() ] ifFalse:[ #(autoload) ].
  1379 			    ].
  1379                             ].
  1380 			].
  1380                         ].
  1381 			"JV @ 2010-06-19
  1381                         "JV @ 2010-06-19
  1382 			 Support fo additional class attributes and programming language attribute"
  1382                          Support fo additional class attributes and programming language attribute"
  1383 			attributes := self mergeDefaultClassAttributesFor: eachClass with: attributes.
  1383                         attributes := self mergeDefaultClassAttributesFor: eachClass with: attributes.
  1384 
  1384 
  1385 			newEntry := Array with:className.
  1385                         newEntry := Array with:className.
  1386 			attributes notEmptyOrNil ifTrue:[
  1386                         attributes notEmptyOrNil ifTrue:[
  1387 			    newEntry := newEntry , attributes.
  1387                             newEntry := newEntry , attributes.
  1388 			].
  1388                         ].
  1389 			newSpec add:newEntry
  1389                         newSpec add:newEntry
  1390 		    ]
  1390                     ]
  1391 		]
  1391                 ]
  1392 	    ]
  1392             ]
  1393 	]
  1393         ]
  1394     ].
  1394     ].
  1395     ^ self classNamesAndAttributes_codeFor:newSpec
  1395     ^ self classNamesAndAttributes_codeFor:newSpec
  1396 
  1396 
  1397     "
  1397     "
  1398      stx_libbasic3 classNamesAndAttributes_code_ignoreOldEntries:false ignoreOldDefinition:true
  1398      stx_libbasic3 classNamesAndAttributes_code_ignoreOldEntries:false ignoreOldDefinition:true
  1399      exept_expecco classNamesAndAttributes_code_ignoreOldEntries:false ignoreOldDefinition:true
  1399      exept_expecco classNamesAndAttributes_code_ignoreOldEntries:false ignoreOldDefinition:true
  1400     "
  1400     "
  1401 
  1401 
  1402     "Modified: / 08-08-2006 / 19:24:34 / fm"
  1402     "Modified: / 08-08-2006 / 19:24:34 / fm"
  1403     "Created: / 10-10-2006 / 22:00:50 / cg"
  1403     "Created: / 10-10-2006 / 22:00:50 / cg"
  1404     "Modified: / 19-06-2010 / 10:56:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
  1405     "Modified: / 06-09-2011 / 07:48:52 / cg"
  1404     "Modified: / 06-09-2011 / 07:48:52 / cg"
       
  1405     "Modified: / 29-09-2011 / 12:58:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1406 !
  1406 !
  1407 
  1407 
  1408 companyName_code
  1408 companyName_code
  1409     ^ self companyName_codeFor:self companyName
  1409     ^ self companyName_codeFor:self companyName
  1410 
  1410 
  6479      squeak_vmMaker validateDescription
  6479      squeak_vmMaker validateDescription
  6480     "
  6480     "
  6481     
  6481     
  6482     "Modified: / 27-09-2011 / 18:20:36 / cg"
  6482     "Modified: / 27-09-2011 / 18:20:36 / cg"
  6483 
  6483 
  6484 ! 
  6484 !
       
  6485 
  6485 validateDescription_extensions
  6486 validateDescription_extensions
  6486 
  6487 
  6487     "
  6488     "
  6488     For every extension method, check:
  6489     For every extension method, check:
  6489         a) whether its class package is in package prerequisites
  6490         a) whether its class package is in package prerequisites
  6543     "
  6544     "
  6544 
  6545 
  6545     "Created: / 11-08-2011 / 18:51:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  6546     "Created: / 11-08-2011 / 18:51:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  6546 ! !
  6547 ! !
  6547 
  6548 
  6548 
       
  6549 !ProjectDefinition class methodsFor:'testing'!
  6549 !ProjectDefinition class methodsFor:'testing'!
  6550 
  6550 
  6551 isApplicationDefinition
  6551 isApplicationDefinition
  6552     ^ false
  6552     ^ false
  6553 
  6553 
  6613 ! !
  6613 ! !
  6614 
  6614 
  6615 !ProjectDefinition class methodsFor:'documentation'!
  6615 !ProjectDefinition class methodsFor:'documentation'!
  6616 
  6616 
  6617 version
  6617 version
  6618     ^ '$Id: ProjectDefinition.st 10694 2011-09-28 12:46:37Z vranyj1 $'
  6618     ^ '$Id: ProjectDefinition.st 10697 2011-09-29 11:59:43Z vranyj1 $'
  6619 !
  6619 !
  6620 
  6620 
  6621 version_CVS
  6621 version_CVS
  6622     ^ 'Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.363 2011/09/27 17:36:32 cg Exp '
  6622     ^ '§Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.363 2011/09/27 17:36:32 cg Exp §'
  6623 !
  6623 !
  6624 
  6624 
  6625 version_SVN
  6625 version_SVN
  6626     ^ '$Id: ProjectDefinition.st 10694 2011-09-28 12:46:37Z vranyj1 $'
  6626     ^ '$Id: ProjectDefinition.st 10697 2011-09-29 11:59:43Z vranyj1 $'
  6627 ! !
  6627 ! !
  6628 
  6628 
  6629 ProjectDefinition initialize!
  6629 ProjectDefinition initialize!
  6630 
       
  6631 
       
  6632