# HG changeset patch # User Claus Gittinger # Date 966781412 -7200 # Node ID 5bbe4deab7730540292dd1ba28f58d4f8f8bc186 # Parent 934ca7bfecc6fbbc2bfa955c22cfc3d78f2ff695 default project setup diff -r 934ca7bfecc6 -r 5bbe4deab773 Project.st --- a/Project.st Sun Aug 20 16:23:14 2000 +0200 +++ b/Project.st Sun Aug 20 16:23:32 2000 +0200 @@ -102,15 +102,13 @@ "/ collect project info while scanning all classes "/ and methods ... - |packages anyUnloaded| - - packages := Dictionary new. - AllProjects isNil ifTrue:[ - AllProjects := OrderedCollection new. - ] ifFalse:[ - AllProjects do:[:p | packages at:p package asSymbol put:p]. + AllProjects := IdentitySet new. ]. + + AllProjects add:SystemProject. + AllProjects add:CurrentProject. + "/ Smalltalk allClassesDo:[:aClass | "/ |packageID prj classFilename pkgInfo revInfo "/ repositoryPath dir module lib nm| @@ -275,30 +273,12 @@ initialize SystemProject isNil ifTrue:[ - NextSequential := 1. - SystemProject := self new name:'default'. - SystemProject package:(OperatingSystem getLoginName , ':NoProject'). - SystemProject defaultNameSpace:Smalltalk. - SystemProject comment:'A default (dummy) project. -Will be made the current project in case no real project is ever activated.'. - - false ifTrue:[ - " - the SystemProject does not keep a record if changes, - but instead depends on the changes file - recording anything there. - " - SystemProject changeSet:nil. - ]. - ChangeSet notNil ifTrue:[ - SystemProject changeSet:ChangeSet new - ]. - self changed:#defaultProject + self initializeSystemProject. ]. CurrentProject := SystemProject. AllProjects := nil. -"/ now done lazy ... -"/ self initKnownProjects. + self initKnownProjects. " SystemProject := nil. @@ -306,6 +286,33 @@ " ! +initializeSystemProject + NextSequential := 1. + SystemProject := self new name:'default'. + "/ SystemProject package:(OperatingSystem getLoginName , ':NoProject') asSymbol. + SystemProject package:#'__NoProject__'. + SystemProject defaultNameSpace:Smalltalk. + SystemProject comment:'A default (dummy) project. +Is used as the current project in case no real project is ever activated. +Please do never save/checkin this project; instead, move classes & methods +into a concrete, real project and save that one in regular intervals. +Use this as a `scratch project''. +'. + + "/ no longer - changes are always remembered in some project + false ifTrue:[ + " + the SystemProject does not keep a record if changes, + but instead depends on the changes file - recording anything there. + " + SystemProject changeSet:nil. + ]. + ChangeSet notNil ifTrue:[ + SystemProject changeSet:ChangeSet new + ]. + self changed:#defaultProject +! + reinitKnownProjects "rescan the image for projects" @@ -395,7 +402,8 @@ ^ self knownProjects detect:[:p | p name = aProjectName] ifNone:nil. " - Project projectNamed:'libbasic' + Project projectNamed:'stx' + Project projectNamed:'default' " ! @@ -406,6 +414,7 @@ " Project projectWithId:#'stx:libbasic' + Project projectWithId:'__NoProject__' " ! @@ -604,6 +613,7 @@ !Project class methodsFor:'testing'! isClassChanged:aClass + "return true, if aClass has been changed" ^self current changedClasses includesIdentical:aClass ! ! @@ -3835,6 +3845,6 @@ !Project class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.158 2000-08-19 17:07:07 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.159 2000-08-20 14:23:32 cg Exp $' ! ! Project initialize!