Fix source loading w.r.t. class comments jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 25 May 2020 13:25:27 +0100
branchjv
changeset 1099 df7f9c846b88
parent 1098 620da38786b6
child 1100 fa939598a32a
Fix source loading w.r.t. class comments
MCClassComment.st
MCDefinition.st
MCMczReader.st
MCStWriter.st
MCStXSnapshotTransformation.st
MCTraitDefinition.st
--- a/MCClassComment.st	Mon May 25 13:24:22 2020 +0100
+++ b/MCClassComment.st	Mon May 25 13:25:27 2020 +0100
@@ -1,5 +1,7 @@
 "{ Package: 'stx:goodies/monticello' }"
 
+"{ NameSpace: Smalltalk }"
+
 MCDefinition subclass:#MCClassComment
 	instanceVariableNames:'className comment source'
 	classVariableNames:''
@@ -29,13 +31,25 @@
 !
 
 sortKey
-    self halt:'please define sortKey here'.
+    ^ self summary
+
+    "Modified: / 25-05-2020 / 12:42:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 source
     ^ source
 ! !
 
+!MCClassComment methodsFor:'comparing'!
+
+description
+    "superclass MCDefinition says that I am responsible to implement this method"
+
+    ^ Array with: self summary
+
+    "Modified: / 25-05-2020 / 12:34:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !MCClassComment methodsFor:'converting'!
 
 asChange
@@ -51,6 +65,26 @@
     actualClass comment:comment
 ! !
 
+!MCClassComment methodsFor:'printing'!
+
+summary
+    "superclass MCDefinition says that I am responsible to implement this method"
+
+    ^ className , ' (comment)'
+
+    "Modified: / 25-05-2020 / 12:34:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!MCClassComment methodsFor:'visiting'!
+
+accept:aVisitor
+    "raise an error: must be redefined in concrete subclass(es)"
+
+    ^ aVisitor visitClassComment: self.
+
+    "Created: / 25-05-2020 / 12:38:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !MCClassComment class methodsFor:'documentation'!
 
 version
--- a/MCDefinition.st	Mon May 25 13:24:22 2020 +0100
+++ b/MCDefinition.st	Mon May 25 13:25:27 2020 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "{ Package: 'stx:goodies/monticello' }"
 
 "{ NameSpace: Smalltalk }"
@@ -32,6 +30,7 @@
     "Modified: / 18-08-2009 / 10:18:15 / Jan Vrany <vranyj1@fel.cvut.cz>"
 ! !
 
+
 !MCDefinition methodsFor:'accessing'!
 
 provisions
@@ -217,6 +216,14 @@
     "Created: / 08-11-2010 / 17:29:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!MCDefinition methodsFor:'visiting'!
+
+accept: aVisitor
+    ^ self subclassResponsibility
+
+    "Modified (comment): / 25-05-2020 / 12:38:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !MCDefinition class methodsFor:'documentation'!
 
 version
@@ -233,6 +240,6 @@
 !
 
 version_SVN
-    ^ '§Id: MCDefinition.st 24 2010-11-09 14:00:17Z vranyj1 §'
+    ^ '§Id: MCDefinition.st 24 2010-11-09 14:00:17Z vranyj1 §'
 ! !
 
--- a/MCMczReader.st	Mon May 25 13:24:22 2020 +0100
+++ b/MCMczReader.st	Mon May 25 13:25:27 2020 +0100
@@ -124,12 +124,12 @@
         ].
         "otherwise (binay broken), try source"
 
-        self breakPoint:#jv.
+        "/self breakPoint:#jv.
         (self zip membersMatching: 'snapshot/*')
                 do: [:m | self extractDefinitionsFrom: m].
 
-    "Modified: / 14-09-2010 / 21:22:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 25-11-2011 / 16:55:00 / cg"
+    "Modified: / 25-05-2020 / 12:58:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 loadDependencies
--- a/MCStWriter.st	Mon May 25 13:24:22 2020 +0100
+++ b/MCStWriter.st	Mon May 25 13:25:27 2020 +0100
@@ -1,5 +1,7 @@
 "{ Package: 'stx:goodies/monticello' }"
 
+"{ NameSpace: Smalltalk }"
+
 MCWriter subclass:#MCStWriter
 	instanceVariableNames:'initStream'
 	classVariableNames:''
@@ -32,6 +34,12 @@
 
 !MCStWriter methodsFor:'visiting'!
 
+visitClassComment: definition
+    self writeClassComment: definition
+
+    "Created: / 25-05-2020 / 12:39:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 visitClassDefinition: definition
 	self writeClassDefinition: definition.
 	definition hasClassInstanceVariables ifTrue: [self writeMetaclassDefinition: definition].
--- a/MCStXSnapshotTransformation.st	Mon May 25 13:24:22 2020 +0100
+++ b/MCStXSnapshotTransformation.st	Mon May 25 13:25:27 2020 +0100
@@ -220,6 +220,11 @@
 
 !MCStXSnapshotTransformation methodsFor:'visiting'!
 
+visitClassComment: definition
+
+    "Created: / 25-05-2020 / 12:40:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 visitClassDefinition: definition
 
     "Modified: / 29-05-2013 / 12:07:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
--- a/MCTraitDefinition.st	Mon May 25 13:24:22 2020 +0100
+++ b/MCTraitDefinition.st	Mon May 25 13:25:27 2020 +0100
@@ -1,6 +1,6 @@
-"{ Encoding: utf8 }"
+"{ Package: 'stx:goodies/monticello' }"
 
-"{ Package: 'stx:goodies/monticello' }"
+"{ NameSpace: Smalltalk }"
 
 MCClassDefinition subclass:#MCTraitDefinition
 	instanceVariableNames:''
@@ -22,6 +22,7 @@
 
 ! !
 
+
 !MCTraitDefinition methodsFor:'accessing'!
 
 classTraitCompositionString
@@ -148,7 +149,12 @@
     ^ '$Header: /cvs/stx/stx/goodies/monticello/MCTraitDefinition.st,v 1.6 2013-04-02 19:24:41 cg Exp $'
 !
 
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+!
+
 version_SVN
-    ^ '§Id: MCTraitDefinition.st 17 2010-10-13 12:07:52Z vranyj1 §'
+    ^ '§Id: MCTraitDefinition.st 17 2010-10-13 12:07:52Z vranyj1 §'
 ! !