repository added
authorClaus Gittinger <cg@exept.de>
Sat, 25 Nov 1995 19:04:47 +0100
changeset 217 a4b6b0d44c3b
parent 216 9c60ed673ac2
child 218 22e66c597205
repository added
ProjectV.st
ProjectView.st
--- a/ProjectV.st	Sat Nov 25 16:32:06 1995 +0100
+++ b/ProjectV.st	Sat Nov 25 19:04:47 1995 +0100
@@ -10,8 +10,6 @@
  hereby transferred.
 "
 
-'From Smalltalk/X, Version:2.10.4 on 5-feb-1995 at 11:48:18 pm'!
-
 StandardSystemView subclass:#ProjectView
 	 instanceVariableNames:'myProject toggle'
 	 classVariableNames:'ActiveProjectView'
@@ -33,10 +31,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-!
-
-version
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/ProjectV.st,v 1.20 1995-11-15 16:23:35 cg Exp $'
 ! !
 
 !ProjectView class methodsFor:'instance creation'!
@@ -51,6 +45,157 @@
     "ProjectView for:(Project new)"
 ! !
 
+!ProjectView methodsFor:'initialization'!
+
+addToCurrentProject
+    "ignored here"
+
+    ^ self
+!
+
+initialize
+    super initialize.
+
+    "/
+    "/ create the toggle ...
+    "/
+    toggle := Toggle in:self.
+    toggle borderWidth:0.
+    toggle pressAction:[self showProject].
+    toggle releaseAction:[self hideProject].
+
+    "/
+    "/ and give it a menu
+    "/
+
+    toggle middleButtonMenu:(
+        PopUpMenu
+                labels:(resources array:
+                           #('rename ...'
+                             'changes'
+                             'browse'
+                             'fileOut directory ...'
+                             'repository directory ...'
+                             'package ...'
+"
+                             'properties'
+"
+                             '-'
+                             'save project code'
+                             'build'
+                             '-'
+                             'show'
+                             'hide'
+                             '-'
+                             'remove package'
+                             'destroy'
+                            )
+                        )
+             selectors:#(renameProject
+                         browseChanges
+                         browsePackage
+                         projectDirectory
+                         projectRepository
+                         projectPackage
+"
+                         browseProps
+"
+                         nil
+                         saveProjectFiles
+                         buildProject
+                         nil
+                         showProject
+                         hideProject
+                         nil
+                         removePackage
+                         destroy
+                        )
+              receiver:self
+    )
+
+    "Created: 25.11.1995 / 18:06:32 / cg"
+!
+
+initializeMenu
+    |labels selectors|
+
+    SourceCodeManager isNil ifTrue:[
+        labels := #(
+                        'rename ...'
+                        'changes'
+                        'browse'
+                        'fileOut directory ...'
+                        'package ...'
+                        '-'
+                        'show'
+                        'hide'
+                        '-'
+                        'remove package classes/methods'
+                        'destroy'
+                   ).
+
+         selectors := #(        
+                        renameProject
+                        browseChanges
+                        browsePackage
+                        projectDirectory
+                        projectPackage
+                        nil
+                        showProject
+                        hideProject
+                        nil
+                        removePackage
+                        destroy
+                    )
+    ] ifFalse:[
+        labels := #(
+                        'rename ...'
+                        'changes'
+                        'browse'
+                        'fileOut directory ...'
+                        'repository directory ...'
+                        'package ...'
+"/                        '-'
+"/                        'save project code'
+"/                        'build'
+                        '-'
+                        'show'
+                        'hide'
+                        '-'
+                        'remove package classes/methods'
+                        'destroy'
+                   ).
+
+         selectors := #(        
+                        renameProject
+                        browseChanges
+                        browsePackage
+                        projectDirectory
+                        projectRepository
+                        projectPackage
+"/                        nil
+"/                        saveProjectFiles
+"/                        buildProject
+                        nil
+                        showProject
+                        hideProject
+                        nil
+                        removePackage
+                        destroy
+                    )
+    ].
+
+    toggle middleButtonMenu:(
+        PopUpMenu
+                labels:labels
+                selectors:selectors
+                receiver:self
+    )
+
+    "Created: 25.11.1995 / 18:06:32 / cg"
+    "Modified: 25.11.1995 / 18:18:36 / cg"
+! !
+
 !ProjectView methodsFor:'menu actions'!
 
 browseChanges
@@ -95,6 +240,68 @@
     ]
 !
 
+browseProps
+    "will look better, once property inspector runs ..."
+
+    myProject properties inspect
+!
+
+buildProject
+    self topView withWaitCursorDo:[
+	|dir|
+
+	self saveProjectFiles.
+	(self confirm:'make object files in: ' ,  dir , ' ?') ifTrue:[
+	    myProject buildProject.
+	]
+    ].
+!
+
+destroy
+    (myProject views notNil
+    and:[myProject views notEmpty]) ifTrue:[
+	|box|
+
+	box := YesNoBox new.
+	box title:'Destroying a project will discard all changes made
+for that project and destroy all views opened for it.
+
+Do you really want to do this ?'.
+	box okText:'yes'.
+	(box confirm) ifFalse:[^ self]
+    ].
+
+    self doDestroy
+!
+
+destroyProject
+    |box|
+
+    box := YesNoBox new.
+    box title:'Destroying a project will discard all changes made
+for that project and destroy all views opened for it.
+
+Do you really want to do this ?'.
+    box okText:'yes'.
+    box yesAction:[
+	self doDestroyProject
+    ].
+    box showAtPointer
+!
+
+doDestroy
+    self hideProject.
+    myProject := nil.
+    super destroy
+!
+
+hideProject
+    myProject hideViews.
+    ActiveProjectView := nil.
+    toggle turnOff.
+    Project setDefaultProject.
+!
+
 projectDirectory
     |box d|
 
@@ -159,6 +366,24 @@
     ]
 !
 
+projectRepository
+    |box d|
+
+    box := FilenameEnterBox new.
+    box directoriesOnly.
+    box title:(resources string:'Relative path of repository (source containers will go there):').
+    (d := myProject repositoryDirectory) notNil ifTrue:[
+        box initialText:d
+    ].
+    box action:[:dirName |
+        myProject repositoryDirectory:dirName
+    ].
+    box showAtPointer
+
+    "Created: 25.11.1995 / 18:07:51 / cg"
+    "Modified: 25.11.1995 / 18:19:46 / cg"
+!
+
 removePackage
     "remove all classes and individual methods from the system.
      Currently, this cannot fully restore the state to before
@@ -237,41 +462,6 @@
     ].
 !
 
-showProject
-    ActiveProjectView notNil ifTrue:[
-	ActiveProjectView hideProject
-    ].
-    ActiveProjectView := self.
-
-    myProject showViews.
-    Project current:myProject.
-    toggle turnOn
-!
-
-browseProps
-    "will look better, once property inspector runs ..."
-
-    myProject properties inspect
-!
-
-saveProjectFiles
-    self topView withWaitCursorDo:[
-	|dir|
-
-	dir := myProject directory.
-	(self confirm:'create source files in: ' ,  dir , ' ?') ifTrue:[
-	    myProject createProjectFiles.
-	]
-    ].
-!
-
-hideProject
-    myProject hideViews.
-    ActiveProjectView := nil.
-    toggle turnOff.
-    Project setDefaultProject.
-!
-
 renameProject
     |box|
 
@@ -287,120 +477,26 @@
     box showAtPointer
 !
 
-buildProject
+saveProjectFiles
     self topView withWaitCursorDo:[
 	|dir|
 
-	self saveProjectFiles.
-	(self confirm:'make object files in: ' ,  dir , ' ?') ifTrue:[
-	    myProject buildProject.
+	dir := myProject directory.
+	(self confirm:'create source files in: ' ,  dir , ' ?') ifTrue:[
+	    myProject createProjectFiles.
 	]
     ].
 !
 
-destroyProject
-    |box|
-
-    box := YesNoBox new.
-    box title:'Destroying a project will discard all changes made
-for that project and destroy all views opened for it.
-
-Do you really want to do this ?'.
-    box okText:'yes'.
-    box yesAction:[
-	self doDestroyProject
+showProject
+    ActiveProjectView notNil ifTrue:[
+	ActiveProjectView hideProject
     ].
-    box showAtPointer
-!
-
-doDestroy
-    self hideProject.
-    myProject := nil.
-    super destroy
-!
-
-destroy
-    (myProject views notNil
-    and:[myProject views notEmpty]) ifTrue:[
-	|box|
-
-	box := YesNoBox new.
-	box title:'Destroying a project will discard all changes made
-for that project and destroy all views opened for it.
-
-Do you really want to do this ?'.
-	box okText:'yes'.
-	(box confirm) ifFalse:[^ self]
-    ].
-
-    self doDestroy
-! !
-
-!ProjectView methodsFor:'initialization'!
-
-initialize
-    super initialize.
-
-    "/
-    "/ create the toggle ...
-    "/
-    toggle := Toggle in:self.
-    toggle borderWidth:0.
-    toggle pressAction:[self showProject].
-    toggle releaseAction:[self hideProject].
+    ActiveProjectView := self.
 
-    "/
-    "/ and give it a menu
-    "/
-
-    toggle middleButtonMenu:(
-	PopUpMenu
-		labels:(resources array:
-			   #('rename ...'
-			     'changes'
-			     'browse'
-			     'directory ...'
-			     'package ...'
-"
-			     'properties'
-"
-			     '-'
-			     'save project code'
-			     'build'
-			     '-'
-			     'show'
-			     'hide'
-			     '-'
-			     'remove package'
-			     'destroy'
-			    )
-			)
-	     selectors:#(renameProject
-			 browseChanges
-			 browsePackage
-			 projectDirectory
-			 projectPackage
-"
-			 browseProps
-"
-			 nil
-			 saveProjectFiles
-			 buildProject
-			 nil
-			 showProject
-			 hideProject
-			 nil
-			 removePackage
-			 destroy
-			)
-	      receiver:self
-    )
-!
-
-addToCurrentProject
-    "ignored here"
-
-    ^ self
+    myProject showViews.
+    Project current:myProject.
+    toggle turnOn
 ! !
 
 !ProjectView methodsFor:'private accessing'!
@@ -427,3 +523,8 @@
 	self rerealize
     ]
 ! !
+
+!ProjectView class methodsFor:'documentation'!
+
+version
+^ '$Header: /cvs/stx/stx/libtool/Attic/ProjectV.st,v 1.21 1995-11-25 18:04:47 cg Exp $'! !
--- a/ProjectView.st	Sat Nov 25 16:32:06 1995 +0100
+++ b/ProjectView.st	Sat Nov 25 19:04:47 1995 +0100
@@ -10,8 +10,6 @@
  hereby transferred.
 "
 
-'From Smalltalk/X, Version:2.10.4 on 5-feb-1995 at 11:48:18 pm'!
-
 StandardSystemView subclass:#ProjectView
 	 instanceVariableNames:'myProject toggle'
 	 classVariableNames:'ActiveProjectView'
@@ -33,10 +31,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-!
-
-version
-    ^ '$Header: /cvs/stx/stx/libtool/ProjectView.st,v 1.20 1995-11-15 16:23:35 cg Exp $'
 ! !
 
 !ProjectView class methodsFor:'instance creation'!
@@ -51,6 +45,157 @@
     "ProjectView for:(Project new)"
 ! !
 
+!ProjectView methodsFor:'initialization'!
+
+addToCurrentProject
+    "ignored here"
+
+    ^ self
+!
+
+initialize
+    super initialize.
+
+    "/
+    "/ create the toggle ...
+    "/
+    toggle := Toggle in:self.
+    toggle borderWidth:0.
+    toggle pressAction:[self showProject].
+    toggle releaseAction:[self hideProject].
+
+    "/
+    "/ and give it a menu
+    "/
+
+    toggle middleButtonMenu:(
+        PopUpMenu
+                labels:(resources array:
+                           #('rename ...'
+                             'changes'
+                             'browse'
+                             'fileOut directory ...'
+                             'repository directory ...'
+                             'package ...'
+"
+                             'properties'
+"
+                             '-'
+                             'save project code'
+                             'build'
+                             '-'
+                             'show'
+                             'hide'
+                             '-'
+                             'remove package'
+                             'destroy'
+                            )
+                        )
+             selectors:#(renameProject
+                         browseChanges
+                         browsePackage
+                         projectDirectory
+                         projectRepository
+                         projectPackage
+"
+                         browseProps
+"
+                         nil
+                         saveProjectFiles
+                         buildProject
+                         nil
+                         showProject
+                         hideProject
+                         nil
+                         removePackage
+                         destroy
+                        )
+              receiver:self
+    )
+
+    "Created: 25.11.1995 / 18:06:32 / cg"
+!
+
+initializeMenu
+    |labels selectors|
+
+    SourceCodeManager isNil ifTrue:[
+        labels := #(
+                        'rename ...'
+                        'changes'
+                        'browse'
+                        'fileOut directory ...'
+                        'package ...'
+                        '-'
+                        'show'
+                        'hide'
+                        '-'
+                        'remove package classes/methods'
+                        'destroy'
+                   ).
+
+         selectors := #(        
+                        renameProject
+                        browseChanges
+                        browsePackage
+                        projectDirectory
+                        projectPackage
+                        nil
+                        showProject
+                        hideProject
+                        nil
+                        removePackage
+                        destroy
+                    )
+    ] ifFalse:[
+        labels := #(
+                        'rename ...'
+                        'changes'
+                        'browse'
+                        'fileOut directory ...'
+                        'repository directory ...'
+                        'package ...'
+"/                        '-'
+"/                        'save project code'
+"/                        'build'
+                        '-'
+                        'show'
+                        'hide'
+                        '-'
+                        'remove package classes/methods'
+                        'destroy'
+                   ).
+
+         selectors := #(        
+                        renameProject
+                        browseChanges
+                        browsePackage
+                        projectDirectory
+                        projectRepository
+                        projectPackage
+"/                        nil
+"/                        saveProjectFiles
+"/                        buildProject
+                        nil
+                        showProject
+                        hideProject
+                        nil
+                        removePackage
+                        destroy
+                    )
+    ].
+
+    toggle middleButtonMenu:(
+        PopUpMenu
+                labels:labels
+                selectors:selectors
+                receiver:self
+    )
+
+    "Created: 25.11.1995 / 18:06:32 / cg"
+    "Modified: 25.11.1995 / 18:18:36 / cg"
+! !
+
 !ProjectView methodsFor:'menu actions'!
 
 browseChanges
@@ -95,6 +240,68 @@
     ]
 !
 
+browseProps
+    "will look better, once property inspector runs ..."
+
+    myProject properties inspect
+!
+
+buildProject
+    self topView withWaitCursorDo:[
+	|dir|
+
+	self saveProjectFiles.
+	(self confirm:'make object files in: ' ,  dir , ' ?') ifTrue:[
+	    myProject buildProject.
+	]
+    ].
+!
+
+destroy
+    (myProject views notNil
+    and:[myProject views notEmpty]) ifTrue:[
+	|box|
+
+	box := YesNoBox new.
+	box title:'Destroying a project will discard all changes made
+for that project and destroy all views opened for it.
+
+Do you really want to do this ?'.
+	box okText:'yes'.
+	(box confirm) ifFalse:[^ self]
+    ].
+
+    self doDestroy
+!
+
+destroyProject
+    |box|
+
+    box := YesNoBox new.
+    box title:'Destroying a project will discard all changes made
+for that project and destroy all views opened for it.
+
+Do you really want to do this ?'.
+    box okText:'yes'.
+    box yesAction:[
+	self doDestroyProject
+    ].
+    box showAtPointer
+!
+
+doDestroy
+    self hideProject.
+    myProject := nil.
+    super destroy
+!
+
+hideProject
+    myProject hideViews.
+    ActiveProjectView := nil.
+    toggle turnOff.
+    Project setDefaultProject.
+!
+
 projectDirectory
     |box d|
 
@@ -159,6 +366,24 @@
     ]
 !
 
+projectRepository
+    |box d|
+
+    box := FilenameEnterBox new.
+    box directoriesOnly.
+    box title:(resources string:'Relative path of repository (source containers will go there):').
+    (d := myProject repositoryDirectory) notNil ifTrue:[
+        box initialText:d
+    ].
+    box action:[:dirName |
+        myProject repositoryDirectory:dirName
+    ].
+    box showAtPointer
+
+    "Created: 25.11.1995 / 18:07:51 / cg"
+    "Modified: 25.11.1995 / 18:19:46 / cg"
+!
+
 removePackage
     "remove all classes and individual methods from the system.
      Currently, this cannot fully restore the state to before
@@ -237,41 +462,6 @@
     ].
 !
 
-showProject
-    ActiveProjectView notNil ifTrue:[
-	ActiveProjectView hideProject
-    ].
-    ActiveProjectView := self.
-
-    myProject showViews.
-    Project current:myProject.
-    toggle turnOn
-!
-
-browseProps
-    "will look better, once property inspector runs ..."
-
-    myProject properties inspect
-!
-
-saveProjectFiles
-    self topView withWaitCursorDo:[
-	|dir|
-
-	dir := myProject directory.
-	(self confirm:'create source files in: ' ,  dir , ' ?') ifTrue:[
-	    myProject createProjectFiles.
-	]
-    ].
-!
-
-hideProject
-    myProject hideViews.
-    ActiveProjectView := nil.
-    toggle turnOff.
-    Project setDefaultProject.
-!
-
 renameProject
     |box|
 
@@ -287,120 +477,26 @@
     box showAtPointer
 !
 
-buildProject
+saveProjectFiles
     self topView withWaitCursorDo:[
 	|dir|
 
-	self saveProjectFiles.
-	(self confirm:'make object files in: ' ,  dir , ' ?') ifTrue:[
-	    myProject buildProject.
+	dir := myProject directory.
+	(self confirm:'create source files in: ' ,  dir , ' ?') ifTrue:[
+	    myProject createProjectFiles.
 	]
     ].
 !
 
-destroyProject
-    |box|
-
-    box := YesNoBox new.
-    box title:'Destroying a project will discard all changes made
-for that project and destroy all views opened for it.
-
-Do you really want to do this ?'.
-    box okText:'yes'.
-    box yesAction:[
-	self doDestroyProject
+showProject
+    ActiveProjectView notNil ifTrue:[
+	ActiveProjectView hideProject
     ].
-    box showAtPointer
-!
-
-doDestroy
-    self hideProject.
-    myProject := nil.
-    super destroy
-!
-
-destroy
-    (myProject views notNil
-    and:[myProject views notEmpty]) ifTrue:[
-	|box|
-
-	box := YesNoBox new.
-	box title:'Destroying a project will discard all changes made
-for that project and destroy all views opened for it.
-
-Do you really want to do this ?'.
-	box okText:'yes'.
-	(box confirm) ifFalse:[^ self]
-    ].
-
-    self doDestroy
-! !
-
-!ProjectView methodsFor:'initialization'!
-
-initialize
-    super initialize.
-
-    "/
-    "/ create the toggle ...
-    "/
-    toggle := Toggle in:self.
-    toggle borderWidth:0.
-    toggle pressAction:[self showProject].
-    toggle releaseAction:[self hideProject].
+    ActiveProjectView := self.
 
-    "/
-    "/ and give it a menu
-    "/
-
-    toggle middleButtonMenu:(
-	PopUpMenu
-		labels:(resources array:
-			   #('rename ...'
-			     'changes'
-			     'browse'
-			     'directory ...'
-			     'package ...'
-"
-			     'properties'
-"
-			     '-'
-			     'save project code'
-			     'build'
-			     '-'
-			     'show'
-			     'hide'
-			     '-'
-			     'remove package'
-			     'destroy'
-			    )
-			)
-	     selectors:#(renameProject
-			 browseChanges
-			 browsePackage
-			 projectDirectory
-			 projectPackage
-"
-			 browseProps
-"
-			 nil
-			 saveProjectFiles
-			 buildProject
-			 nil
-			 showProject
-			 hideProject
-			 nil
-			 removePackage
-			 destroy
-			)
-	      receiver:self
-    )
-!
-
-addToCurrentProject
-    "ignored here"
-
-    ^ self
+    myProject showViews.
+    Project current:myProject.
+    toggle turnOn
 ! !
 
 !ProjectView methodsFor:'private accessing'!
@@ -427,3 +523,8 @@
 	self rerealize
     ]
 ! !
+
+!ProjectView class methodsFor:'documentation'!
+
+version
+^ '$Header: /cvs/stx/stx/libtool/ProjectView.st,v 1.21 1995-11-25 18:04:47 cg Exp $'! !