Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. | protocolFilter builder classes superclasses |
  2.  
  3. protocolFilter := [ :method | (method category beginsWith: 'private')
  4. or: [(#('initialization' 'installing') includes: method category)
  5. or: [method isExtension ] ] ].
  6.  
  7. classes := OrderedCollection new
  8. add: ActionTrigger;
  9. addAll: TriggeringCondition allSubclasses;
  10. addAll: TriggeringPolicy allSubclasses;
  11. yourself.
  12.  
  13. superclasses := OrderedCollection new
  14. add: TriggeringCondition;
  15. add: TriggeringPolicy;
  16. yourself.
  17.  
  18. builder := RTUMLClassBuilder new.
  19.  
  20. "Set line shape"
  21. builder lineShape arrowedLine;
  22. color: Color black.
  23.  
  24. builder boxShape borderColor: Color black.
  25. builder methodShape color: Color black.
  26.  
  27. builder methodsNames: [ :class | (superclasses includes: class)
  28. ifTrue: #() ifFalse: ((class methods reject: protocolFilter) sortedAs: #protocol) ].
  29.  
  30. builder instanceVariables: [ :class | (superclasses includes: class)
  31. ifTrue: #() ifFalse: (class instanceVariables)].
  32.  
  33. builder classNameShape: (RTStyledLabel new
  34. emphasis: [:class | (superclasses includes: class)
  35. ifTrue: [ TextEmphasis italic ]
  36. ifFalse: [ TextEmphasis normal ] ] ;
  37. color: Color black;
  38. yourself).
  39.  
  40. builder addObjects: classes , superclasses;
  41. treeLayout.
  42. builder view canvas color: (Color transparent).
  43. builder
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement