--- a/Project.st Thu Jun 24 18:05:30 1999 +0200
+++ b/Project.st Thu Jun 24 19:05:44 1999 +0200
@@ -997,7 +997,7 @@
s cr; nextPutLine:';'; nextPutLine:'; classes:'; nextPutLine:';'.
s nextPutLine:'; (for each class, one line of the form: ( #''className'' [fileName [condition]] )'.
- s nextPutLine:'; (where fileName and condition are optionl)'.
+ s nextPutLine:'; (where fileName and condition are optional)'.
s nextPutLine:';'.
coll := self classInfo.
@@ -1493,12 +1493,32 @@
addClassInfo:newInfo
"add a class info to the project"
- |infoCollection index|
+ |infoCollection index nm prefix|
(infoCollection := self classInfo) isNil ifTrue:[
self classInfo:(infoCollection := OrderedCollection new).
].
- index := infoCollection findFirst:[:i | i className = newInfo className].
+
+ index := infoCollection findFirst:[:i | |nm1 nm2|
+ nm1 := i className.
+ nm2 := newInfo className.
+ (nm1 includes:$:) ifFalse:[
+ nm1 := self defaultNameSpace name , '::' , nm1
+ ].
+ (nm2 includes:$:) ifFalse:[
+ nm2 := self defaultNameSpace name , '::' , nm2
+ ].
+ nm1 = nm2
+ ].
+ "/ strip off nameSpace prefix, if its the same as
+ "/ the default ...
+
+ nm := newInfo className.
+ prefix := self defaultNameSpace name , '::'.
+ (nm startsWith:prefix) ifTrue:[
+ nm := nm copyFrom:(prefix size + 1).
+ newInfo className:nm asSymbol.
+ ].
index ~~ 0 ifTrue:[
infoCollection at:index put:newInfo
] ifFalse:[
@@ -1856,6 +1876,6 @@
!Project class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.82 1999-06-24 16:05:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.83 1999-06-24 17:05:44 cg Exp $'
! !
Project initialize!