reports/Builder__ReportExtensionsSourceInfo.st
changeset 264 ff9647e01309
parent 204 5450b318385a
child 274 b13db8438e4a
--- a/reports/Builder__ReportExtensionsSourceInfo.st	Tue Dec 16 11:29:50 2014 +0100
+++ b/reports/Builder__ReportExtensionsSourceInfo.st	Tue Dec 16 11:29:54 2014 +0100
@@ -10,6 +10,29 @@
 !
 
 
+!ReportExtensionsSourceInfo methodsFor:'accessing'!
+
+pathNameAbsolute: aBoolean
+    "Return a path (as String) to file containing the source code. The file points to the
+     real source file. If `aBoolean` is true, then absolute path is returned, otherwise
+     realtive path to package root is returned."
+
+    | packageDir |
+
+    packageDir := aBoolean 
+                    ifTrue:[ (Smalltalk getPackageDirectoryForPackage: package) pathName ]
+                    ifFalse: [ package asString replaceAll: $: with: Filename separator; replaceAll: $/ with: Filename separator ].
+
+    ^ packageDir , Filename separator , 'extensions.st'.
+
+    "
+    (Builder::ReportSourceInfo forExtensionsInPackage: 'stx:libtool') pathNameAbsolute: true
+    (Builder::ReportSourceInfo forExtensionsInPackage: 'stx:libtool') pathNameAbsolute: false
+    "
+
+    "Created: / 16-12-2014 / 10:27:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !ReportExtensionsSourceInfo methodsFor:'initialization'!
 
 initializeWithPackage: pkg