--- a/Project.st Tue Sep 14 13:50:24 1999 +0200
+++ b/Project.st Wed Sep 15 08:42:47 1999 +0200
@@ -12,9 +12,8 @@
Object subclass:#Project
instanceVariableNames:'name changeSet views directoryName properties packageName
- repositoryDirectory repositoryModule defaultNameSpace
- overwrittenMethods subProjects prerequisites bitmapFiles
- documentFiles otherFiles isLoaded'
+ repositoryDirectory repositoryModule overwrittenMethods
+ subProjects prerequisites isLoaded'
classVariableNames:'CurrentProject SystemProject NextSequential AllProjects
LoadedProjects'
poolDictionaries:''
@@ -108,7 +107,7 @@
AllProjects isNil ifTrue:[
AllProjects := OrderedCollection new.
] ifFalse:[
- AllProjects do:[:p | packages add:p packageName asSymbol].
+ AllProjects do:[:p | packages add:p package asSymbol].
].
Smalltalk allClassesDo:[:aClass |
|packageID prj classFilename pkgInfo revInfo
@@ -123,7 +122,7 @@
"/ a new one ...
prj := self new.
- prj packageName:packageID.
+ prj package:packageID.
prj directory:'???'.
prj repositoryModule:'unknown'.
prj repositoryDirectory:'unknown'.
@@ -235,7 +234,7 @@
SystemProject isNil ifTrue:[
NextSequential := 1.
SystemProject := self new name:'default'.
- SystemProject packageName:'private'.
+ SystemProject package:'private'.
SystemProject defaultNameSpace:Smalltalk.
SystemProject comment:'A default (dummy) project.
Will be made the current project in case no real project is ever activated.'.
@@ -303,7 +302,7 @@
currentPackageName
CurrentProject notNil ifTrue:[
- ^ CurrentProject packageName
+ ^ CurrentProject package
].
^ nil
@@ -539,10 +538,8 @@
in this nameSpace. Useful, when filing in ST-80 code, to avoid
overwriting of standard classes."
- ^ defaultNameSpace
+ ^ (self propertyAt:#defaultNameSpace) ? Smalltalk
- "Created: 2.1.1997 / 19:54:42 / cg"
- "Modified: 27.1.1997 / 11:59:53 / cg"
!
defaultNameSpace:aNamespace
@@ -551,8 +548,11 @@
in this nameSpace. Useful, when filing in ST-80 code, to avoid
overwriting of standard classes."
- aNamespace ~~ defaultNameSpace ifTrue:[
- defaultNameSpace := aNamespace.
+ |prevDefault|
+
+ prevDefault := self defaultNameSpace.
+ aNamespace ~~ prevDefault ifTrue:[
+ self propertyAt:#defaultNameSpace put:aNamespace.
self changed:#defaultNameSpace.
self == CurrentProject ifTrue:[
Project changed:#defaultNameSpace
@@ -643,30 +643,6 @@
"Modified: 27.1.1997 / 12:10:00 / cg"
!
-packageName
- "return the projects package identifier.
- This identifier marks all methods and new classes which were created
- in this project."
-
- ^ packageName
-
- "Modified: 27.1.1997 / 12:10:00 / cg"
-!
-
-packageName:aStringOrSymbol
- "set the projects package identifier.
- This identifier marks all methods and new classes which were created
- in this project."
-
- packageName := aStringOrSymbol asSymbol.
- self changed:#package.
- self == CurrentProject ifTrue:[
- Project changed:#package
- ]
-
- "Modified: 27.1.1997 / 12:10:09 / cg"
-!
-
prerequisiteClasses
"return the prerequisiteClasses of the project"
@@ -831,7 +807,6 @@
name := 'new Project-' , numString.
packageName := 'private-' , numString.
- defaultNameSpace := Smalltalk.
"/
"/ for tiny-configurations, allow ChangeSet to be absent
@@ -927,7 +902,7 @@
s := pack at:'nameSpace' ifAbsent:nil.
s notNil ifTrue:[
- defaultNameSpace := Namespace name:s.
+ self defaultNameSpace:(Namespace name:s).
].
subProjects := pack at:'subProjects' ifAbsent:subProjects.
@@ -1033,7 +1008,7 @@
Actually, the format is the same as used for resources (i.e. key - value pairs)
and the code below could be much simpler - if there where no humans to read it ..."
- |s coll first maxLen t|
+ |s coll first maxLen t defNS|
s := aStream.
@@ -1055,18 +1030,19 @@
s tab. s nextPutLine:(self type storeString).
s nextPutAll:'package'.
- s tab. s nextPutLine:(self packageName storeString).
+ s tab. s nextPutLine:(self package storeString).
- (defaultNameSpace notNil and:[defaultNameSpace ~~ Smalltalk]) ifTrue:[
+ defNS := self defaultNameSpace.
+ (defNS ~~ Smalltalk) ifTrue:[
s nextPutAll:'nameSpace'.
- s tab. s nextPutLine:(defaultNameSpace name storeString).
+ s tab. s nextPutLine:(defNS name storeString).
].
s cr; nextPutLine:';'; nextPutLine:'; repository:'; nextPutLine:';'.
s nextPutAll:'repository.module'.
s tab. s nextPutLine:(repositoryModule ? 'private') storeString.
s nextPutAll:'repository.directory'.
- s tab. s nextPutLine:(repositoryDirectory ? self packageName) storeString.
+ s tab. s nextPutLine:(repositoryDirectory ? self package) storeString.
s cr.
(t := properties at:#'sourcesDirectory' ifAbsent:nil) notNil ifTrue:[
@@ -2112,6 +2088,6 @@
!Project class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.90 1999-09-11 15:09:37 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.91 1999-09-15 06:42:34 cg Exp $'
! !
Project initialize!