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 |