Merge jv
authorMerge Script
Mon, 20 Apr 2015 06:40:30 +0200
branchjv
changeset 3857 878ff5dde744
parent 3854 0590e72fca22 (current diff)
parent 3856 f75fb195e35a (diff)
child 3859 ea17f69b4af2
Merge
ChangeSet.st
ClassDefinitionChange.st
--- a/ChangeSet.st	Sun Apr 19 21:30:23 2015 +0100
+++ b/ChangeSet.st	Mon Apr 20 06:40:30 2015 +0200
@@ -721,23 +721,23 @@
 fromStream:aStream while:aConditionBlock
     "build a changeSet from a stream, containing chunks.
      (i.e. either a classes sourceFile or a change-file).
-     Pass each change to the conditionBlock and stop whenever that
-     returns false. This allows skipping reamaining chunks, and speeding up
-     reading, if only parts need to be extracted
+     Pass each change to the conditionBlock and stop whenever that returns false. 
+     This allows skipping reamaining chunks, 
+     and thus speeding up reading, if only parts need to be extracted
      (for example: only documentation methods).
-     Return the changeSet."
+     Returns the changeSet."
 
     |changeSet|
 
     changeSet := self new.
     self
-	changesFromStream:aStream
-	for:changeSet
-	reader:(ChangeFileReader new)
-	do:[:aChange :lineNumberOrNil :posOrNil |
-	    changeSet add:aChange.
-	    (aConditionBlock value:aChange) ifFalse:[^ changeSet].
-	].
+        changesFromStream:aStream
+        for:changeSet
+        reader:(ChangeFileReader new)
+        do:[:aChange :lineNumberOrNil :posOrNil |
+            (aConditionBlock value:aChange) ifFalse:[^ changeSet].
+            changeSet add:aChange.
+        ].
 
     ^ changeSet
 
@@ -3721,68 +3721,70 @@
     topClassName := nil.
     "Pass 1 - collect classes"
     changeSetBeingSaved do:[:change|
-	| pkg |
-	pkg := change package.
-	packageName isNil ifTrue:[
-	    packageName := pkg.
-	] ifFalse:[
-	    "/Just a defensive check...
-	    self assert: (pkg isNil or:[pkg = packageName]) description: 'STC does not support multiple packages in source files'.
-	].
-
-	change isClassDefinitionChange ifTrue:[
-	    | nm ns |
-
-
-
-	    nm := change className.
-	    (nm endsWith:' class') ifFalse:[
-		(classInfos includesKey: nm) ifTrue:[
-		    self error:'Multiple definitions of class ', nm.
-		    ^self.
-		].
-		classInfos at: nm put: (ClassInfo new name: nm).
-		metaInfos at: nm put: (ClassInfo new name: nm , ' class').
-		change isPrivateClassDefinitionChange ifFalse:[
-		    topClassName notNil ifTrue:[
-			self error: ('Multiple top class definitions (%1 vs %2)' bindWith: topClassName with: nm).
-			^self.
-		    ].
-		    topClassName := nm.
-		    namespaceName := change nameSpaceName.
-
-		]
-	    ]
-	]
+        | pkg |
+        pkg := change package.
+        packageName isNil ifTrue:[
+            packageName := pkg.
+        ] ifFalse:[
+            "/Just a defensive check...
+            self assert: (pkg isNil or:[pkg = packageName]) description: 'STC does not support multiple packages in source files'.
+        ].
+
+        change isClassDefinitionChange ifTrue:[
+            | nm ns |
+
+
+
+            nm := change className.
+            (nm endsWith:' class') ifFalse:[
+                (classInfos includesKey: nm) ifTrue:[
+                    self error:'Multiple definitions of class ', nm.
+                    ^self.
+                ].
+                classInfos at: nm put: (ClassInfo new name: nm).
+                metaInfos at: nm put: (ClassInfo new name: nm , ' class').
+                change isPrivateClassDefinitionChange ifFalse:[
+                    topClassName notNil ifTrue:[
+                        self error: ('Multiple top class definitions (%1 vs %2)' bindWith: topClassName with: nm).
+                        ^self.
+                    ].
+                    topClassName := nm.
+                    namespaceName := change nameSpaceName.
+
+                ]
+            ]
+        ]
     ].
 
     "/ Could be an extension container...
     topClassName isNil ifTrue:[
-	^self
+        ^self
     ].
 
     "Pass 2: fill in infos"
     changeSetBeingSaved do:[:change|
-	change isClassChange ifTrue:[
-	    | nm info |
-
-	    nm := change className.
-	    (nm endsWith: ' class') ifTrue:[
-		info := metaInfos at: (nm copyButLast:(' class' size)).
-	    ] ifFalse:[
-		info := classInfos at: nm.
-		"Fill superclass info..."
-		change isClassDefinitionChange ifTrue:[
-		    | superNm |
-		    superNm := change superClassName.
-		    (classInfos includesKey: superNm) ifTrue:[
-			info superclass: (classInfos at: superNm).
-			(metaInfos at: nm) superclass: (classInfos at: superNm).
-		    ].
-		].
-	    ].
-	    info addChange: change.
-	]
+        change isClassChange ifTrue:[
+            | nm info |
+
+            nm := change className.
+            (nm endsWith: ' class') ifTrue:[
+                info := metaInfos at: (nm copyButLast:(' class' size)).
+            ] ifFalse:[
+                info := classInfos at: nm.
+                "Fill superclass info..."
+                change isClassDefinitionChange ifTrue:[
+                    | superNm |
+                    superNm := change superClassName.
+                    superNm notNil ifTrue:[
+                        (classInfos includesKey: superNm) ifTrue:[
+                            info superclass: (classInfos at: superNm).
+                            (metaInfos at: nm) superclass: (classInfos at: superNm).
+                        ].
+                    ].
+                ].
+            ].
+            info addChange: change.
+        ]
     ].
 
     classInfos do:[:info|info namespace: namespaceName].
@@ -3790,10 +3792,10 @@
 
 
     "
-	ChangeSet::ClassSourceWriter new
-	    changeSetBeingSaved: (ChangeSet forExistingClass: ChangeSet);
-	    analyze;
-	    yourself
+        ChangeSet::ClassSourceWriter new
+            changeSetBeingSaved: (ChangeSet forExistingClass: ChangeSet);
+            analyze;
+            yourself
 
     "
 
@@ -4336,7 +4338,7 @@
 !
 
 version_SVN
-    ^ '$Id: ChangeSet.st,v 1.261 2015-04-14 11:04:58 cg Exp $'
+    ^ '$Id: ChangeSet.st,v 1.262 2015-04-19 22:29:09 cg Exp $'
 ! !
 
 !ChangeSet::ClassSourceWriter::ClassInfo class methodsFor:'instance creation'!
@@ -5016,11 +5018,11 @@
 !ChangeSet class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ChangeSet.st,v 1.261 2015-04-14 11:04:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ChangeSet.st,v 1.262 2015-04-19 22:29:09 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/ChangeSet.st,v 1.261 2015-04-14 11:04:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ChangeSet.st,v 1.262 2015-04-19 22:29:09 cg Exp $'
 !
 
 version_HG
@@ -5029,6 +5031,6 @@
 !
 
 version_SVN
-    ^ '$Id: ChangeSet.st,v 1.261 2015-04-14 11:04:58 cg Exp $'
+    ^ '$Id: ChangeSet.st,v 1.262 2015-04-19 22:29:09 cg Exp $'
 ! !
 
--- a/ClassDefinitionChange.st	Sun Apr 19 21:30:23 2015 +0100
+++ b/ClassDefinitionChange.st	Mon Apr 20 06:40:30 2015 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1993 by Claus Gittinger
 	      All Rights Reserved
@@ -332,11 +334,13 @@
     "Modified: / 10-08-2012 / 11:53:54 / cg"
 !
 
-superClassName 
+superClassName
+    "returns nil, if no superclass"
+
     |nm|
 
     nm := superClassName.
-    nm isNil ifTrue:[^ 'nil'].
+    nm isNil ifTrue:[^ nil " 'nil' "].
     "/ convert VW namespace syntax
     (nm includes:$.) ifTrue:[
         ^ nm copyReplaceAll:$. withAll:'::'.
@@ -513,7 +517,7 @@
           ].
     ].
 
-    superClassNameUsed := self superClassName.
+    superClassNameUsed := (self superClassName) ? 'nil'.
     "Strip of namespace"
     nsOrNil notNil ifTrue:[
         (superClassNameUsed startsWith: nsOrNil) ifTrue:[
@@ -607,7 +611,7 @@
           ].
     ].
 
-    superClassNameUsed := self superClassName.
+    superClassNameUsed := self superClassName ? 'nil'.
     classNameUsed := self classNameWithoutNamespace.
 
     ^ String streamContents:[:stream |
@@ -915,11 +919,11 @@
 !ClassDefinitionChange class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.96 2015-03-24 18:01:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.97 2015-04-19 22:28:16 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.96 2015-03-24 18:01:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.97 2015-04-19 22:28:16 cg Exp $'
 !
 
 version_HG
@@ -928,6 +932,6 @@
 !
 
 version_SVN
-    ^ '$Id: ClassDefinitionChange.st,v 1.96 2015-03-24 18:01:04 cg Exp $'
+    ^ '$Id: ClassDefinitionChange.st,v 1.97 2015-04-19 22:28:16 cg Exp $'
 ! !