Helios-Announcements.st 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. Smalltalk createPackage: 'Helios-Announcements'!
  2. Object subclass: #HLAboutToChange
  3. slots: {#actionBlock}
  4. package: 'Helios-Announcements'!
  5. !HLAboutToChange commentStamp!
  6. I am announced whenever a change of context is about to be made, and unsaved changes could be lost.
  7. I am used within `HLModel` to handle such user actions. See `HLModel >> withChangesDo:`.!
  8. !HLAboutToChange methodsFor: 'accessing'!
  9. actionBlock
  10. ^ actionBlock
  11. !
  12. actionBlock: aBlock
  13. actionBlock := aBlock
  14. ! !
  15. Object subclass: #HLAnnouncement
  16. slots: {}
  17. package: 'Helios-Announcements'!
  18. !HLAnnouncement commentStamp!
  19. I am the root of the announcement class hierarchy used in the Helios UI.!
  20. !HLAnnouncement class methodsFor: 'helios'!
  21. heliosClass
  22. ^ 'announcement'
  23. ! !
  24. HLAnnouncement subclass: #HLCodeHandled
  25. slots: {#code}
  26. package: 'Helios-Announcements'!
  27. !HLCodeHandled commentStamp!
  28. I am the root class of announcements emitted by `HLCodeWidget`s!
  29. !HLCodeHandled methodsFor: 'accessing'!
  30. code
  31. ^ code
  32. !
  33. code: aModel
  34. code := aModel
  35. ! !
  36. !HLCodeHandled class methodsFor: 'actions'!
  37. on: aCodeModel
  38. ^ self new
  39. code: aCodeModel;
  40. yourself
  41. ! !
  42. HLCodeHandled subclass: #HLDoItExecuted
  43. slots: {}
  44. package: 'Helios-Announcements'!
  45. !HLDoItExecuted commentStamp!
  46. I am emitted by a `HLCodeWidget` after a DoIt has been executed.!
  47. HLAnnouncement subclass: #HLDebuggerAnnouncement
  48. slots: {#context}
  49. package: 'Helios-Announcements'!
  50. !HLDebuggerAnnouncement commentStamp!
  51. I am the root class of debugger announcements, and hold onto the debugged `context`.!
  52. !HLDebuggerAnnouncement methodsFor: 'accessing'!
  53. context
  54. ^ context
  55. !
  56. context: aContext
  57. context := aContext
  58. ! !
  59. HLDebuggerAnnouncement subclass: #HLDebuggerContextSelected
  60. slots: {}
  61. package: 'Helios-Announcements'!
  62. !HLDebuggerContextSelected commentStamp!
  63. I am announced when a new context is selected in a debugger, to update the user interface.!
  64. !HLDebuggerContextSelected methodsFor: 'accessing'!
  65. context
  66. ^ context
  67. !
  68. context: aContext
  69. context := aContext
  70. ! !
  71. HLDebuggerAnnouncement subclass: #HLDebuggerProceeded
  72. slots: {}
  73. package: 'Helios-Announcements'!
  74. HLDebuggerAnnouncement subclass: #HLDebuggerStepped
  75. slots: {}
  76. package: 'Helios-Announcements'!
  77. HLDebuggerAnnouncement subclass: #HLDebuggerWhere
  78. slots: {}
  79. package: 'Helios-Announcements'!
  80. HLAnnouncement subclass: #HLDiveRequested
  81. slots: {}
  82. package: 'Helios-Announcements'!
  83. HLAnnouncement subclass: #HLEditComment
  84. slots: {}
  85. package: 'Helios-Announcements'!
  86. HLAnnouncement subclass: #HLErrorRaised
  87. slots: {#error}
  88. package: 'Helios-Announcements'!
  89. !HLErrorRaised methodsFor: 'accessing'!
  90. error
  91. ^ error
  92. !
  93. error: anError
  94. error := anError
  95. ! !
  96. HLErrorRaised subclass: #HLCompileErrorRaised
  97. slots: {}
  98. package: 'Helios-Announcements'!
  99. HLErrorRaised subclass: #HLParseErrorRaised
  100. slots: {#line. #column. #message}
  101. package: 'Helios-Announcements'!
  102. !HLParseErrorRaised methodsFor: 'accessing'!
  103. column
  104. ^ column
  105. !
  106. column: anInteger
  107. column := anInteger
  108. !
  109. line
  110. ^ line
  111. !
  112. line: anInteger
  113. line := anInteger
  114. !
  115. message
  116. ^ message
  117. !
  118. message: aString
  119. message := aString
  120. ! !
  121. HLErrorRaised subclass: #HLUnknownVariableErrorRaised
  122. slots: {}
  123. package: 'Helios-Announcements'!
  124. HLAnnouncement subclass: #HLFocusRequested
  125. slots: {}
  126. package: 'Helios-Announcements'!
  127. HLFocusRequested subclass: #HLClassesFocusRequested
  128. slots: {}
  129. package: 'Helios-Announcements'!
  130. HLFocusRequested subclass: #HLDocumentationFocusRequested
  131. slots: {}
  132. package: 'Helios-Announcements'!
  133. HLFocusRequested subclass: #HLMethodsFocusRequested
  134. slots: {}
  135. package: 'Helios-Announcements'!
  136. HLFocusRequested subclass: #HLPackagesFocusRequested
  137. slots: {}
  138. package: 'Helios-Announcements'!
  139. HLFocusRequested subclass: #HLProtocolsFocusRequested
  140. slots: {}
  141. package: 'Helios-Announcements'!
  142. HLFocusRequested subclass: #HLSourceCodeFocusRequested
  143. slots: {}
  144. package: 'Helios-Announcements'!
  145. HLAnnouncement subclass: #HLInstVarAdded
  146. slots: {#theClass. #variableName}
  147. package: 'Helios-Announcements'!
  148. !HLInstVarAdded methodsFor: 'accessing'!
  149. theClass
  150. ^ theClass
  151. !
  152. theClass: aClass
  153. theClass := aClass
  154. !
  155. variableName
  156. ^ variableName
  157. !
  158. variableName: aString
  159. variableName := aString
  160. ! !
  161. HLAnnouncement subclass: #HLItemSelected
  162. slots: {#item. #soft}
  163. package: 'Helios-Announcements'!
  164. !HLItemSelected methodsFor: 'accessing'!
  165. beSoft
  166. soft := true
  167. !
  168. item
  169. ^ item
  170. !
  171. item: anObject
  172. item := anObject
  173. ! !
  174. !HLItemSelected methodsFor: 'initialization'!
  175. initialize
  176. super initialize.
  177. item := nil.
  178. soft := false
  179. ! !
  180. !HLItemSelected methodsFor: 'testing'!
  181. isSoft
  182. ^ soft
  183. ! !
  184. !HLItemSelected class methodsFor: 'instance creation'!
  185. on: anItem
  186. ^ self new
  187. item: anItem;
  188. yourself
  189. !
  190. softOn: anItem
  191. ^ self new
  192. item: anItem;
  193. beSoft;
  194. yourself
  195. ! !
  196. HLItemSelected subclass: #HLClassSelected
  197. slots: {}
  198. package: 'Helios-Announcements'!
  199. HLItemSelected subclass: #HLInstanceVariableSelected
  200. slots: {}
  201. package: 'Helios-Announcements'!
  202. HLItemSelected subclass: #HLMethodSelected
  203. slots: {}
  204. package: 'Helios-Announcements'!
  205. HLItemSelected subclass: #HLPackageSelected
  206. slots: {}
  207. package: 'Helios-Announcements'!
  208. HLItemSelected subclass: #HLProtocolSelected
  209. slots: {}
  210. package: 'Helios-Announcements'!
  211. HLAnnouncement subclass: #HLItemUnselected
  212. slots: {#item}
  213. package: 'Helios-Announcements'!
  214. !HLItemUnselected methodsFor: 'accessing'!
  215. item
  216. ^ item
  217. !
  218. item: anObject
  219. item := anObject
  220. ! !
  221. !HLItemUnselected class methodsFor: 'instance creation'!
  222. on: anItem
  223. ^ self new
  224. item: anItem;
  225. yourself
  226. ! !
  227. HLItemUnselected subclass: #HLClassUnselected
  228. slots: {}
  229. package: 'Helios-Announcements'!
  230. HLItemUnselected subclass: #HLPackageUnselected
  231. slots: {}
  232. package: 'Helios-Announcements'!
  233. HLAnnouncement subclass: #HLRunTests
  234. slots: {#testSuiteRunner}
  235. package: 'Helios-Announcements'!
  236. !HLRunTests methodsFor: 'accessing'!
  237. testSuiteRunner
  238. ^ testSuiteRunner
  239. !
  240. testSuiteRunner: anObject
  241. testSuiteRunner := anObject
  242. ! !
  243. !HLRunTests class methodsFor: 'instance creation'!
  244. on: aTestSuiteRunner
  245. ^self new
  246. testSuiteRunner: aTestSuiteRunner;
  247. yourself
  248. ! !
  249. HLAnnouncement subclass: #HLSaveSourceCode
  250. slots: {}
  251. package: 'Helios-Announcements'!
  252. HLAnnouncement subclass: #HLSearchReferences
  253. slots: {#searchString}
  254. package: 'Helios-Announcements'!
  255. !HLSearchReferences methodsFor: 'accessing'!
  256. searchString
  257. ^ searchString
  258. !
  259. searchString: aString
  260. searchString := aString
  261. ! !
  262. HLAnnouncement subclass: #HLShowCommentToggled
  263. slots: {}
  264. package: 'Helios-Announcements'!
  265. HLAnnouncement subclass: #HLShowInstanceToggled
  266. slots: {}
  267. package: 'Helios-Announcements'!
  268. HLAnnouncement subclass: #HLShowTemplate
  269. slots: {#template}
  270. package: 'Helios-Announcements'!
  271. !HLShowTemplate methodsFor: 'accessing'!
  272. template
  273. ^ template
  274. !
  275. template: aString
  276. template := aString
  277. ! !
  278. HLAnnouncement subclass: #HLSourceCodeSaved
  279. slots: {}
  280. package: 'Helios-Announcements'!
  281. HLAnnouncement subclass: #HLTabLabelChanged
  282. slots: {#label. #widget}
  283. package: 'Helios-Announcements'!
  284. !HLTabLabelChanged methodsFor: 'accessing'!
  285. label
  286. ^ label
  287. !
  288. label: aString
  289. label := aString
  290. !
  291. widget
  292. ^ widget
  293. !
  294. widget: aWidget
  295. widget := aWidget
  296. ! !