Helios-Commands-Browser.st 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. Smalltalk current createPackage: 'Helios-Commands-Browser'!
  2. HLModelCommand subclass: #HLBrowserCommand
  3. instanceVariableNames: ''
  4. package: 'Helios-Commands-Browser'!
  5. !HLBrowserCommand class methodsFor: 'instance creation'!
  6. for: aBrowserModel
  7. ^ self new
  8. model: aBrowserModel;
  9. yourself
  10. ! !
  11. HLBrowserCommand subclass: #HLBrowserGoToCommand
  12. instanceVariableNames: ''
  13. package: 'Helios-Commands-Browser'!
  14. !HLBrowserGoToCommand class methodsFor: 'accessing'!
  15. key
  16. ^ 71
  17. !
  18. label
  19. ^ 'Go to'
  20. ! !
  21. HLBrowserGoToCommand subclass: #HLGoToClassesCommand
  22. instanceVariableNames: ''
  23. package: 'Helios-Commands-Browser'!
  24. !HLGoToClassesCommand methodsFor: 'executing'!
  25. execute
  26. self model focusOnClasses
  27. ! !
  28. !HLGoToClassesCommand class methodsFor: 'accessing'!
  29. key
  30. "c"
  31. ^ 67
  32. !
  33. label
  34. ^ 'Classes'
  35. ! !
  36. HLBrowserGoToCommand subclass: #HLGoToMethodsCommand
  37. instanceVariableNames: ''
  38. package: 'Helios-Commands-Browser'!
  39. !HLGoToMethodsCommand methodsFor: 'executing'!
  40. execute
  41. self model focusOnMethods
  42. ! !
  43. !HLGoToMethodsCommand class methodsFor: 'accessing'!
  44. key
  45. "m"
  46. ^ 77
  47. !
  48. label
  49. ^ 'Methods'
  50. ! !
  51. HLBrowserGoToCommand subclass: #HLGoToPackagesCommand
  52. instanceVariableNames: ''
  53. package: 'Helios-Commands-Browser'!
  54. !HLGoToPackagesCommand methodsFor: 'executing'!
  55. execute
  56. self model focusOnPackages
  57. ! !
  58. !HLGoToPackagesCommand class methodsFor: 'accessing'!
  59. key
  60. "p"
  61. ^ 80
  62. !
  63. label
  64. ^ 'Packages'
  65. ! !
  66. HLBrowserGoToCommand subclass: #HLGoToProtocolsCommand
  67. instanceVariableNames: ''
  68. package: 'Helios-Commands-Browser'!
  69. !HLGoToProtocolsCommand methodsFor: 'executing'!
  70. execute
  71. self model focusOnProtocols
  72. ! !
  73. !HLGoToProtocolsCommand class methodsFor: 'accessing'!
  74. key
  75. "p"
  76. ^ 84
  77. !
  78. label
  79. ^ 'Protocols'
  80. ! !
  81. HLBrowserGoToCommand subclass: #HLGoToSourceCodeCommand
  82. instanceVariableNames: ''
  83. package: 'Helios-Commands-Browser'!
  84. !HLGoToSourceCodeCommand methodsFor: 'executing'!
  85. execute
  86. self model focusOnSourceCode
  87. ! !
  88. !HLGoToSourceCodeCommand class methodsFor: 'accessing'!
  89. key
  90. "s"
  91. ^ 83
  92. !
  93. label
  94. ^ 'Source code'
  95. ! !
  96. HLBrowserCommand subclass: #HLCommitPackageCommand
  97. instanceVariableNames: ''
  98. package: 'Helios-Commands-Browser'!
  99. !HLCommitPackageCommand methodsFor: 'executing'!
  100. execute
  101. self model commitPackage
  102. ! !
  103. !HLCommitPackageCommand methodsFor: 'testing'!
  104. isActive
  105. ^ true
  106. " slf model isPackageDirty"
  107. ! !
  108. !HLCommitPackageCommand class methodsFor: 'accessing'!
  109. key
  110. ^ 75
  111. !
  112. label
  113. ^ 'Commit package'
  114. ! !
  115. HLBrowserCommand subclass: #HLFindCommand
  116. instanceVariableNames: ''
  117. package: 'Helios-Commands-Browser'!
  118. !HLFindCommand class methodsFor: 'accessing'!
  119. key
  120. ^ 70
  121. !
  122. label
  123. ^ 'Find'
  124. ! !
  125. HLFindCommand subclass: #HLFindClassCommand
  126. instanceVariableNames: ''
  127. package: 'Helios-Commands-Browser'!
  128. !HLFindClassCommand methodsFor: 'accessing'!
  129. displayLabel
  130. ^ 'select a class'
  131. !
  132. inputCompletion
  133. ^ self model availableClassNames
  134. !
  135. inputLabel
  136. ^ 'Find a class'
  137. ! !
  138. !HLFindClassCommand methodsFor: 'executing'!
  139. execute
  140. self model openClassNamed: self input
  141. ! !
  142. !HLFindClassCommand methodsFor: 'testing'!
  143. isInputRequired
  144. ^ true
  145. ! !
  146. !HLFindClassCommand class methodsFor: 'accessing'!
  147. key
  148. ^ 67
  149. !
  150. label
  151. ^ 'Class'
  152. ! !
  153. HLBrowserCommand subclass: #HLMoveToCommand
  154. instanceVariableNames: ''
  155. package: 'Helios-Commands-Browser'!
  156. !HLMoveToCommand class methodsFor: 'accessing'!
  157. key
  158. ^ 77
  159. !
  160. label
  161. ^ 'Move'
  162. ! !
  163. HLMoveToCommand subclass: #HLMoveMethodToCommand
  164. instanceVariableNames: ''
  165. package: 'Helios-Commands-Browser'!
  166. !HLMoveMethodToCommand methodsFor: 'testing'!
  167. isActive
  168. ^ self model selectedMethod notNil
  169. ! !
  170. !HLMoveMethodToCommand class methodsFor: 'accessing'!
  171. key
  172. ^ 77
  173. !
  174. label
  175. ^ 'Method'
  176. ! !
  177. HLMoveMethodToCommand subclass: #HLMoveMethodToClassCommand
  178. instanceVariableNames: ''
  179. package: 'Helios-Commands-Browser'!
  180. !HLMoveMethodToClassCommand methodsFor: 'accessing'!
  181. displayLabel
  182. ^ 'select a class'
  183. !
  184. inputCompletion
  185. ^ self model availableClassNames
  186. !
  187. inputLabel
  188. ^ 'Move method to class:'
  189. ! !
  190. !HLMoveMethodToClassCommand methodsFor: 'executing'!
  191. execute
  192. self model moveMethodToClass: self input
  193. ! !
  194. !HLMoveMethodToClassCommand methodsFor: 'testing'!
  195. isInputRequired
  196. ^ true
  197. ! !
  198. !HLMoveMethodToClassCommand class methodsFor: 'accessing'!
  199. key
  200. ^ 67
  201. !
  202. label
  203. ^ 'to class'
  204. ! !
  205. HLMoveMethodToCommand subclass: #HLMoveMethodToProtocolCommand
  206. instanceVariableNames: ''
  207. package: 'Helios-Commands-Browser'!
  208. !HLMoveMethodToProtocolCommand methodsFor: 'accessing'!
  209. displayLabel
  210. ^ 'select a protocol'
  211. !
  212. inputCompletion
  213. ^ self model availableProtocols
  214. !
  215. inputLabel
  216. ^ 'Move method to a protocol:'
  217. ! !
  218. !HLMoveMethodToProtocolCommand methodsFor: 'executing'!
  219. execute
  220. self model moveMethodToProtocol: self input
  221. ! !
  222. !HLMoveMethodToProtocolCommand methodsFor: 'testing'!
  223. isInputRequired
  224. ^ true
  225. ! !
  226. !HLMoveMethodToProtocolCommand class methodsFor: 'accessing'!
  227. key
  228. ^ 84
  229. !
  230. label
  231. ^ 'to protocol'
  232. ! !
  233. HLBrowserCommand subclass: #HLRemoveCommand
  234. instanceVariableNames: ''
  235. package: 'Helios-Commands-Browser'!
  236. !HLRemoveCommand class methodsFor: 'accessing'!
  237. key
  238. ^ 88
  239. !
  240. label
  241. ^ 'Remove'
  242. ! !
  243. HLRemoveCommand subclass: #HLRemoveMethodCommand
  244. instanceVariableNames: ''
  245. package: 'Helios-Commands-Browser'!
  246. !HLRemoveMethodCommand methodsFor: 'executing'!
  247. execute
  248. self model removeMethod
  249. ! !
  250. !HLRemoveMethodCommand methodsFor: 'testing'!
  251. isActive
  252. ^ self model selectedMethod notNil
  253. ! !
  254. !HLRemoveMethodCommand class methodsFor: 'accessing'!
  255. key
  256. ^ 77
  257. !
  258. label
  259. ^ 'Method'
  260. ! !
  261. HLBrowserCommand subclass: #HLToggleCommand
  262. instanceVariableNames: ''
  263. package: 'Helios-Commands-Browser'!
  264. !HLToggleCommand class methodsFor: 'accessing'!
  265. key
  266. ^ 84
  267. !
  268. label
  269. ^ 'Toggle'
  270. ! !
  271. HLToggleCommand subclass: #HLToggleClassSideCommand
  272. instanceVariableNames: ''
  273. package: 'Helios-Commands-Browser'!
  274. !HLToggleClassSideCommand methodsFor: 'executing'!
  275. execute
  276. self model showInstance: false
  277. ! !
  278. !HLToggleClassSideCommand class methodsFor: 'accessing'!
  279. key
  280. "c"
  281. ^ 67
  282. !
  283. label
  284. ^ 'Class side'
  285. ! !
  286. HLToggleCommand subclass: #HLToggleInstanceSideCommand
  287. instanceVariableNames: ''
  288. package: 'Helios-Commands-Browser'!
  289. !HLToggleInstanceSideCommand methodsFor: 'executing'!
  290. execute
  291. self model showInstance: true
  292. ! !
  293. !HLToggleInstanceSideCommand class methodsFor: 'accessing'!
  294. key
  295. "i"
  296. ^ 73
  297. !
  298. label
  299. ^ 'Instance side'
  300. ! !