ProjectBrowser.st
changeset 1289 76e5acce57a6
parent 1287 b1dbcff964ea
child 1290 57d613905108
equal deleted inserted replaced
1288:0818e9c108be 1289:76e5acce57a6
   981        #(#WindowSpec
   981        #(#WindowSpec
   982           #label: 'NewApplication'
   982           #label: 'NewApplication'
   983           #name: 'NewApplication'
   983           #name: 'NewApplication'
   984           #min: #(#Point 10 10)
   984           #min: #(#Point 10 10)
   985           #max: #(#Point 1280 1024)
   985           #max: #(#Point 1280 1024)
   986           #bounds: #(#Rectangle 40 127 393 626)
   986           #bounds: #(#Rectangle 12 22 365 521)
   987         )
   987         )
   988         #component: 
   988         #component: 
   989        #(#SpecCollection
   989        #(#SpecCollection
   990           #collection: #(
   990           #collection: #(
   991            #(#FramedBoxSpec
   991            #(#FramedBoxSpec
  1096              #(#SpecCollection
  1096              #(#SpecCollection
  1097                 #collection: #(
  1097                 #collection: #(
  1098                  #(#LabelSpec
  1098                  #(#LabelSpec
  1099                     #label: 'Unix:'
  1099                     #label: 'Unix:'
  1100                     #name: 'Label1'
  1100                     #name: 'Label1'
  1101                     #layout: #(#LayoutFrame 0 0.0 5 0 60 0.0 27 0)
  1101                     #layout: #(#AlignmentOrigin 76 0.0 16 0 1 0.5)
  1102                     #translateLabel: true
  1102                     #translateLabel: true
       
  1103                     #resizeForLabel: true
  1103                     #adjust: #right
  1104                     #adjust: #right
  1104                   )
  1105                   )
  1105                  #(#InputFieldSpec
  1106                  #(#InputFieldSpec
  1106                     #name: 'EntryField1'
  1107                     #name: 'EntryField1'
  1107                     #layout: #(#LayoutFrame 64 0.0 4 0 0 1.0 26 0)
  1108                     #layout: #(#LayoutFrame 80 0.0 4 0 0 1.0 26 0)
  1108                     #activeHelpKey: #installDirUnix
  1109                     #activeHelpKey: #installDirUnix
  1109                     #enableChannel: #canDeliverForUnix
  1110                     #enableChannel: #canDeliverForUnix
  1110                     #tabable: true
  1111                     #tabable: true
  1111                     #model: #installDirectoryUnix
  1112                     #model: #installDirectoryUnix
  1112                     #acceptChannel: #acceptChannel
  1113                     #acceptChannel: #acceptChannel
  1114                     #acceptOnPointerLeave: false
  1115                     #acceptOnPointerLeave: false
  1115                   )
  1116                   )
  1116                  #(#LabelSpec
  1117                  #(#LabelSpec
  1117                     #label: 'Win32:'
  1118                     #label: 'Win32:'
  1118                     #name: 'Label2'
  1119                     #name: 'Label2'
  1119                     #layout: #(#LayoutFrame 0 0.0 36 0 60 0.0 58 0)
  1120                     #layout: #(#AlignmentOrigin 76 0.0 47 0 1 0.5)
  1120                     #translateLabel: true
  1121                     #translateLabel: true
       
  1122                     #resizeForLabel: true
  1121                     #adjust: #right
  1123                     #adjust: #right
  1122                   )
  1124                   )
  1123                  #(#InputFieldSpec
  1125                  #(#InputFieldSpec
  1124                     #name: 'EntryField2'
  1126                     #name: 'EntryField2'
  1125                     #layout: #(#LayoutFrame 64 0.0 34 0 0 1.0 56 0)
  1127                     #layout: #(#LayoutFrame 80 0.0 34 0 0 1.0 56 0)
  1126                     #activeHelpKey: #installDirWin32
  1128                     #activeHelpKey: #installDirWin32
  1127                     #enableChannel: #canDeliverForWin32
  1129                     #enableChannel: #canDeliverForWin32
  1128                     #tabable: true
  1130                     #tabable: true
  1129                     #model: #installDirectoryWin32
  1131                     #model: #installDirectoryWin32
  1130                     #acceptChannel: #acceptChannel
  1132                     #acceptChannel: #acceptChannel
  1132                     #acceptOnPointerLeave: false
  1134                     #acceptOnPointerLeave: false
  1133                   )
  1135                   )
  1134                  #(#LabelSpec
  1136                  #(#LabelSpec
  1135                     #label: 'VMS:'
  1137                     #label: 'VMS:'
  1136                     #name: 'Label3'
  1138                     #name: 'Label3'
  1137                     #layout: #(#LayoutFrame 0 0.0 65 0 60 0.0 87 0)
  1139                     #layout: #(#AlignmentOrigin 76 0.0 76 0 1 0.5)
  1138                     #translateLabel: true
  1140                     #translateLabel: true
       
  1141                     #resizeForLabel: true
  1139                     #adjust: #right
  1142                     #adjust: #right
  1140                   )
  1143                   )
  1141                  #(#InputFieldSpec
  1144                  #(#InputFieldSpec
  1142                     #name: 'EntryField3'
  1145                     #name: 'EntryField3'
  1143                     #layout: #(#LayoutFrame 64 0.0 63 0 0 1.0 85 0)
  1146                     #layout: #(#LayoutFrame 80 0.0 63 0 0 1.0 85 0)
  1144                     #activeHelpKey: #installDirVMS
  1147                     #activeHelpKey: #installDirVMS
  1145                     #initiallyDisabled: true
  1148                     #initiallyDisabled: true
  1146                     #enableChannel: #canDeliverForVMS
  1149                     #enableChannel: #canDeliverForVMS
  1147                     #tabable: true
  1150                     #tabable: true
  1148                     #model: #installDirectoryVMS
  1151                     #model: #installDirectoryVMS
  1151                     #acceptOnPointerLeave: false
  1154                     #acceptOnPointerLeave: false
  1152                   )
  1155                   )
  1153                  #(#LabelSpec
  1156                  #(#LabelSpec
  1154                     #label: 'MacOS:'
  1157                     #label: 'MacOS:'
  1155                     #name: 'Label4'
  1158                     #name: 'Label4'
  1156                     #layout: #(#LayoutFrame 0 0.0 95 0 60 0.0 117 0)
  1159                     #layout: #(#AlignmentOrigin 76 0.0 106 0 1 0.5)
  1157                     #translateLabel: true
  1160                     #translateLabel: true
       
  1161                     #resizeForLabel: true
  1158                     #adjust: #right
  1162                     #adjust: #right
  1159                   )
  1163                   )
  1160                  #(#InputFieldSpec
  1164                  #(#InputFieldSpec
  1161                     #name: 'EntryField4'
  1165                     #name: 'EntryField4'
  1162                     #layout: #(#LayoutFrame 64 0.0 93 0 0 1.0 115 0)
  1166                     #layout: #(#LayoutFrame 80 0.0 93 0 0 1.0 115 0)
  1163                     #activeHelpKey: #installDirMacOS
  1167                     #activeHelpKey: #installDirMacOS
  1164                     #initiallyDisabled: true
  1168                     #initiallyDisabled: true
  1165                     #enableChannel: #canDeliverForMacOS
  1169                     #enableChannel: #canDeliverForMacOS
  1166                     #tabable: true
  1170                     #tabable: true
  1167                     #model: #installDirectoryMac
  1171                     #model: #installDirectoryMac
  1751        #(#WindowSpec
  1755        #(#WindowSpec
  1752           #label: 'NewApplication'
  1756           #label: 'NewApplication'
  1753           #name: 'NewApplication'
  1757           #name: 'NewApplication'
  1754           #min: #(#Point 10 10)
  1758           #min: #(#Point 10 10)
  1755           #max: #(#Point 1280 1024)
  1759           #max: #(#Point 1280 1024)
  1756           #bounds: #(#Rectangle 216 173 577 536)
  1760           #bounds: #(#Rectangle 12 22 373 385)
  1757         )
  1761         )
  1758         #component: 
  1762         #component: 
  1759        #(#SpecCollection
  1763        #(#SpecCollection
  1760           #collection: #(
  1764           #collection: #(
  1761            #(#FramedBoxSpec
  1765            #(#FramedBoxSpec
  1846              #(#SpecCollection
  1850              #(#SpecCollection
  1847                 #collection: #(
  1851                 #collection: #(
  1848                  #(#LabelSpec
  1852                  #(#LabelSpec
  1849                     #label: 'Module:'
  1853                     #label: 'Module:'
  1850                     #name: 'Label1'
  1854                     #name: 'Label1'
  1851                     #layout: #(#LayoutFrame 0 0 0 0 86 0 22 0)
  1855                     #layout: #(#AlignmentOrigin 106 0 11 0 1 0.5)
  1852                     #translateLabel: true
  1856                     #translateLabel: true
       
  1857                     #resizeForLabel: true
  1853                     #adjust: #right
  1858                     #adjust: #right
  1854                   )
  1859                   )
  1855                  #(#InputFieldSpec
  1860                  #(#InputFieldSpec
  1856                     #name: 'EntryField2'
  1861                     #name: 'EntryField2'
  1857                     #layout: #(#LayoutFrame 92 0.0 0 0 0 1.0 22 0)
  1862                     #layout: #(#LayoutFrame 110 0.0 0 0 0 1.0 22 0)
  1858                     #activeHelpKey: #repositoryModule
  1863                     #activeHelpKey: #repositoryModule
  1859                     #model: #repositoryModule
  1864                     #model: #repositoryModule
  1860                     #acceptChannel: #acceptChannel
  1865                     #acceptChannel: #acceptChannel
  1861                     #modifiedChannel: #modifiedChannel
  1866                     #modifiedChannel: #modifiedChannel
  1862                     #acceptOnPointerLeave: false
  1867                     #acceptOnPointerLeave: false
  1863                   )
  1868                   )
  1864                  #(#LabelSpec
  1869                  #(#LabelSpec
  1865                     #label: 'Directory:'
  1870                     #label: 'Directory:'
  1866                     #name: 'Label2'
  1871                     #name: 'Label2'
  1867                     #layout: #(#LayoutFrame 0 0 25 0 86 0 47 0)
  1872                     #layout: #(#AlignmentOrigin 106 0 36 0 1 0.5)
  1868                     #translateLabel: true
  1873                     #translateLabel: true
       
  1874                     #resizeForLabel: true
  1869                     #adjust: #right
  1875                     #adjust: #right
  1870                   )
  1876                   )
  1871                  #(#InputFieldSpec
  1877                  #(#InputFieldSpec
  1872                     #name: 'EntryField3'
  1878                     #name: 'EntryField3'
  1873                     #layout: #(#LayoutFrame 92 0.0 25 0 0 1.0 47 0)
  1879                     #layout: #(#LayoutFrame 110 0.0 25 0 0 1.0 47 0)
  1874                     #activeHelpKey: #repositoryDirectory
  1880                     #activeHelpKey: #repositoryDirectory
  1875                     #model: #repositoryDirectory
  1881                     #model: #repositoryDirectory
  1876                     #acceptChannel: #acceptChannel
  1882                     #acceptChannel: #acceptChannel
  1877                     #modifiedChannel: #modifiedChannel
  1883                     #modifiedChannel: #modifiedChannel
  1878                     #acceptOnPointerLeave: false
  1884                     #acceptOnPointerLeave: false
  3858 
  3864 
  3859     AlreadCheckedExistingModulesAndPackages add:(Array with:moduleDir with:packageDir).
  3865     AlreadCheckedExistingModulesAndPackages add:(Array with:moduleDir with:packageDir).
  3860     ^ true
  3866     ^ true
  3861 !
  3867 !
  3862 
  3868 
       
  3869 checkInClasses:aCollectionOfClasses
       
  3870     |logMessage|
       
  3871 
       
  3872     logMessage := SourceCodeManagerUtilities getLogMessageFor:'classes in project'.
       
  3873     SourceCodeManagerUtilities checkinClasses:aCollectionOfClasses withLog:logMessage.
       
  3874     self halt.
       
  3875 !
       
  3876 
  3863 currentProject
  3877 currentProject
  3864     |node|
  3878     |node|
  3865 
  3879 
  3866     node := self currentProjectNode.
  3880     node := self currentProjectNode.
  3867     node isNil ifTrue:[^ nil].
  3881     node isNil ifTrue:[^ nil].
  5630 !
  5644 !
  5631 
  5645 
  5632 checkInAllClasses
  5646 checkInAllClasses
  5633     "check in all classes"
  5647     "check in all classes"
  5634 
  5648 
  5635     |p classes|
  5649     |p classes classesToCheckIn anyBad|
  5636 
  5650 
  5637     p := self currentProject.
  5651     p := self currentProject.
  5638     p isNil ifTrue:[
  5652     p isNil ifTrue:[
  5639         self information:'No project selected'.
  5653         self information:'No project selected'.
  5640         ^ self
  5654         ^ self
  5641     ].
  5655     ].
  5642 
  5656 
  5643     self warn:'CheckIn function not yet implemented.'.
  5657     classesToCheckIn := OrderedCollection new.
  5644     ^ self.
  5658     anyBad := false.
  5645 
  5659 
  5646     "/ check in classes ...
  5660     "/ collect in classes ...
  5647 
  5661 
  5648     classes := p classes.
  5662     classes := p classes.
  5649     classes do:[:aClass |
  5663     classes do:[:aClassOrClassName |
  5650         |clsName|
  5664         |cls clsName|
  5651 
  5665 
  5652         aClass isBehavior ifFalse:[
  5666         cls := aClassOrClassName.
  5653             aClass isSymbol ifTrue:[
  5667         cls isString ifTrue:[
  5654                 clsName := aClass
  5668             cls := Smalltalk at:cls asSymbol.
  5655             ] ifFalse:[
  5669             clsName := aClassOrClassName
  5656                 clsName := aClass className
  5670         ] ifFalse:[
  5657             ].
  5671             clsName := aClassOrClassName name
       
  5672         ].
       
  5673 
       
  5674         cls isBehavior ifFalse:[
  5658             Transcript showCR:('ProjectBrowser: cannot checkIn unloaded class: ' , clsName).
  5675             Transcript showCR:('ProjectBrowser: cannot checkIn unloaded class: ' , clsName).
       
  5676             anyBad := true.
  5659         ] ifTrue:[
  5677         ] ifTrue:[
  5660             aClass isLoaded ifFalse:[
  5678             cls isLoaded ifFalse:[
  5661                 Transcript showCR:('ProjectBrowser: cannot checkIn unloaded class: ' , aClass name).
  5679                 Transcript showCR:('ProjectBrowser: cannot checkIn unloaded class: ' , clsName).
       
  5680                 anyBad := true.
  5662             ] ifTrue:[
  5681             ] ifTrue:[
  5663                 aClass owningClass isNil ifTrue:[ "/ skip private classes
  5682                 cls owningClass isNil ifTrue:[ "/ skip private classes
  5664                     Transcript showCR:('ProjectBrowser: checking in class: ' , aClass name).
  5683                     Transcript showCR:('ProjectBrowser: checking in class: ' , clsName).
  5665                     self checkInClass:aClass.
  5684                     classesToCheckIn add:cls.
  5666                 ]
  5685                 ]
  5667             ]
  5686             ]
  5668         ]
  5687         ]
  5669     ].
  5688     ].
  5670 
  5689     anyBad ifTrue:[^ self].
       
  5690 
       
  5691     self checkInClasses:classesToCheckIn.
  5671 
  5692 
  5672 !
  5693 !
  5673 
  5694 
  5674 checkInMakefiles
  5695 checkInMakefiles
  5675     "check in the Make.proto, Makefile, nt.mak and vms.mak files"
  5696     "check in the Make.proto, Makefile, nt.mak and vms.mak files"
  5786         self currentProject loadClassesFromProjectDirectory.
  5807         self currentProject loadClassesFromProjectDirectory.
  5787     ].
  5808     ].
  5788 
  5809 
  5789 !
  5810 !
  5790 
  5811 
       
  5812 loadClassesFromRepository
       
  5813     "load all classes as contained in the project from the source code
       
  5814      repository into the system"
       
  5815 
       
  5816     self warn:'not yet implemented - please load from directory'
       
  5817 
       
  5818 !
       
  5819 
  5791 makeCurrentProject
  5820 makeCurrentProject
  5792     "make the selected Project the current project"
  5821     "make the selected Project the current project"
  5793 
  5822 
  5794     |project|
  5823     |project|
  5795 
  5824