3443 ! ! |
3443 ! ! |
3444 |
3444 |
3445 !ProjectBrowser methodsFor:'change & update'! |
3445 !ProjectBrowser methodsFor:'change & update'! |
3446 |
3446 |
3447 update:something with:aParameter from:changedObject |
3447 update:something with:aParameter from:changedObject |
|
3448 |cls sel oldMthd newMthd prj package| |
|
3449 |
3448 something == #name ifTrue:[ |
3450 something == #name ifTrue:[ |
3449 "/ a project was renamed - update my tree |
3451 "/ a project was renamed - update my tree |
3450 self projectTree children do:[:pNode | |
3452 self projectTree children do:[:pNode | |
3451 pNode contents == changedObject ifTrue:[ |
3453 pNode contents == changedObject ifTrue:[ |
3452 pNode name:changedObject name. |
3454 pNode name:changedObject name. |
3454 ] |
3456 ] |
3455 ]. |
3457 ]. |
3456 ^ self. |
3458 ^ self. |
3457 ]. |
3459 ]. |
3458 |
3460 |
3459 changedObject == self currentProject ifTrue:[ |
3461 prj := self currentProject. |
|
3462 prj isNil ifTrue:[^ self]. |
|
3463 |
|
3464 package := prj package. |
|
3465 |
|
3466 changedObject == prj ifTrue:[ |
3460 self readAspectsFromProject. |
3467 self readAspectsFromProject. |
|
3468 ]. |
|
3469 |
|
3470 changedObject == Smalltalk ifTrue:[ |
|
3471 something == #newClass ifTrue:[ |
|
3472 aParameter isBehavior ifTrue:[ |
|
3473 aParameter wasAutoloaded ifTrue:[ |
|
3474 self listOfAllClassesInPrerequisites add:something name. |
|
3475 ^ self. |
|
3476 ]. |
|
3477 aParameter package = package ifTrue:[ |
|
3478 self halt. |
|
3479 ] |
|
3480 ] |
|
3481 ]. |
|
3482 |
|
3483 something == #methodInClass ifTrue:[ |
|
3484 cls := aParameter first. |
|
3485 sel := aParameter second. |
|
3486 oldMthd := aParameter third. |
|
3487 newMthd := cls compiledMethodAt:sel. |
|
3488 |
|
3489 cls package ~= package ifTrue:[ |
|
3490 "/ method removed from project ? |
|
3491 (oldMthd notNil and:[oldMthd package = package]) ifTrue:[ |
|
3492 (newMthd notNil and:[newMthd package ~= package]) ifTrue:[ |
|
3493 "/ remove from methodList |
|
3494 ] |
|
3495 ]. |
|
3496 |
|
3497 "/ method added to project ? |
|
3498 (oldMthd isNil or:[oldMthd package ~= package]) ifTrue:[ |
|
3499 (newMthd notNil and:[newMthd package = package]) ifTrue:[ |
|
3500 "/ add to methodList |
|
3501 ] |
|
3502 ] |
|
3503 ] |
|
3504 ]. |
3461 ]. |
3505 ]. |
3462 |
3506 |
3463 "Modified: / 26.4.1999 / 23:39:04 / cg" |
3507 "Modified: / 26.4.1999 / 23:39:04 / cg" |
3464 ! ! |
3508 ! ! |
3465 |
3509 |
3466 !ProjectBrowser methodsFor:'initialization'! |
3510 !ProjectBrowser methodsFor:'initialization'! |
3467 |
3511 |
|
3512 closeDownViews |
|
3513 Smalltalk removeDependent:self. |
|
3514 super closeDownViews. |
|
3515 ! |
|
3516 |
3468 postBuildWith:aBuiler |
3517 postBuildWith:aBuiler |
|
3518 Smalltalk addDependent:self. |
3469 self modifiedChannel value:false. |
3519 self modifiedChannel value:false. |
3470 |
3520 |
3471 self updateRightCanvas. |
3521 self updateRightCanvas. |
3472 ^ super postBuildWith:aBuiler |
3522 ^ super postBuildWith:aBuiler |
3473 ! |
3523 ! |