initial checkin
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 29 Jul 2013 20:26:20 +0200
changeset 201 cc1dd618738d
parent 200 e35a3f4b586b
child 202 730a466fbe35
initial checkin
reports/Builder__ReportClassSourceInfo.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reports/Builder__ReportClassSourceInfo.st	Mon Jul 29 20:26:20 2013 +0200
@@ -0,0 +1,68 @@
+"{ Package: 'stx:goodies/builder/reports' }"
+
+"{ NameSpace: Builder }"
+
+ReportSourceInfo subclass:#ReportClassSourceInfo
+	instanceVariableNames:'klass'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Builder-Reports-Utils'
+!
+
+
+!ReportClassSourceInfo methodsFor:'initialization'!
+
+initializeWithPackage:aSymbolOrString class:aClass 
+    package := aSymbolOrString asSymbol.
+    klass := aClass theNonMetaclass.
+    self setup.
+
+    "Created: / 29-07-2013 / 18:37:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!ReportClassSourceInfo methodsFor:'utilities'!
+
+fileOutOn:aStream
+    | filter |
+
+    "JV@2012-02-02: Do not fileout extensionVersion methods, that one is filed out
+     when extensions are filed out."
+    (klass inheritsFrom: ProjectDefinition) ifTrue:[
+        filter := [:m| m package = package 
+                        and:[ (AbstractSourceCodeManager isExtensionsVersionMethodSelector:m selector) not 
+                         "m selector ~~ self nameOfVersionMethodForExtensions"] 
+                  ]
+    ] ifFalse:[
+        filter := [:mth | mth package = package ].
+    ].
+
+
+        klass fileOutOn:aStream 
+               withTimeStamp:false 
+               withInitialize:true 
+               withDefinition:true
+               methodFilter:filter.
+
+    "Created: / 01-03-2013 / 17:51:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 29-07-2013 / 19:09:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+validate
+    | file |
+
+    file := (Smalltalk getPackageDirectoryForPackage: klass package) / ((Smalltalk fileNameForClass: klass) , '.st').
+    ^ self validateAgainstReference: file
+
+    "Modified: / 29-07-2013 / 14:54:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!ReportClassSourceInfo class methodsFor:'documentation'!
+
+version
+    ^ '$Header$'
+!
+
+version_CVS
+    ^ '$Header$'
+! !
+