equal
deleted
inserted
replaced
1 "{ Package: 'stx:goodies/builder/reports' }" |
1 "{ Package: 'stx:goodies/builder/reports' }" |
2 |
2 |
3 "{ NameSpace: Builder }" |
3 "{ NameSpace: Builder }" |
4 |
4 |
5 Object subclass:#Report |
5 Object subclass:#Report |
6 instanceVariableNames:'name format' |
6 instanceVariableNames:'name packages format' |
7 classVariableNames:'Verbose OutputDir' |
7 classVariableNames:'Verbose OutputDir' |
8 poolDictionaries:'' |
8 poolDictionaries:'' |
9 category:'Builder-Reports' |
9 category:'Builder-Reports' |
10 ! |
10 ! |
11 |
11 |
211 ^CmdLineOption new |
211 ^CmdLineOption new |
212 short: $p; |
212 short: $p; |
213 long: '--package'; |
213 long: '--package'; |
214 description: 'Package in which to run the report'; |
214 description: 'Package in which to run the report'; |
215 action:[:option | |
215 action:[:option | |
216 self loadPackageIfNotAlready: option. |
216 packages isNil ifTrue:[ packages := Set new ]. |
217 self setupForPackages: { option } |
217 packages add: option. |
218 ] |
218 ] |
219 |
219 |
220 "Created: / 06-11-2011 / 21:49:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
220 "Created: / 06-11-2011 / 21:49:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
221 "Modified: / 15-05-2013 / 19:02:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
221 ! ! |
222 ! ! |
222 |
223 |
223 !Report methodsFor:'accessing-defaults'! |
224 !Report methodsFor:'accessing-defaults'! |
224 |
225 |
225 defaultFileSuffix |
226 defaultFileSuffix |
346 ! |
347 ! |
347 |
348 |
348 setUp |
349 setUp |
349 |
350 |
350 | stream | |
351 | stream | |
|
352 |
|
353 packages notNil ifTrue:[ |
|
354 packages do:[:pkg| self loadPackageIfNotAlready: pkg]. |
|
355 self setupForPackages: packages. |
|
356 packages := nil. |
|
357 ]. |
351 format isNil ifTrue:[format := self defaultFormat]. |
358 format isNil ifTrue:[format := self defaultFormat]. |
352 stream := (OutputDir / (self encodeFilename: ('%1-%2.%3' bindWith: self name with: self defaultFileSuffix with: format defaultFileSuffix))) writeStream. |
359 stream := (OutputDir / (self encodeFilename: ('%1-%2.%3' bindWith: self name with: self defaultFileSuffix with: format defaultFileSuffix))) writeStream. |
353 format report: self stream: stream |
360 format report: self stream: stream |
354 |
361 |
355 "Created: / 04-08-2011 / 12:43:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
362 "Created: / 04-08-2011 / 12:43:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
363 "Modified: / 15-05-2013 / 19:03:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
356 ! |
364 ! |
357 |
365 |
358 tearDown |
366 tearDown |
359 |
367 |
360 format streamFlush; streamClose. |
368 format streamFlush; streamClose. |
371 version_CVS |
379 version_CVS |
372 ^ '$Header$' |
380 ^ '$Header$' |
373 ! |
381 ! |
374 |
382 |
375 version_SVN |
383 version_SVN |
376 ^ '§Id: Builder__Report.st 294 2011-11-27 11:08:02Z vranyj1 §' |
384 ^ '$Id$' |
377 ! ! |
385 ! ! |
378 |
386 |
379 |
387 |
380 Report initialize! |
388 Report initialize! |