ProjectBrowser.st
changeset 1109 df7d7c6611b6
parent 1108 e88edf4a8cbe
child 1114 7fd86e9a6a11
--- a/ProjectBrowser.st	Fri Apr 16 21:28:32 1999 +0200
+++ b/ProjectBrowser.st	Sat Apr 17 01:55:48 1999 +0200
@@ -6,7 +6,7 @@
 !
 
 TreeItemWithImage subclass:#ProjectTreeItem
-	instanceVariableNames:'action spec'
+	instanceVariableNames:'action spec info'
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:ProjectBrowser
@@ -133,6 +133,18 @@
 
 !
 
+prerequisiteClassesIcon
+    <resource: #programImage>
+
+    ^ self classesIcon
+!
+
+prerequisiteProjectsIcon
+    <resource: #programImage>
+
+    ^ self projectsIcon
+!
+
 prerequisitesIcon
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
@@ -152,7 +164,25 @@
         ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@A8@D(@RPA80@C@^@=HRT/)^D$@C7#@RLAI@G(@@@@b') ; yourself); yourself]
 
     "Modified: / 23.3.1999 / 14:28:11 / cg"
-! !
+!
+
+projectsIcon
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self projectsIcon inspect
+     ImageEditor openOnClass:self andSelector:#projectsIcon
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:#'ProjectBrowser projectsIcon'
+        ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@"H"H"@@@@@"H"H"@ @@@"H"H"@"@@@@@@@@@"H@@BH"H"HBH @@H"H"H H"@@@"H"H"@"H@@BH"H"HBH @@H"H"H H @@@"H"H"@ @@@BH"H"H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 132 255 128 128]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@G? ?>G?8??''?>_?9??''?>_?9??G?8_?A?8@@@@@@b') ; yourself); yourself]! !
 
 !ProjectBrowser class methodsFor:'interface specs'!
 
@@ -531,7 +561,7 @@
       )
 !
 
-rightCanvasSpecForPrerequisites
+rightCanvasSpecForPrerequisiteClasses
     "This resource specification was automatically generated
      by the UIPainter of ST/X."
 
@@ -539,24 +569,170 @@
      the UIPainter may not be able to read the specification."
 
     "
-     UIPainter new openOnClass:ProjectBrowser andSelector:#rightCanvasSpecForPrerequisites
-     ProjectBrowser new openInterface:#rightCanvasSpecForPrerequisites
+     UIPainter new openOnClass:ProjectBrowser andSelector:#rightCanvasSpecForPrerequisiteClasses
+     ProjectBrowser new openInterface:#rightCanvasSpecForPrerequisiteClasses
     "
 
     <resource: #canvas>
 
     ^ 
      #(#FullSpec
-        #name: #rightCanvasSpecForPrerequisites
+        #name: #rightCanvasSpecForPrerequisiteClasses
         #window: 
        #(#WindowSpec
           #label: 'NewApplication'
           #name: 'NewApplication'
-          #layout: #(#LayoutFrame 208 0 222 0 507 0 521 0)
+          #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
           #level: 0
           #min: #(#Point 10 10)
           #max: #(#Point 1280 1024)
-          #bounds: #(#Rectangle 208 222 508 522)
+          #bounds: #(#Rectangle 216 173 516 473)
+          #usePreferredExtent: false
+          #returnIsOKInDialog: true
+          #escapeIsCancelInDialog: true
+        )
+        #component: 
+       #(#SpecCollection
+          #collection: #(
+           #(#LabelSpec
+              #label: 'Known Classes'
+              #name: 'Label1'
+              #layout: #(#LayoutFrame 0 0 0 0 0 0.5 30 0)
+              #translateLabel: true
+            )
+           #(#SequenceViewSpec
+              #name: 'List1'
+              #layout: #(#LayoutFrame 0 0 30 0 0 0.5 -62 1)
+              #tabable: true
+              #model: #selectedClassInPrerequisites
+              #hasHorizontalScrollBar: true
+              #hasVerticalScrollBar: true
+              #miniScrollerHorizontal: true
+              #miniScrollerVertical: true
+              #doubleClickSelector: #addClassToPrerequisites
+              #valueChangeSelector: #showInfoForRequiredClass:
+              #useIndex: false
+              #sequenceList: #listOfAllClassesInPrerequisites
+            )
+           #(#LabelSpec
+              #label: 'Required Classes'
+              #name: 'Label2'
+              #layout: #(#LayoutFrame 0 0.5 0 0 0 1 30 0)
+              #translateLabel: true
+            )
+           #(#SequenceViewSpec
+              #name: 'List2'
+              #layout: #(#LayoutFrame 0 0.5 30 0 0 1 -62 1)
+              #tabable: true
+              #model: #selectedRequiredClassInPrerequisites
+              #hasHorizontalScrollBar: true
+              #hasVerticalScrollBar: true
+              #miniScrollerHorizontal: true
+              #miniScrollerVertical: true
+              #doubleClickSelector: #removeClassFromPrerequisites
+              #valueChangeSelector: #showInfoForRequiredClass:
+              #useIndex: false
+              #sequenceList: #listOfRequiredClassesInPrerequisites
+            )
+           #(#HorizontalPanelViewSpec
+              #name: 'HorizontalPanel2'
+              #layout: #(#LayoutFrame 0 0 -62 1 0 1 -32 1)
+              #horizontalLayout: #fitSpace
+              #verticalLayout: #center
+              #horizontalSpace: 3
+              #verticalSpace: 3
+              #component: 
+             #(#SpecCollection
+                #collection: #(
+                 #(#ActionButtonSpec
+                    #label: 'Add'
+                    #name: 'addButton'
+                    #translateLabel: true
+                    #resizeForLabel: false
+                    #tabable: true
+                    #model: #addClassToPrerequisites
+                    #enableChannel: #canAddSelectedClassToPrerequisites
+                    #actionValue: ''
+                    #useDefaultExtent: true
+                  )
+                 #(#ActionButtonSpec
+                    #label: 'Remove'
+                    #name: 'removeButton'
+                    #translateLabel: true
+                    #resizeForLabel: false
+                    #tabable: true
+                    #model: #removeClassFromPrerequisites
+                    #enableChannel: #canRemoveSelectedClassFromPrerequisites
+                    #actionValue: ''
+                    #useDefaultExtent: true
+                  )
+                 )
+               
+              )
+            )
+           #(#HorizontalPanelViewSpec
+              #name: 'HorizontalPanel1'
+              #layout: #(#LayoutFrame 0 0.0 -30 1 0 1.0 0 1.0)
+              #initiallyInvisible: true
+              #horizontalLayout: #fitSpace
+              #verticalLayout: #center
+              #horizontalSpace: 3
+              #verticalSpace: 3
+              #component: 
+             #(#SpecCollection
+                #collection: #(
+                 #(#ActionButtonSpec
+                    #label: 'Cancel'
+                    #name: 'Button1'
+                    #translateLabel: true
+                    #tabable: true
+                    #model: #cancel
+                    #useDefaultExtent: true
+                  )
+                 #(#ActionButtonSpec
+                    #label: 'OK'
+                    #name: 'Button2'
+                    #translateLabel: true
+                    #tabable: true
+                    #model: #accept
+                    #useDefaultExtent: true
+                  )
+                 )
+               
+              )
+            )
+           )
+         
+        )
+      )
+!
+
+rightCanvasSpecForPrerequisiteProjects
+    "This resource specification was automatically generated
+     by the UIPainter of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the UIPainter may not be able to read the specification."
+
+    "
+     UIPainter new openOnClass:ProjectBrowser andSelector:#rightCanvasSpecForPrerequisiteProjects
+     ProjectBrowser new openInterface:#rightCanvasSpecForPrerequisiteProjects
+    "
+
+    <resource: #canvas>
+
+    ^ 
+     #(#FullSpec
+        #name: #rightCanvasSpecForPrerequisiteProjects
+        #window: 
+       #(#WindowSpec
+          #label: 'NewApplication'
+          #name: 'NewApplication'
+          #layout: #(#LayoutFrame 216 0 173 0 515 0 472 0)
+          #level: 0
+          #min: #(#Point 10 10)
+          #max: #(#Point 1280 1024)
+          #bounds: #(#Rectangle 216 173 516 473)
           #usePreferredExtent: false
           #returnIsOKInDialog: true
           #escapeIsCancelInDialog: true
@@ -579,6 +755,7 @@
               #hasVerticalScrollBar: true
               #miniScrollerHorizontal: true
               #miniScrollerVertical: true
+              #doubleClickSelector: #addProjectToPrerequisites
               #useIndex: false
               #sequenceList: #listOfAllProjectsInPrerequisites
             )
@@ -597,6 +774,7 @@
               #hasVerticalScrollBar: true
               #miniScrollerHorizontal: true
               #miniScrollerVertical: true
+              #doubleClickSelector: #removeProjectFromPrerequisites
               #useIndex: false
               #sequenceList: #listOfRequiredProjectsInPrerequisites
             )
@@ -616,7 +794,7 @@
                     #translateLabel: true
                     #resizeForLabel: false
                     #tabable: true
-                    #model: #addToPrerequisites
+                    #model: #addProjectToPrerequisites
                     #enableChannel: #canAddSelectedProjectToPrerequisites
                     #actionValue: ''
                     #useDefaultExtent: true
@@ -627,7 +805,7 @@
                     #translateLabel: true
                     #resizeForLabel: false
                     #tabable: true
-                    #model: #removeFromPrerequisites
+                    #model: #removeProjectFromPrerequisites
                     #enableChannel: #canRemoveSelectedProjectFromPrerequisites
                     #actionValue: ''
                     #useDefaultExtent: true
@@ -639,6 +817,7 @@
            #(#HorizontalPanelViewSpec
               #name: 'HorizontalPanel1'
               #layout: #(#LayoutFrame 0 0.0 -30 1 0 1.0 0 1.0)
+              #initiallyInvisible: true
               #horizontalLayout: #fitSpace
               #verticalLayout: #center
               #horizontalSpace: 3
@@ -1277,6 +1456,35 @@
       )
 !
 
+prerequisiteClassesItemMenu
+    "This resource specification was automatically generated
+     by the MenuEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the MenuEditor may not be able to read the specification."
+
+    "
+     MenuEditor new openOnClass:ProjectBrowser andSelector:#prerequisiteClassesItemMenu
+     (Menu new fromLiteralArrayEncoding:(ProjectBrowser prerequisiteClassesItemMenu)) startUp
+    "
+
+    <resource: #menu>
+
+    ^ 
+     #(#Menu
+        #(
+         #(#MenuItem
+            #label: 'Update'
+            #translateLabel: true
+            #value: #updateListOfRequiredPrerequisiteClasses
+            #enabled: #hasClassesSelectedHolder
+          )
+         )
+        nil
+        nil
+      )
+!
+
 projectItemMenu
     "This resource specification was automatically generated
      by the MenuEditor of ST/X."
@@ -1303,6 +1511,12 @@
                 #enabled: #hasProjectSelectedHolder
             )
              #(#MenuItem
+                #label: 'Inspect'
+                #translateLabel: true
+                #value: #inspectCurrentProject
+                #enabled: #hasProjectSelectedHolder
+            )
+             #(#MenuItem
                 #label: '-'
             )
              #(#MenuItem
@@ -1489,12 +1703,26 @@
 
 !
 
+canAddSelectedClassToPrerequisites
+    |holder|
+
+    (holder := builder bindingAt:#canAddSelectedClassToPrerequisites) isNil ifTrue:[
+        holder := BlockValue 
+                        with:[:m | self canAddClassToPrerequisites:m] 
+                        argument:(self selectedClassInPrerequisites).
+        builder aspectAt:#canAddSelectedClassToPrerequisites put:holder.
+    ].
+    ^ holder.
+
+    "Created: / 23.3.1999 / 14:18:05 / cg"
+!
+
 canAddSelectedProjectToPrerequisites
     |holder|
 
     (holder := builder bindingAt:#canAddSelectedProjectToPrerequisites) isNil ifTrue:[
         holder := BlockValue 
-                        with:[:m | self canAddToPrerequisites:m] 
+                        with:[:m | self canAddProjectToPrerequisites:m] 
                         argument:(self selectedProjectInPrerequisites).
         builder aspectAt:#canAddSelectedProjectToPrerequisites put:holder.
     ].
@@ -1503,6 +1731,18 @@
     "Created: / 23.3.1999 / 14:18:05 / cg"
 !
 
+canRemoveSelectedClassFromPrerequisites
+    |holder|
+
+    (holder := builder bindingAt:#canRemoveSelectedClassFromPrerequisites) isNil ifTrue:[
+        holder := BlockValue with:[:m | m notNil] argument:(self selectedRequiredClassInPrerequisites).
+        builder aspectAt:#canRemoveSelectedClassFromPrerequisites put:holder.
+    ].
+    ^ holder.
+
+    "Created: / 23.3.1999 / 14:18:05 / cg"
+!
+
 canRemoveSelectedProjectFromPrerequisites
     |holder|
 
@@ -1665,13 +1905,50 @@
     "Created: / 23.3.1999 / 14:18:05 / cg"
 !
 
+listOfAllClassesInPrerequisites
+    |holder classes|
+
+    (holder := builder bindingAt:#listOfAllClassesInPrerequisites) isNil ifTrue:[
+        builder aspectAt:#listOfAllClassesInPrerequisites put:(holder := SortedCollection new asValue).
+
+        "/ all unloaded classes and classes which where
+        "/ loaded are candidates.
+
+        classes := Smalltalk allClasses 
+                        select:[:cls |
+                                cls isMeta not
+                                and:[
+                                    cls isLoaded not
+                                    or:[cls wasAutoloaded]]
+                               ].
+
+        "/ mark currently loaded classes as bold;
+        "/ LATER: those which are superclasses of any of my classes bold-red.
+
+        classes := classes collect:[:cls | |nm|
+                                        nm := cls name.
+                                        cls isLoaded ifTrue:[
+                                            nm := nm asText allBold.
+                                        ].
+                                        nm
+                                   ].
+        holder value addAll:classes.
+        self currentProject wasLoadedFromFile ifFalse:[
+            self updateListOfRequiredPrerequisiteClasses.
+        ]
+    ].
+    ^ holder.
+
+    "Created: / 23.3.1999 / 14:18:05 / cg"
+!
+
 listOfAllProjectsInPrerequisites
     "automatically generated by UIPainter ..."
 
     |holder projects currentProject|
 
     (holder := builder bindingAt:#listOfAllProjectsInPrerequisites) isNil ifTrue:[
-        builder aspectAt:#listOfAllProjectsInPrerequisites put:(holder := List new).
+        builder aspectAt:#listOfAllProjectsInPrerequisites put:(holder := SortedCollection new asValue).
 
         currentProject := self currentProject.
 
@@ -1682,8 +1959,23 @@
                 projects add:p name.
             ]
         ].
-        projects := projects asOrderedCollection sort.
-        holder addAll:projects.
+        holder value addAll:projects.
+    ].
+    ^ holder.
+
+    "Created: / 23.3.1999 / 14:18:05 / cg"
+!
+
+listOfRequiredClassesInPrerequisites
+    "automatically generated by UIPainter ..."
+
+    |holder|
+
+    (holder := builder bindingAt:#listOfRequiredClassesInPrerequisites) isNil ifTrue:[
+        builder aspectAt:#listOfRequiredClassesInPrerequisites put:(holder := SortedCollection new asValue).
+        self currentProject wasLoadedFromFile ifFalse:[
+            self updateListOfRequiredPrerequisiteClasses.
+        ]
     ].
     ^ holder.
 
@@ -1696,7 +1988,7 @@
     |holder|
 
     (holder := builder bindingAt:#listOfRequiredProjectsInPrerequisites) isNil ifTrue:[
-        builder aspectAt:#listOfRequiredProjectsInPrerequisites put:(holder := List new).
+        builder aspectAt:#listOfRequiredProjectsInPrerequisites put:(holder := SortedCollection new asValue).
     ].
     ^ holder.
 
@@ -1817,6 +2109,19 @@
     ^ holder.
 !
 
+selectedClassInPrerequisites
+    "automatically generated by UIPainter ..."
+
+    |holder|
+
+    (holder := builder bindingAt:#selectedClassInPrerequisites) isNil ifTrue:[
+        builder aspectAt:#selectedClassInPrerequisites put:(holder := ValueHolder new).
+    ].
+    ^ holder.
+
+    "Created: / 23.3.1999 / 14:18:05 / cg"
+!
+
 selectedProjectInPrerequisites
     "automatically generated by UIPainter ..."
 
@@ -1830,6 +2135,19 @@
     "Created: / 23.3.1999 / 14:18:05 / cg"
 !
 
+selectedRequiredClassInPrerequisites
+    "automatically generated by UIPainter ..."
+
+    |holder|
+
+    (holder := builder bindingAt:#selectedRequiredClassInPrerequisites) isNil ifTrue:[
+        builder aspectAt:#selectedRequiredClassInPrerequisites put:(holder := ValueHolder new).
+    ].
+    ^ holder.
+
+    "Created: / 23.3.1999 / 14:18:05 / cg"
+!
+
 selectedRequiredProjectInPrerequisites
     "automatically generated by UIPainter ..."
 
@@ -1910,6 +2228,9 @@
     self hasClassNodeSelected ifTrue:[
         ^ self class classItemMenu
     ].      
+    self hasPrerequisiteClassesNodeSelected ifTrue:[
+        ^ self class prerequisiteClassesItemMenu
+    ].      
     ^ nil
 !
 
@@ -1923,7 +2244,11 @@
 
 !ProjectBrowser methodsFor:'private'!
 
-canAddToPrerequisites:aProjectName
+canAddClassToPrerequisites:aClassName
+    ^ aClassName notNil
+!
+
+canAddProjectToPrerequisites:aProjectName
     ^ aProjectName notNil
       and:[aProjectName ~= self currentProject name]
 !
@@ -1983,6 +2308,19 @@
 
 !
 
+currentProjectsClassNames
+    |p|
+
+    p := self currentProject.
+    ^ (p classes ? #()) 
+        collect:[:classOrSymbol | 
+                    classOrSymbol isSymbol 
+                        ifTrue:[classOrSymbol] 
+                        ifFalse:[Smalltalk at:classOrSymbol asSymbol ifAbsent:[classOrSymbol]]
+                ]
+
+!
+
 hasClassNodeSelected
     |selectedNode|
 
@@ -2009,6 +2347,16 @@
 
 !
 
+hasPrerequisiteClassesNodeSelected
+    |selectedNode|
+
+    selectedNode := self selectedTreeNode.
+    selectedNode isNil ifTrue:[^ false].
+
+    ^ selectedNode contents == #prerequisiteClasses
+
+!
+
 hasProjectNodeSelected
     |selectedNode|
 
@@ -2036,7 +2384,8 @@
      propertiesNode docNode classesNode patchesNode subprojectsNode filesNode
      commentNode prerequisitesNode analysisNode designNode codeNode
      userDocNode userOverViewNode userGuideNode userRefManNode
-     deploymentNode classIcon|
+     deploymentNode classIcon
+     prerequisiteProjectsNode prerequisiteClassesNode|
 
     projectName := aProject name.
     pNode := ProjectNode name:projectName.
@@ -2061,6 +2410,7 @@
 
     commentNode icon:(self class commentIcon).
     commentNode action:[:item | self showCommentOf:item].
+    commentNode info:'Some comment describing the project'.
     commentNode contents:#comment.
 
     docNode notNil ifTrue:[
@@ -2078,14 +2428,26 @@
         docNode add:(userDocNode := ProjectTreeItem name:'Other').
     ].
 
-    prerequisitesNode contents:#prerequisites.
     prerequisitesNode icon:(self class prerequisitesIcon).
-    prerequisitesNode spec:[self class rightCanvasSpecForPrerequisites].
+    prerequisitesNode add:(prerequisiteProjectsNode := ProjectTreeItem name:'Projects').
+    prerequisitesNode add:(prerequisiteClassesNode := ProjectTreeItem name:'Classes').
+    prerequisitesNode info:'Other projects and classes required by the project'.
+
+    prerequisiteProjectsNode contents:#prerequisiteProjects.
+    prerequisiteProjectsNode icon:(self class prerequisiteProjectsIcon).
+    prerequisiteProjectsNode spec:[self class rightCanvasSpecForPrerequisiteProjects].
+    prerequisiteProjectsNode info:'Other projects required by the project'.
+
+    prerequisiteClassesNode contents:#prerequisiteClasses.
+    prerequisiteClassesNode icon:(self class prerequisiteClassesIcon).
+    prerequisiteClassesNode spec:[self class rightCanvasSpecForPrerequisiteClasses].
+    prerequisiteClassesNode info:'Other (autoloaded-) classes required by the project'.
 
     classIcon := self class classIcon.
 
     classesNode contents:#classes.
     classesNode icon:(self class classesIcon).
+    classesNode info:'Classes contained in the project'.
     ((aProject classes ? #()) copy sort:[:a :b | 
                                                 |nmA nmB|
 
@@ -2103,17 +2465,22 @@
         classesNode add:cNode.
     ].
 
+
     propertiesNode contents:#properties.
     propertiesNode spec:[self class rightCanvasSpecForProperties].
+    propertiesNode info:'Project propreties'.
 
     filesNode contents:#files.
     filesNode icon:(self class filesIcon).
+    filesNode info:'Other files (bitmaps, data) contained in the project'.
 
     patchesNode contents:#patches.
     patchesNode icon:(self class methodsIcon).
+    patchesNode info:'Patches (system-changes) contained in the project'.
 
     deploymentNode icon:(self class deploymentIcon).
     deploymentNode spec:[self class rightCanvasSpecForDeployment].
+    deploymentNode info:'Deployment & packaging specification.'.
 
     ^ pNode
 
@@ -2162,6 +2529,8 @@
 
         self installDirectory value:(p propertyAt:#installDirectory) ? '/opt'.
 
+        self listOfRequiredClassesInPrerequisites value:(p prerequisiteClasses copy sort).
+
         modifiedChannel value:false.
         p addDependent:self.
     ].
@@ -2201,6 +2570,8 @@
         p propertyAt:#deliverLoadAllFile put:self deliverLoadAllFile value.
 
         p propertyAt:#installDirectory put:self installDirectory value.
+        p prerequisiteClasses:(self listOfRequiredClassesInPrerequisites value
+                               collect:[:entry | entry string asSymbol]).
 
         p addDependent:self.
     ].
@@ -2274,14 +2645,6 @@
 
 !ProjectBrowser methodsFor:'user actions'!
 
-accept
-    "save values from aspects into the project"
-
-    self saveAspectsIntoProject.
-    modifiedChannel value:false.
-
-!
-
 addClassesFromFilesInDirectory
     self addClassesFromFilesInDirectoryWithFilter:nil
 !
@@ -2316,7 +2679,7 @@
                 cls isNil ifTrue:[
                     cls := f withoutSuffix baseName asSymbol.
                     project defaultNameSpace notNil ifTrue:[
-                        cls := project defaultNameSpace name , '::' , cls
+                        cls := (project defaultNameSpace name , '::' , cls) asSymbol
                     ]
                 ].
                 (aFilterBlockOrNil isNil 
@@ -2336,15 +2699,6 @@
     ]
 !
 
-addToPrerequisites
-    |sel|
-
-    sel := self selectedProjectInPrerequisites value.
-    self listOfRequiredProjectsInPrerequisites add:sel.
-    self listOfAllProjectsInPrerequisites remove:sel.
-    self selectedProjectInPrerequisites value:nil.
-!
-
 browseClasses
     |ns p classes nBad|
 
@@ -2391,10 +2745,17 @@
 
 !
 
-cancel
-    "reload aspects from the project"
-
-    self readAspectsFromProject
+inspectCurrentProject
+    "make the selected Project the current project"
+
+    |project selectedNode|
+
+    self hasProjectNodeSelected ifTrue:[
+        selectedNode := self selectedTreeNode.
+        project := selectedNode contents.
+
+        project inspect.
+    ]
 !
 
 itemDoubleClicked:index
@@ -2424,6 +2785,8 @@
     action notNil ifTrue:[
         action value:item.
     ].
+
+    self valueOfInfoLabel value: item info
 !
 
 loadClassesFromDirectory
@@ -2472,6 +2835,11 @@
     self projectTreeHolder root:projectTree.
 "/    self projectTreeHolder selectNode:newNode.
 "/    self projectTreeHolder expand:newNode.
+
+    self readAspectsFromProject.
+    newProject wasLoadedFromFile ifFalse:[
+         self updateListOfRequiredPrerequisiteClasses.
+    ]
 !
 
 newSubProject
@@ -2515,15 +2883,6 @@
     ]
 !
 
-removeFromPrerequisites
-    |sel|
-
-    sel := self selectedRequiredProjectInPrerequisites value.
-    self listOfAllProjectsInPrerequisites add:sel.
-    self listOfRequiredProjectsInPrerequisites remove:sel.
-    self selectedRequiredProjectInPrerequisites value:nil.
-!
-
 removeProject
     |projectToRemove selectedNode subNode newNode parentNode parentProject newProject|
 
@@ -2562,6 +2921,10 @@
 saveProject
     |d p|
 
+    self modifiedChannel value ifTrue:[
+        (self confirm:'Changes not confirmed; save anyway ?') ifFalse:[^ self]
+    ].
+
     p := self currentProject.
     p directory isNil ifTrue:[
         d := (Dialog request:'Project Directory:').
@@ -2695,6 +3058,195 @@
     l removeAll.
     l addAll:classInfo.
 
+
+!
+
+updateListOfRequiredPrerequisiteClasses
+    "all autoloaded superclasses of my classes are definitely required"
+
+    |p anyChange allInPre requiredInPre nMissing|
+
+    p := self currentProject.
+    p isNil ifTrue:[^ self].
+    anyChange := false.
+    nMissing := 0.
+    allInPre := self listOfAllClassesInPrerequisites value.
+    requiredInPre := self listOfRequiredClassesInPrerequisites value.
+
+    self currentProjectsClassNames do:[:aClassName |
+        |cls|
+
+        cls := Smalltalk at:aClassName asSymbol.
+        (cls notNil and:[cls isLoaded]) ifTrue:[
+            cls allSuperclasses do:[:superClass |
+                |sName idx|
+
+                (superClass notNil 
+                and:[superClass isLoaded
+                and:[superClass wasAutoloaded]]) ifTrue:[
+                    |sName entry|
+
+                    sName := superClass name.
+                    idx := allInPre findFirst:[:item | item string = sName].
+                    idx ~~ 0 ifTrue:[
+                        allInPre removeIndex:idx.
+                        requiredInPre add:sName asText allBold.
+                        anyChange := true.
+                    ]
+                ]
+            ]
+        ] ifFalse:[
+            nMissing := nMissing + 1.
+        ]
+    ].
+
+    anyChange ifTrue:[
+        self listOfRequiredClassesInPrerequisites changed.
+        self listOfAllClassesInPrerequisites changed.
+    ].
+    nMissing ~~ 0 ifTrue:[
+        self information:'Update not complete - ' , nMissing printString
+                        , ' of the projects classes are not loaded'.
+    ].
+    self accept.
+! !
+
+!ProjectBrowser methodsFor:'user actions - canvas'!
+
+accept
+    "save values from aspects into the project"
+
+    self saveAspectsIntoProject.
+    modifiedChannel value:false.
+
+!
+
+addClassToPrerequisites
+    |sel cls|
+
+    sel := self selectedClassInPrerequisites value.
+    self listOfRequiredClassesInPrerequisites value add:sel.
+    self listOfAllClassesInPrerequisites value remove:sel.
+    self selectedClassInPrerequisites value:nil.
+
+    "/ also add any autoloaded superclass(es)
+
+    cls := Smalltalk at:sel asSymbol.
+    (cls notNil and:[cls isLoaded]) ifTrue:[
+        cls allSuperclasses do:[:superClass |
+            |sName|
+
+            (superClass notNil 
+            and:[superClass isLoaded
+            and:[superClass wasAutoloaded]]) ifTrue:[
+                |sName idx|
+                sName := superClass name.
+                idx := self listOfAllClassesInPrerequisites value findFirst:[:s | s string = sName].
+                idx ~~ 0 ifTrue:[
+                    self listOfAllClassesInPrerequisites value removeIndex:idx.
+                    self listOfRequiredClassesInPrerequisites value add:sName asString allBold.
+                ].
+            ]
+        ]
+    ].
+    self listOfRequiredClassesInPrerequisites changed.
+    self listOfAllClassesInPrerequisites changed.
+    self accept
+!
+
+addProjectToPrerequisites
+    |sel|
+
+    sel := self selectedProjectInPrerequisites value.
+    self listOfRequiredProjectsInPrerequisites value add:sel.
+    self listOfAllProjectsInPrerequisites value remove:sel.
+    self selectedProjectInPrerequisites value:nil.
+
+    self listOfRequiredProjectsInPrerequisites changed.
+    self listOfAllProjectsInPrerequisites changed.
+    self accept
+
+!
+
+cancel
+    "reload aspects from the project"
+
+    self readAspectsFromProject
+!
+
+removeClassFromPrerequisites
+    |sel cls myClasses|
+
+    sel := self selectedRequiredClassInPrerequisites value.
+    cls := Smalltalk at:sel asSymbol.
+
+    "/ check if this affects my classes
+    (cls notNil and:[cls isLoaded and:[cls wasAutoloaded]]) ifTrue:[
+        myClasses := self currentProjectsClassNames.
+        cls allSubclassesDo:[:cls |
+            (myClasses includes:cls name) ifTrue:[
+                self valueOfInfoLabel value:'Attention - this class is required by ' , cls name.
+                (self confirm:'Attention - this class is required by ' , cls name asText allBold, '.\(The project could later fail to load correctly)\\Really remove ?' withCRs) ifFalse:[
+                    ^ self
+                ].
+            ].
+        ]
+    ].
+
+    self listOfAllClassesInPrerequisites value add:sel.
+    self listOfRequiredClassesInPrerequisites value remove:sel.
+    self selectedRequiredClassInPrerequisites value:nil.
+
+    "/ also remove any autoloaded subclass(es)
+
+    (cls notNil and:[cls isLoaded and:[cls wasAutoloaded]]) ifTrue:[
+        cls allSubclassesDo:[:cls |
+            |entry|
+
+            entry := self listOfRequiredClassesInPrerequisites value remove:cls name ifAbsent:nil.
+            entry notNil ifTrue:[
+               self listOfAllClassesInPrerequisites value add:cls name.
+            ]
+        ]
+    ].
+
+    self listOfRequiredClassesInPrerequisites changed.
+    self listOfAllClassesInPrerequisites changed.
+    self accept
+
+!
+
+removeProjectFromPrerequisites
+    |sel|
+
+    sel := self selectedRequiredProjectInPrerequisites value.
+    self listOfAllProjectsInPrerequisites value add:sel.
+    self listOfRequiredProjectsInPrerequisites value remove:sel.
+    self selectedRequiredProjectInPrerequisites value:nil.
+
+    self listOfRequiredProjectsInPrerequisites changed.
+    self listOfAllProjectsInPrerequisites changed.
+    self accept
+
+!
+
+showInfoForRequiredClass:entry
+    "show why a class is required"
+
+    |cls myClasses|
+
+    entry notNil ifTrue:[
+        myClasses := self currentProjectsClassNames asSet.
+
+        cls := Smalltalk at:entry string asSymbol.
+        cls allSubclasses do:[:subClass |
+            (myClasses includes:subClass name) ifTrue:[
+                self valueOfInfoLabel value:('Required by ' , subClass name).
+                ^ self.
+            ]
+        ].
+    ].
+    self valueOfInfoLabel value:nil
 ! !
 
 !ProjectBrowser::ProjectTreeItem methodsFor:'accessing'!
@@ -2709,6 +3261,16 @@
 
     action := something.!
 
+info
+    "return the value of the instance variable 'info' (automatically generated)"
+
+    ^ info!
+
+info:something
+    "set the value of the instance variable 'info' (automatically generated)"
+
+    info := something.!
+
 spec
     "return the value of the instance variable 'spec' (automatically generated)"