4.6
build: anObject
| selectors container description |
self halt.
selectors := anObject class allSelectors select: [ :each | each isDescriptionSelector ].
selectors -> an IdentitySet(#descriptionContainer #descriptionType #descriptionName)
sounds good.
container := self build: anObject for: self containerSelector in: selectors.
^ (selectors select: [ :each | each isDescriptionDefinition ])
inject: (cache at: anObject put: container)
into: [ :result :each |
self containerSelector = each ifFalse: [
description := self build: anObject for: each in: selectors.
description isDescription
ifTrue: [ result add: description ] ].
result ]
4.7
buildDescriptions: anObject
| descriptionExtensions descriptionSelectors |
descriptionSelectors := self uniqueDescriptionSelectors: anObject.
descriptionSelectors -> Set() :(
descriptionExtensions := self descriptionExtensions: anObject.
^ (descriptionSelectors
collect: [ :each |
| description |
description := anObject perform: each.
description notNil ifTrue: [
descriptionExtensions at: each ifPresent: [ :extensions |
extensions do: [ :extensionSelector |
description := anObject perform: extensionSelector with: description ] ] ].
description ])
select: #notNil.
So apparently in magritte now we should use <magritteDescription> so I'm writing
a little test and changed FM3Element and FM3Property but it does not work :(
Pragma
allNamed: MAPragmaBuilder magritteDescriptionPragma
from: FM3Element to: Object.
does not return the methods with the annotations.
I'm getting there.
Stef