1
0

Helios-Commands-Browser.st 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. Smalltalk current createPackage: 'Helios-Commands-Browser'!
  2. HLToolCommand subclass: #HLBrowserCommand
  3. instanceVariableNames: ''
  4. package: 'Helios-Commands-Browser'!
  5. !HLBrowserCommand class methodsFor: 'testing'!
  6. isValidFor: aModel
  7. ^ aModel isBrowserModel
  8. ! !
  9. HLBrowserCommand subclass: #HLBrowserGoToCommand
  10. instanceVariableNames: ''
  11. package: 'Helios-Commands-Browser'!
  12. !HLBrowserGoToCommand class methodsFor: 'accessing'!
  13. key
  14. ^ 'g'
  15. !
  16. label
  17. ^ 'Go to'
  18. ! !
  19. !HLBrowserGoToCommand class methodsFor: 'testing'!
  20. isValidFor: aModel
  21. ^ aModel isBrowserModel
  22. ! !
  23. HLBrowserGoToCommand subclass: #HLGoToClassesCommand
  24. instanceVariableNames: ''
  25. package: 'Helios-Commands-Browser'!
  26. !HLGoToClassesCommand methodsFor: 'executing'!
  27. execute
  28. self model focusOnClasses
  29. ! !
  30. !HLGoToClassesCommand class methodsFor: 'accessing'!
  31. key
  32. ^ 'c'
  33. !
  34. label
  35. ^ 'Classes'
  36. ! !
  37. HLBrowserGoToCommand subclass: #HLGoToMethodsCommand
  38. instanceVariableNames: ''
  39. package: 'Helios-Commands-Browser'!
  40. !HLGoToMethodsCommand methodsFor: 'executing'!
  41. execute
  42. self model focusOnMethods
  43. ! !
  44. !HLGoToMethodsCommand class methodsFor: 'accessing'!
  45. key
  46. ^ 'm'
  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. !
  62. label
  63. ^ 'Packages'
  64. ! !
  65. HLBrowserGoToCommand subclass: #HLGoToProtocolsCommand
  66. instanceVariableNames: ''
  67. package: 'Helios-Commands-Browser'!
  68. !HLGoToProtocolsCommand methodsFor: 'executing'!
  69. execute
  70. self model focusOnProtocols
  71. ! !
  72. !HLGoToProtocolsCommand class methodsFor: 'accessing'!
  73. key
  74. ^ 't'
  75. !
  76. label
  77. ^ 'Protocols'
  78. ! !
  79. HLBrowserGoToCommand subclass: #HLGoToSourceCodeCommand
  80. instanceVariableNames: ''
  81. package: 'Helios-Commands-Browser'!
  82. !HLGoToSourceCodeCommand methodsFor: 'executing'!
  83. execute
  84. self model focusOnSourceCode
  85. ! !
  86. !HLGoToSourceCodeCommand class methodsFor: 'accessing'!
  87. key
  88. ^ 's'
  89. !
  90. label
  91. ^ 'Source code'
  92. ! !
  93. HLBrowserCommand subclass: #HLEditCommentCommand
  94. instanceVariableNames: ''
  95. package: 'Helios-Commands-Browser'!
  96. !HLEditCommentCommand methodsFor: 'executing'!
  97. execute
  98. self model editComment
  99. ! !
  100. !HLEditCommentCommand methodsFor: 'testing'!
  101. isActive
  102. ^ self model showComment and: [ self model selectedClass notNil ]
  103. ! !
  104. !HLEditCommentCommand class methodsFor: 'accessing'!
  105. key
  106. ^ 'd'
  107. !
  108. label
  109. ^ 'Edit documentation'
  110. ! !
  111. HLBrowserCommand subclass: #HLToggleCommand
  112. instanceVariableNames: ''
  113. package: 'Helios-Commands-Browser'!
  114. !HLToggleCommand class methodsFor: 'accessing'!
  115. key
  116. ^ 't'
  117. !
  118. label
  119. ^ 'Toggle'
  120. ! !
  121. HLToggleCommand subclass: #HLToggleClassCommentCommand
  122. instanceVariableNames: ''
  123. package: 'Helios-Commands-Browser'!
  124. !HLToggleClassCommentCommand methodsFor: 'executing'!
  125. execute
  126. self model showComment: self model showComment not
  127. ! !
  128. !HLToggleClassCommentCommand class methodsFor: 'accessing'!
  129. key
  130. ^ 'd'
  131. !
  132. label
  133. ^ 'Documentation'
  134. ! !
  135. HLToggleCommand subclass: #HLToggleClassSideCommand
  136. instanceVariableNames: ''
  137. package: 'Helios-Commands-Browser'!
  138. !HLToggleClassSideCommand methodsFor: 'executing'!
  139. execute
  140. self model showInstance: false
  141. ! !
  142. !HLToggleClassSideCommand class methodsFor: 'accessing'!
  143. key
  144. ^ 'c'
  145. !
  146. label
  147. ^ 'Class side'
  148. ! !
  149. HLToggleCommand subclass: #HLToggleInstanceSideCommand
  150. instanceVariableNames: ''
  151. package: 'Helios-Commands-Browser'!
  152. !HLToggleInstanceSideCommand methodsFor: 'executing'!
  153. execute
  154. self model showInstance: true
  155. ! !
  156. !HLToggleInstanceSideCommand class methodsFor: 'accessing'!
  157. key
  158. ^ 'i'
  159. !
  160. label
  161. ^ 'Instance side'
  162. ! !