default project setup
authorClaus Gittinger <cg@exept.de>
Sun, 20 Aug 2000 16:23:32 +0200
changeset 5547 5bbe4deab773
parent 5546 934ca7bfecc6
child 5548 eead51e4752e
default project setup
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!