ProjectBrowser.st
changeset 1254 ca6590dae738
parent 1253 9b66c237df0a
child 1255 d5616023622e
--- a/ProjectBrowser.st	Sat Oct 09 12:01:56 1999 +0200
+++ b/ProjectBrowser.st	Sat Oct 09 13:35:49 1999 +0200
@@ -3445,6 +3445,8 @@
 !ProjectBrowser methodsFor:'change & update'!
 
 update:something with:aParameter from:changedObject
+    |cls sel oldMthd newMthd prj package|
+
     something == #name ifTrue:[
         "/ a project was renamed - update my tree
         self projectTree children do:[:pNode |
@@ -3456,16 +3458,64 @@
         ^ self.
     ].
 
-    changedObject == self currentProject ifTrue:[
+    prj := self currentProject.
+    prj isNil ifTrue:[^ self].
+
+    package := prj package.
+
+    changedObject == prj ifTrue:[
         self readAspectsFromProject.
     ].
 
+    changedObject == Smalltalk ifTrue:[
+        something == #newClass ifTrue:[
+            aParameter isBehavior ifTrue:[
+                aParameter wasAutoloaded ifTrue:[
+                    self listOfAllClassesInPrerequisites add:something name.
+                    ^ self.
+                ].
+                aParameter package = package ifTrue:[
+                    self halt.
+                ]
+            ]
+        ].
+
+        something == #methodInClass ifTrue:[
+            cls := aParameter first.
+            sel := aParameter second.
+            oldMthd := aParameter third.
+            newMthd := cls compiledMethodAt:sel.
+
+            cls package ~= package ifTrue:[
+                "/ method removed from project ?
+                (oldMthd notNil and:[oldMthd package = package]) ifTrue:[
+                    (newMthd notNil and:[newMthd package ~= package]) ifTrue:[
+                        "/ remove from methodList
+                    ]
+                ].
+
+                "/ method added to project ?
+                (oldMthd isNil or:[oldMthd package ~= package]) ifTrue:[
+                    (newMthd notNil and:[newMthd package = package]) ifTrue:[
+                        "/ add to methodList
+                    ]
+                ]
+            ]
+        ].
+    ].
+
     "Modified: / 26.4.1999 / 23:39:04 / cg"
 ! !
 
 !ProjectBrowser methodsFor:'initialization'!
 
+closeDownViews
+    Smalltalk removeDependent:self.
+    super closeDownViews.
+!
+
 postBuildWith:aBuiler
+    Smalltalk addDependent:self.
     self modifiedChannel value:false.
 
     self updateRightCanvas.