Helios-Commands.st 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. Smalltalk current createPackage: 'Helios-Commands' properties: #{}!
  2. Object subclass: #HLCommand
  3. instanceVariableNames: ''
  4. package: 'Helios-Commands'!
  5. !HLCommand methodsFor: 'accessing'!
  6. documentation
  7. ^ self class documentation
  8. !
  9. key
  10. ^ self class key
  11. !
  12. label
  13. ^ self class label
  14. ! !
  15. !HLCommand methodsFor: 'converting'!
  16. asBinding
  17. ^ (HLBindingAction on: self key labelled: self label)
  18. callback: [ self execute ]
  19. ! !
  20. !HLCommand methodsFor: 'executing'!
  21. execute
  22. ! !
  23. !HLCommand class methodsFor: 'accessing'!
  24. bindingGroup
  25. ^ nil
  26. !
  27. documentation
  28. ^ ''
  29. !
  30. key
  31. ^ nil
  32. !
  33. label
  34. ^ ''
  35. ! !
  36. HLCommand subclass: #HLBrowserCommand
  37. instanceVariableNames: 'model'
  38. package: 'Helios-Commands'!
  39. !HLBrowserCommand methodsFor: 'accessing'!
  40. model
  41. ^ model
  42. !
  43. model: aBrowserModel
  44. model := aBrowserModel
  45. ! !
  46. !HLBrowserCommand class methodsFor: 'instance creation'!
  47. on: aBrowserModel
  48. ^ self new
  49. model: aBrowserModel;
  50. yourself
  51. ! !
  52. HLBrowserCommand subclass: #HLGoToCommand
  53. instanceVariableNames: ''
  54. package: 'Helios-Commands'!
  55. !HLGoToCommand class methodsFor: 'accessing'!
  56. bindingGroup
  57. ^ 'Go to'
  58. ! !
  59. HLGoToCommand subclass: #HLGoToClassesCommand
  60. instanceVariableNames: ''
  61. package: 'Helios-Commands'!
  62. !HLGoToClassesCommand methodsFor: 'executing'!
  63. execute
  64. self model selectedClass: self model selectedClass
  65. ! !
  66. !HLGoToClassesCommand class methodsFor: 'accessing'!
  67. key
  68. "c"
  69. ^ 67
  70. !
  71. label
  72. ^ 'Classes'
  73. ! !
  74. HLGoToCommand subclass: #HLGoToMethodsCommand
  75. instanceVariableNames: ''
  76. package: 'Helios-Commands'!
  77. !HLGoToMethodsCommand methodsFor: 'executing'!
  78. execute
  79. self model selectedMethod: self model selectedMethod
  80. ! !
  81. !HLGoToMethodsCommand class methodsFor: 'accessing'!
  82. key
  83. "m"
  84. ^ 77
  85. !
  86. label
  87. ^ 'Methods'
  88. ! !
  89. HLGoToCommand subclass: #HLGoToPackagesCommand
  90. instanceVariableNames: ''
  91. package: 'Helios-Commands'!
  92. !HLGoToPackagesCommand methodsFor: 'executing'!
  93. execute
  94. self model selectedPackage: self model selectedPackage
  95. ! !
  96. !HLGoToPackagesCommand class methodsFor: 'accessing'!
  97. key
  98. "p"
  99. ^ 80
  100. !
  101. label
  102. ^ 'Packages'
  103. ! !
  104. HLGoToCommand subclass: #HLGoToProtocolsCommand
  105. instanceVariableNames: ''
  106. package: 'Helios-Commands'!
  107. !HLGoToProtocolsCommand methodsFor: 'executing'!
  108. execute
  109. self model selectedProtocol: self model selectedProtocol
  110. ! !
  111. !HLGoToProtocolsCommand class methodsFor: 'accessing'!
  112. key
  113. "p"
  114. ^ 84
  115. !
  116. label
  117. ^ 'Protocols'
  118. ! !
  119. HLBrowserCommand subclass: #HLToggleCommand
  120. instanceVariableNames: ''
  121. package: 'Helios-Commands'!
  122. !HLToggleCommand class methodsFor: 'accessing'!
  123. bindingGroup
  124. ^ 'Toggle'
  125. ! !
  126. HLToggleCommand subclass: #HLToggleClassSideCommand
  127. instanceVariableNames: ''
  128. package: 'Helios-Commands'!
  129. !HLToggleClassSideCommand methodsFor: 'executing'!
  130. execute
  131. self model showInstance: false
  132. ! !
  133. !HLToggleClassSideCommand class methodsFor: 'accessing'!
  134. key
  135. "c"
  136. ^ 67
  137. !
  138. label
  139. ^ 'Class side'
  140. ! !
  141. HLToggleCommand subclass: #HLToggleInstanceSideCommand
  142. instanceVariableNames: ''
  143. package: 'Helios-Commands'!
  144. !HLToggleInstanceSideCommand methodsFor: 'executing'!
  145. execute
  146. self model showInstance: true
  147. ! !
  148. !HLToggleInstanceSideCommand class methodsFor: 'accessing'!
  149. key
  150. "i"
  151. ^ 73
  152. !
  153. label
  154. ^ 'Instance side'
  155. ! !