# HG changeset patch # User Claus Gittinger # Date 818770988 -3600 # Node ID 9eeb8aa5d1d795dad9edcb853bf71bcaff05a996 # Parent 16d2d5f9c31c89c3bf831543cdddf64808c5921f commentary diff -r 16d2d5f9c31c -r 9eeb8aa5d1d7 ProjectV.st --- a/ProjectV.st Tue Dec 12 13:22:20 1995 +0100 +++ b/ProjectV.st Tue Dec 12 13:23:08 1995 +0100 @@ -31,6 +31,34 @@ other person. No title to or ownership of the software is hereby transferred. " +! + +documentation +" + ProjectViews basically offer two functionalities: + + - keep a group of windows in order to organize the desktop + (I am not sure, if this is really a useful feature, now that we + have modern windowManagers which have multiple desktops as well). + + All views as created while some project was active are remembered + and can be hidden/shown altogether. + (this has nothing to do with windowGroups) + + Also, it is possible to close down all those windows (by destroying the project). + + - keep defaults for various system activities: + - the fileOut directory (i.e. where the SystemBrowser creates fileOut sources) + + - keep the source module/package + thats the default offered when classes are checkedIn the very first time + + - keep a default package-identifier assigned when classes/methods are created/modified. + thats mostly useful to browse all classes/methods that have been touched + in a projects context + + - keep a per-project changeList +" ! ! !ProjectView class methodsFor:'instance creation'! @@ -78,86 +106,86 @@ |labels selectors| SourceCodeManager isNil ifTrue:[ - labels := #( - 'rename ...' - '-' - 'changes' - 'browse' - '-' - 'fileOut directory ...' - 'package name ...' - '-' - 'show' - 'hide' - '-' - 'remove package classes/methods' - 'destroy' - ). + labels := #( + 'rename ...' + '-' + 'changes' + 'browse' + '-' + 'fileOut directory ...' + 'package name ...' + '-' + 'show' + 'hide' + '-' + 'remove package classes/methods' + 'destroy' + ). - selectors := #( - renameProject - nil - browseChanges - browsePackage - nil - projectDirectory - projectPackage - nil - showProject - hideProject - nil - removePackage - destroy - ) + selectors := #( + renameProject + nil + browseChanges + browsePackage + nil + projectDirectory + projectPackage + nil + showProject + hideProject + nil + removePackage + destroy + ) ] ifFalse:[ - labels := #( - 'rename ...' - '-' - 'changes' - 'browse' - '-' - 'fileOut directory ...' - 'repository module ...' - 'repository directory ...' - 'package name ...' + labels := #( + 'rename ...' + '-' + 'changes' + 'browse' + '-' + 'fileOut directory ...' + 'repository module ...' + 'repository directory ...' + 'package name ...' "/ '-' "/ 'save project code' "/ 'build' - '-' - 'show' - 'hide' - '-' - 'remove package code' - 'destroy' - ). + '-' + 'show' + 'hide' + '-' + 'remove package code' + 'destroy' + ). - selectors := #( - renameProject - nil - browseChanges - browsePackage - nil - projectDirectory - projectModule - projectRepository - projectPackage + selectors := #( + renameProject + nil + browseChanges + browsePackage + nil + projectDirectory + projectModule + projectRepository + projectPackage "/ nil "/ saveProjectFiles "/ buildProject - nil - showProject - hideProject - nil - removePackage - destroy - ) + nil + showProject + hideProject + nil + removePackage + destroy + ) ]. toggle middleButtonMenu:( - PopUpMenu - labels:labels - selectors:selectors - receiver:self + PopUpMenu + labels:labels + selectors:selectors + receiver:self ) "Created: 25.11.1995 / 18:06:32 / cg" @@ -177,36 +205,36 @@ "launch browsers for all classes/methods which are defined in this package" self topView withWaitCursorDo:[ - |classes packageName methods methodList| + |classes packageName methods methodList| - packageName := myProject packageName. - classes := myProject classes. - (classes notNil and:[classes notEmpty]) ifTrue:[ - SystemBrowser browseClasses:classes - title:'classes in package ' , packageName. + packageName := myProject packageName. + classes := myProject classes. + (classes notNil and:[classes notEmpty]) ifTrue:[ + SystemBrowser browseClasses:classes + title:'classes in package ' , packageName. - classes := classes asIdentitySet. - classes addAll:(classes collect:[:c | c class]). - ] ifFalse:[ - classes := #() - ]. + classes := classes asIdentitySet. + classes addAll:(classes collect:[:c | c class]). + ] ifFalse:[ + classes := #() + ]. "/ SystemBrowser browseMethodsWhere:[:cls :mthd :sel | "/ mthd package = packageName "/ and:[(classes includes:cls) not] "/ ] "/ title:'individual methods in package ' , packageName. - methods := myProject individualMethods. - methodList := methods collect:[:m | - |who| + methods := myProject individualMethods. + methodList := methods collect:[:m | + |who| - who := m who. - (who at:1) name , ' ' , (who at:2) - ]. - methodList notEmpty ifTrue:[ - SystemBrowser browseMethods:methodList - title:'individual methods in package ' , packageName. - ] + who := m who. + (who at:1) name , ' ' , (who at:2) + ]. + methodList notEmpty ifTrue:[ + SystemBrowser browseMethods:methodList + title:'individual methods in package ' , packageName. + ] ] "Created: 10.12.1995 / 00:08:58 / cg" @@ -310,10 +338,10 @@ box directoriesOnly. box title:(resources string:'Module in repository (new source containers / packages will go there):'). (d := myProject repositoryModule) notNil ifTrue:[ - box initialText:d + box initialText:d ]. box action:[:dirName | - myProject repositoryModule:dirName + myProject repositoryModule:dirName ]. box showAtPointer @@ -323,62 +351,62 @@ projectPackage self topView withWaitCursorDo:[ - |box p existingPackages allClasses| + |box p existingPackages allClasses| - existingPackages := Set new. - (allClasses := Smalltalk allClasses) do:[:aClass | - |p| + existingPackages := Set new. + (allClasses := Smalltalk allClasses) do:[:aClass | + |p| - (p := aClass package) notNil ifTrue:[ - existingPackages add:(p asString) - ]. - aClass methodArray do:[:aMethod | - (p := aMethod package) notNil ifTrue:[ - existingPackages add:(p asString) - ] - ]. - aClass class methodArray do:[:aMethod | - (p := aMethod package) notNil ifTrue:[ - existingPackages add:(p asString) - ] - ]. - ]. + (p := aClass package) notNil ifTrue:[ + existingPackages add:(p asString) + ]. + aClass methodArray do:[:aMethod | + (p := aMethod package) notNil ifTrue:[ + existingPackages add:(p asString) + ] + ]. + aClass class methodArray do:[:aMethod | + (p := aMethod package) notNil ifTrue:[ + existingPackages add:(p asString) + ] + ]. + ]. - box := ListSelectionBox title:'Package (new classes/methods will be put into that):'. - box list:(existingPackages asOrderedCollection sort). - (p := myProject packageName) notNil ifTrue:[ - box initialText:p - ]. - box action:[:packageName | - |someClass module directory| + box := ListSelectionBox title:'Package (new classes/methods will be put into that):'. + box list:(existingPackages asOrderedCollection sort). + (p := myProject packageName) notNil ifTrue:[ + box initialText:p + ]. + box action:[:packageName | + |someClass module directory| - "/ (try) to extract the module & repository directory from someClass which - "/ is already contained in that package + "/ (try) to extract the module & repository directory from someClass which + "/ is already contained in that package - Smalltalk allClasses - detect:[:cls | - |info| + Smalltalk allClasses + detect:[:cls | + |info| - (cls package = packageName) ifTrue:[ - (info := cls packageSourceCodeInfo) notNil ifTrue:[ - module := info at:#module ifAbsent:nil. - directory := info at:#directory ifAbsent:nil. - ] - ]. - module notNil and:[directory notNil]. - ] - ifNone:nil. + (cls package = packageName) ifTrue:[ + (info := cls packageSourceCodeInfo) notNil ifTrue:[ + module := info at:#module ifAbsent:nil. + directory := info at:#directory ifAbsent:nil. + ] + ]. + module notNil and:[directory notNil]. + ] + ifNone:nil. - module notNil ifTrue:[ - myProject repositoryModule:module - ]. - directory notNil ifTrue:[ - myProject repositoryDirectory:directory - ]. - myProject packageName:packageName. + module notNil ifTrue:[ + myProject repositoryModule:module + ]. + directory notNil ifTrue:[ + myProject repositoryDirectory:directory + ]. + myProject packageName:packageName. - ]. - box showAtPointer + ]. + box showAtPointer ] "Created: 9.12.1995 / 16:50:45 / cg" @@ -390,17 +418,17 @@ box := FilenameEnterBox new. box directoriesOnly. - box title:(resources string:'Relative path of repository (new source containers will go there):'). + box title:(resources string:'Relative path of package in repository (new source containers will go there):'). (d := myProject repositoryDirectory) notNil ifTrue:[ - box initialText:d + box initialText:d ]. box action:[:dirName | - myProject repositoryDirectory:dirName + myProject repositoryDirectory:dirName ]. box showAtPointer "Created: 25.11.1995 / 18:07:51 / cg" - "Modified: 10.12.1995 / 00:00:33 / cg" + "Modified: 11.12.1995 / 13:46:53 / cg" ! removePackage @@ -546,4 +574,4 @@ !ProjectView class methodsFor:'documentation'! version -^ '$Header: /cvs/stx/stx/libtool/Attic/ProjectV.st,v 1.23 1995-12-09 23:12:24 cg Exp $'! ! +^ '$Header: /cvs/stx/stx/libtool/Attic/ProjectV.st,v 1.24 1995-12-12 12:23:08 cg Exp $'! ! diff -r 16d2d5f9c31c -r 9eeb8aa5d1d7 ProjectView.st --- a/ProjectView.st Tue Dec 12 13:22:20 1995 +0100 +++ b/ProjectView.st Tue Dec 12 13:23:08 1995 +0100 @@ -31,6 +31,34 @@ other person. No title to or ownership of the software is hereby transferred. " +! + +documentation +" + ProjectViews basically offer two functionalities: + + - keep a group of windows in order to organize the desktop + (I am not sure, if this is really a useful feature, now that we + have modern windowManagers which have multiple desktops as well). + + All views as created while some project was active are remembered + and can be hidden/shown altogether. + (this has nothing to do with windowGroups) + + Also, it is possible to close down all those windows (by destroying the project). + + - keep defaults for various system activities: + - the fileOut directory (i.e. where the SystemBrowser creates fileOut sources) + + - keep the source module/package + thats the default offered when classes are checkedIn the very first time + + - keep a default package-identifier assigned when classes/methods are created/modified. + thats mostly useful to browse all classes/methods that have been touched + in a projects context + + - keep a per-project changeList +" ! ! !ProjectView class methodsFor:'instance creation'! @@ -78,86 +106,86 @@ |labels selectors| SourceCodeManager isNil ifTrue:[ - labels := #( - 'rename ...' - '-' - 'changes' - 'browse' - '-' - 'fileOut directory ...' - 'package name ...' - '-' - 'show' - 'hide' - '-' - 'remove package classes/methods' - 'destroy' - ). + labels := #( + 'rename ...' + '-' + 'changes' + 'browse' + '-' + 'fileOut directory ...' + 'package name ...' + '-' + 'show' + 'hide' + '-' + 'remove package classes/methods' + 'destroy' + ). - selectors := #( - renameProject - nil - browseChanges - browsePackage - nil - projectDirectory - projectPackage - nil - showProject - hideProject - nil - removePackage - destroy - ) + selectors := #( + renameProject + nil + browseChanges + browsePackage + nil + projectDirectory + projectPackage + nil + showProject + hideProject + nil + removePackage + destroy + ) ] ifFalse:[ - labels := #( - 'rename ...' - '-' - 'changes' - 'browse' - '-' - 'fileOut directory ...' - 'repository module ...' - 'repository directory ...' - 'package name ...' + labels := #( + 'rename ...' + '-' + 'changes' + 'browse' + '-' + 'fileOut directory ...' + 'repository module ...' + 'repository directory ...' + 'package name ...' "/ '-' "/ 'save project code' "/ 'build' - '-' - 'show' - 'hide' - '-' - 'remove package code' - 'destroy' - ). + '-' + 'show' + 'hide' + '-' + 'remove package code' + 'destroy' + ). - selectors := #( - renameProject - nil - browseChanges - browsePackage - nil - projectDirectory - projectModule - projectRepository - projectPackage + selectors := #( + renameProject + nil + browseChanges + browsePackage + nil + projectDirectory + projectModule + projectRepository + projectPackage "/ nil "/ saveProjectFiles "/ buildProject - nil - showProject - hideProject - nil - removePackage - destroy - ) + nil + showProject + hideProject + nil + removePackage + destroy + ) ]. toggle middleButtonMenu:( - PopUpMenu - labels:labels - selectors:selectors - receiver:self + PopUpMenu + labels:labels + selectors:selectors + receiver:self ) "Created: 25.11.1995 / 18:06:32 / cg" @@ -177,36 +205,36 @@ "launch browsers for all classes/methods which are defined in this package" self topView withWaitCursorDo:[ - |classes packageName methods methodList| + |classes packageName methods methodList| - packageName := myProject packageName. - classes := myProject classes. - (classes notNil and:[classes notEmpty]) ifTrue:[ - SystemBrowser browseClasses:classes - title:'classes in package ' , packageName. + packageName := myProject packageName. + classes := myProject classes. + (classes notNil and:[classes notEmpty]) ifTrue:[ + SystemBrowser browseClasses:classes + title:'classes in package ' , packageName. - classes := classes asIdentitySet. - classes addAll:(classes collect:[:c | c class]). - ] ifFalse:[ - classes := #() - ]. + classes := classes asIdentitySet. + classes addAll:(classes collect:[:c | c class]). + ] ifFalse:[ + classes := #() + ]. "/ SystemBrowser browseMethodsWhere:[:cls :mthd :sel | "/ mthd package = packageName "/ and:[(classes includes:cls) not] "/ ] "/ title:'individual methods in package ' , packageName. - methods := myProject individualMethods. - methodList := methods collect:[:m | - |who| + methods := myProject individualMethods. + methodList := methods collect:[:m | + |who| - who := m who. - (who at:1) name , ' ' , (who at:2) - ]. - methodList notEmpty ifTrue:[ - SystemBrowser browseMethods:methodList - title:'individual methods in package ' , packageName. - ] + who := m who. + (who at:1) name , ' ' , (who at:2) + ]. + methodList notEmpty ifTrue:[ + SystemBrowser browseMethods:methodList + title:'individual methods in package ' , packageName. + ] ] "Created: 10.12.1995 / 00:08:58 / cg" @@ -310,10 +338,10 @@ box directoriesOnly. box title:(resources string:'Module in repository (new source containers / packages will go there):'). (d := myProject repositoryModule) notNil ifTrue:[ - box initialText:d + box initialText:d ]. box action:[:dirName | - myProject repositoryModule:dirName + myProject repositoryModule:dirName ]. box showAtPointer @@ -323,62 +351,62 @@ projectPackage self topView withWaitCursorDo:[ - |box p existingPackages allClasses| + |box p existingPackages allClasses| - existingPackages := Set new. - (allClasses := Smalltalk allClasses) do:[:aClass | - |p| + existingPackages := Set new. + (allClasses := Smalltalk allClasses) do:[:aClass | + |p| - (p := aClass package) notNil ifTrue:[ - existingPackages add:(p asString) - ]. - aClass methodArray do:[:aMethod | - (p := aMethod package) notNil ifTrue:[ - existingPackages add:(p asString) - ] - ]. - aClass class methodArray do:[:aMethod | - (p := aMethod package) notNil ifTrue:[ - existingPackages add:(p asString) - ] - ]. - ]. + (p := aClass package) notNil ifTrue:[ + existingPackages add:(p asString) + ]. + aClass methodArray do:[:aMethod | + (p := aMethod package) notNil ifTrue:[ + existingPackages add:(p asString) + ] + ]. + aClass class methodArray do:[:aMethod | + (p := aMethod package) notNil ifTrue:[ + existingPackages add:(p asString) + ] + ]. + ]. - box := ListSelectionBox title:'Package (new classes/methods will be put into that):'. - box list:(existingPackages asOrderedCollection sort). - (p := myProject packageName) notNil ifTrue:[ - box initialText:p - ]. - box action:[:packageName | - |someClass module directory| + box := ListSelectionBox title:'Package (new classes/methods will be put into that):'. + box list:(existingPackages asOrderedCollection sort). + (p := myProject packageName) notNil ifTrue:[ + box initialText:p + ]. + box action:[:packageName | + |someClass module directory| - "/ (try) to extract the module & repository directory from someClass which - "/ is already contained in that package + "/ (try) to extract the module & repository directory from someClass which + "/ is already contained in that package - Smalltalk allClasses - detect:[:cls | - |info| + Smalltalk allClasses + detect:[:cls | + |info| - (cls package = packageName) ifTrue:[ - (info := cls packageSourceCodeInfo) notNil ifTrue:[ - module := info at:#module ifAbsent:nil. - directory := info at:#directory ifAbsent:nil. - ] - ]. - module notNil and:[directory notNil]. - ] - ifNone:nil. + (cls package = packageName) ifTrue:[ + (info := cls packageSourceCodeInfo) notNil ifTrue:[ + module := info at:#module ifAbsent:nil. + directory := info at:#directory ifAbsent:nil. + ] + ]. + module notNil and:[directory notNil]. + ] + ifNone:nil. - module notNil ifTrue:[ - myProject repositoryModule:module - ]. - directory notNil ifTrue:[ - myProject repositoryDirectory:directory - ]. - myProject packageName:packageName. + module notNil ifTrue:[ + myProject repositoryModule:module + ]. + directory notNil ifTrue:[ + myProject repositoryDirectory:directory + ]. + myProject packageName:packageName. - ]. - box showAtPointer + ]. + box showAtPointer ] "Created: 9.12.1995 / 16:50:45 / cg" @@ -390,17 +418,17 @@ box := FilenameEnterBox new. box directoriesOnly. - box title:(resources string:'Relative path of repository (new source containers will go there):'). + box title:(resources string:'Relative path of package in repository (new source containers will go there):'). (d := myProject repositoryDirectory) notNil ifTrue:[ - box initialText:d + box initialText:d ]. box action:[:dirName | - myProject repositoryDirectory:dirName + myProject repositoryDirectory:dirName ]. box showAtPointer "Created: 25.11.1995 / 18:07:51 / cg" - "Modified: 10.12.1995 / 00:00:33 / cg" + "Modified: 11.12.1995 / 13:46:53 / cg" ! removePackage @@ -546,4 +574,4 @@ !ProjectView class methodsFor:'documentation'! version -^ '$Header: /cvs/stx/stx/libtool/ProjectView.st,v 1.23 1995-12-09 23:12:24 cg Exp $'! ! +^ '$Header: /cvs/stx/stx/libtool/ProjectView.st,v 1.24 1995-12-12 12:23:08 cg Exp $'! !