[Pkg] The Trunk: SMBase-cmm.123.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Feb 12 22:48:21 UTC 2011
Chris Muller uploaded a new version of SMBase to project The Trunk:
http://source.squeak.org/trunk/SMBase-cmm.123.mcz
==================== Summary ====================
Name: SMBase-cmm.123
Author: cmm
Time: 9 February 2011, 2:54:30.716 pm
UUID: 654f8e92-4a19-4f52-9335-c249f0ae04e4
Ancestors: SMBase-cmm.121, SMBase-cmm.122
- Improve the #fullDescription of a PackageRelease.
=============== Diff against SMBase-cmm.121 ===============
Item was changed:
----- Method: SMPackageRelease>>fullDescription (in category 'printing') -----
fullDescription
"Return a full textual description of the package release."
| s |
s := TextStream on: (Text new: 400).
self describe: self package name withBoldLabel: 'Package Name: ' on: s.
name isEmptyOrNil ifFalse:
[self describe: self name withBoldLabel: 'Release Name: ' on: s].
summary isEmptyOrNil ifFalse:
[self describe: self summary withBoldLabel: 'Release Summary: ' on: s].
self
describe: self version
withBoldLabel: 'Version: '
on: s.
+ self note isEmptyOrNil
+ ifFalse:
+ [ s withAttribute: (TextIndent tabs: 1) do: [s nextPutAll: self note withSqueakLineEndings].
+ s cr].
+
categories isEmptyOrNil
ifFalse:
[s
cr;
withAttribute: TextEmphasis bold do: [s nextPutAll: 'Categories: '];
cr.
(self categories asSortedCollection: [:a :b | a path < b path])
do: [:c |
s
tab;
withAttribute: TextEmphasis italic
do:
[c parentsDo:
[:p |
s
nextPutAll: p name;
nextPutAll: '/'].
s nextPutAll: c name];
nextPutAll: ' - ' , c summary;
cr].
s cr].
created ifNotNil: [
s
withAttribute: TextEmphasis bold do: [ s nextPutAll: 'Created: ' ];
print: self created;
cr].
updated ifNotNil: [
s
withAttribute: TextEmphasis bold do: [ s nextPutAll: 'Modified: ' ];
print: self updated;
cr].
publisher ifNotNil: [
s
withAttribute: TextEmphasis bold
do: [s nextPutAll: 'Publisher: '].
s
withAttribute: (PluggableTextAttribute
evalBlock: [self userInterface
sendMailTo: self publisher email
regardingPackageRelease: self])
do: [s nextPutAll: self publisher nameAndEmail];
cr].
- self note isEmptyOrNil
- ifFalse:
- [s
- cr;
- withAttribute: TextEmphasis bold do: [s nextPutAll: 'Version Comment:'].
- s cr.
- s withAttribute: (TextIndent tabs: 1) do: [s nextPutAll: self note withSqueakLineEndings].
- s
- cr;
- cr].
url isEmptyOrNil
ifFalse:
[s
withAttribute: TextEmphasis bold do: [s nextPutAll: 'Homepage:'];
tab;
withAttribute: (TextURL new url: url) do: [s nextPutAll: url];
cr].
self downloadUrl isEmptyOrNil
ifFalse:
[s
withAttribute: TextEmphasis bold do: [s nextPutAll: 'Download:'];
tab;
withAttribute: (TextURL new url: self downloadUrl)
do: [s nextPutAll: self downloadUrl];
cr].
^s contents.
!
More information about the Packages
mailing list