2
0

Helios-Announcements.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  1. define("amber_core/Helios-Announcements", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_vm/globals", "amber_core/Kernel-Objects"], function(smalltalk,nil,_st, globals){
  2. smalltalk.addPackage('Helios-Announcements');
  3. smalltalk.packages["Helios-Announcements"].transport = {"type":"amd","amdNamespace":"amber_core"};
  4. smalltalk.addClass('HLAboutToChange', globals.Object, ['actionBlock'], 'Helios-Announcements');
  5. globals.HLAboutToChange.comment="I am announced whenever a change of context is about to be made, and unsaved changes could be lost.\x0a\x0aI am used within `HLModel` to handle such user actions. See `HLModel >> withChangesDo:`.";
  6. smalltalk.addMethod(
  7. smalltalk.method({
  8. selector: "actionBlock",
  9. protocol: 'accessing',
  10. fn: function (){
  11. var self=this;
  12. var $1;
  13. $1=self["@actionBlock"];
  14. return $1;
  15. },
  16. args: [],
  17. source: "actionBlock\x0a\x09^ actionBlock",
  18. messageSends: [],
  19. referencedClasses: []
  20. }),
  21. globals.HLAboutToChange);
  22. smalltalk.addMethod(
  23. smalltalk.method({
  24. selector: "actionBlock:",
  25. protocol: 'accessing',
  26. fn: function (aBlock){
  27. var self=this;
  28. self["@actionBlock"]=aBlock;
  29. return self},
  30. args: ["aBlock"],
  31. source: "actionBlock: aBlock\x0a\x09actionBlock := aBlock",
  32. messageSends: [],
  33. referencedClasses: []
  34. }),
  35. globals.HLAboutToChange);
  36. smalltalk.addClass('HLAnnouncement', globals.Object, [], 'Helios-Announcements');
  37. globals.HLAnnouncement.comment="I am the root of the announcement class hierarchy used in the Helios UI.";
  38. smalltalk.addMethod(
  39. smalltalk.method({
  40. selector: "heliosClass",
  41. protocol: 'helios',
  42. fn: function (){
  43. var self=this;
  44. return "announcement";
  45. },
  46. args: [],
  47. source: "heliosClass\x0a\x09^ 'announcement'",
  48. messageSends: [],
  49. referencedClasses: []
  50. }),
  51. globals.HLAnnouncement.klass);
  52. smalltalk.addClass('HLCodeHandled', globals.HLAnnouncement, ['code'], 'Helios-Announcements');
  53. globals.HLCodeHandled.comment="I am the root class of announcements emitted by `HLCodeWidget`s";
  54. smalltalk.addMethod(
  55. smalltalk.method({
  56. selector: "code",
  57. protocol: 'accessing',
  58. fn: function (){
  59. var self=this;
  60. var $1;
  61. $1=self["@code"];
  62. return $1;
  63. },
  64. args: [],
  65. source: "code\x0a\x0a\x09^ code",
  66. messageSends: [],
  67. referencedClasses: []
  68. }),
  69. globals.HLCodeHandled);
  70. smalltalk.addMethod(
  71. smalltalk.method({
  72. selector: "code:",
  73. protocol: 'accessing',
  74. fn: function (aModel){
  75. var self=this;
  76. self["@code"]=aModel;
  77. return self},
  78. args: ["aModel"],
  79. source: "code: aModel\x0a\x0a\x09code := aModel",
  80. messageSends: [],
  81. referencedClasses: []
  82. }),
  83. globals.HLCodeHandled);
  84. smalltalk.addMethod(
  85. smalltalk.method({
  86. selector: "on:",
  87. protocol: 'actions',
  88. fn: function (aCodeModel){
  89. var self=this;
  90. return smalltalk.withContext(function($ctx1) {
  91. var $2,$3,$1;
  92. $2=self._new();
  93. _st($2)._code_(aCodeModel);
  94. $3=_st($2)._yourself();
  95. $1=$3;
  96. return $1;
  97. }, function($ctx1) {$ctx1.fill(self,"on:",{aCodeModel:aCodeModel},globals.HLCodeHandled.klass)})},
  98. args: ["aCodeModel"],
  99. source: "on: aCodeModel\x0a\x0a\x09^ self new \x0a \x09code: aCodeModel;\x0a yourself",
  100. messageSends: ["code:", "new", "yourself"],
  101. referencedClasses: []
  102. }),
  103. globals.HLCodeHandled.klass);
  104. smalltalk.addClass('HLDoItExecuted', globals.HLCodeHandled, [], 'Helios-Announcements');
  105. globals.HLDoItExecuted.comment="I am emitted by a `HLCodeWidget` after a DoIt has been executed.";
  106. smalltalk.addClass('HLDoItRequested', globals.HLCodeHandled, [], 'Helios-Announcements');
  107. globals.HLDoItRequested.comment="I am emitted by a `HLCodeWidget` before a DoIt is executed.";
  108. smalltalk.addClass('HLInspectItRequested', globals.HLCodeHandled, [], 'Helios-Announcements');
  109. globals.HLInspectItRequested.comment="I am emitted by a `HLCodeWidget` before an object is inspected.";
  110. smalltalk.addClass('HLPrintItRequested', globals.HLCodeHandled, [], 'Helios-Announcements');
  111. globals.HLPrintItRequested.comment="I am emitted by a `HLCodeWidget` before an object is printed.";
  112. smalltalk.addClass('HLDebuggerAnnouncement', globals.HLAnnouncement, ['context'], 'Helios-Announcements');
  113. globals.HLDebuggerAnnouncement.comment="I am the root class of debugger announcements, and hold onto the debugged `context`.";
  114. smalltalk.addMethod(
  115. smalltalk.method({
  116. selector: "context",
  117. protocol: 'accessing',
  118. fn: function (){
  119. var self=this;
  120. var $1;
  121. $1=self["@context"];
  122. return $1;
  123. },
  124. args: [],
  125. source: "context\x0a\x09^ context",
  126. messageSends: [],
  127. referencedClasses: []
  128. }),
  129. globals.HLDebuggerAnnouncement);
  130. smalltalk.addMethod(
  131. smalltalk.method({
  132. selector: "context:",
  133. protocol: 'accessing',
  134. fn: function (aContext){
  135. var self=this;
  136. self["@context"]=aContext;
  137. return self},
  138. args: ["aContext"],
  139. source: "context: aContext\x0a\x09context := aContext",
  140. messageSends: [],
  141. referencedClasses: []
  142. }),
  143. globals.HLDebuggerAnnouncement);
  144. smalltalk.addClass('HLDebuggerContextSelected', globals.HLDebuggerAnnouncement, [], 'Helios-Announcements');
  145. globals.HLDebuggerContextSelected.comment="I am announced when a new context is selected in a debugger, to update the user interface.";
  146. smalltalk.addMethod(
  147. smalltalk.method({
  148. selector: "context",
  149. protocol: 'accessing',
  150. fn: function (){
  151. var self=this;
  152. var $1;
  153. $1=self["@context"];
  154. return $1;
  155. },
  156. args: [],
  157. source: "context\x0a\x09^ context",
  158. messageSends: [],
  159. referencedClasses: []
  160. }),
  161. globals.HLDebuggerContextSelected);
  162. smalltalk.addMethod(
  163. smalltalk.method({
  164. selector: "context:",
  165. protocol: 'accessing',
  166. fn: function (aContext){
  167. var self=this;
  168. self["@context"]=aContext;
  169. return self},
  170. args: ["aContext"],
  171. source: "context: aContext\x0a\x09context := aContext",
  172. messageSends: [],
  173. referencedClasses: []
  174. }),
  175. globals.HLDebuggerContextSelected);
  176. smalltalk.addClass('HLDebuggerStepped', globals.HLDebuggerAnnouncement, [], 'Helios-Announcements');
  177. smalltalk.addClass('HLDebuggerWhere', globals.HLDebuggerAnnouncement, [], 'Helios-Announcements');
  178. smalltalk.addClass('HLDiveRequested', globals.HLAnnouncement, [], 'Helios-Announcements');
  179. smalltalk.addClass('HLEditComment', globals.HLAnnouncement, [], 'Helios-Announcements');
  180. smalltalk.addClass('HLErrorRaised', globals.HLAnnouncement, ['error'], 'Helios-Announcements');
  181. smalltalk.addMethod(
  182. smalltalk.method({
  183. selector: "error",
  184. protocol: 'accessing',
  185. fn: function (){
  186. var self=this;
  187. var $1;
  188. $1=self["@error"];
  189. return $1;
  190. },
  191. args: [],
  192. source: "error\x0a\x09^ error",
  193. messageSends: [],
  194. referencedClasses: []
  195. }),
  196. globals.HLErrorRaised);
  197. smalltalk.addMethod(
  198. smalltalk.method({
  199. selector: "error:",
  200. protocol: 'accessing',
  201. fn: function (anError){
  202. var self=this;
  203. self["@error"]=anError;
  204. return self},
  205. args: ["anError"],
  206. source: "error: anError\x0a\x09error := anError",
  207. messageSends: [],
  208. referencedClasses: []
  209. }),
  210. globals.HLErrorRaised);
  211. smalltalk.addClass('HLCompileErrorRaised', globals.HLErrorRaised, [], 'Helios-Announcements');
  212. smalltalk.addClass('HLParseErrorRaised', globals.HLErrorRaised, ['line', 'column', 'message'], 'Helios-Announcements');
  213. smalltalk.addMethod(
  214. smalltalk.method({
  215. selector: "column",
  216. protocol: 'accessing',
  217. fn: function (){
  218. var self=this;
  219. var $1;
  220. $1=self["@column"];
  221. return $1;
  222. },
  223. args: [],
  224. source: "column\x0a\x09^ column",
  225. messageSends: [],
  226. referencedClasses: []
  227. }),
  228. globals.HLParseErrorRaised);
  229. smalltalk.addMethod(
  230. smalltalk.method({
  231. selector: "column:",
  232. protocol: 'accessing',
  233. fn: function (anInteger){
  234. var self=this;
  235. self["@column"]=anInteger;
  236. return self},
  237. args: ["anInteger"],
  238. source: "column: anInteger\x0a\x09column := anInteger",
  239. messageSends: [],
  240. referencedClasses: []
  241. }),
  242. globals.HLParseErrorRaised);
  243. smalltalk.addMethod(
  244. smalltalk.method({
  245. selector: "line",
  246. protocol: 'accessing',
  247. fn: function (){
  248. var self=this;
  249. var $1;
  250. $1=self["@line"];
  251. return $1;
  252. },
  253. args: [],
  254. source: "line\x0a\x09^ line",
  255. messageSends: [],
  256. referencedClasses: []
  257. }),
  258. globals.HLParseErrorRaised);
  259. smalltalk.addMethod(
  260. smalltalk.method({
  261. selector: "line:",
  262. protocol: 'accessing',
  263. fn: function (anInteger){
  264. var self=this;
  265. self["@line"]=anInteger;
  266. return self},
  267. args: ["anInteger"],
  268. source: "line: anInteger\x0a\x09line := anInteger",
  269. messageSends: [],
  270. referencedClasses: []
  271. }),
  272. globals.HLParseErrorRaised);
  273. smalltalk.addMethod(
  274. smalltalk.method({
  275. selector: "message",
  276. protocol: 'accessing',
  277. fn: function (){
  278. var self=this;
  279. var $1;
  280. $1=self["@message"];
  281. return $1;
  282. },
  283. args: [],
  284. source: "message\x0a\x09^ message",
  285. messageSends: [],
  286. referencedClasses: []
  287. }),
  288. globals.HLParseErrorRaised);
  289. smalltalk.addMethod(
  290. smalltalk.method({
  291. selector: "message:",
  292. protocol: 'accessing',
  293. fn: function (aString){
  294. var self=this;
  295. self["@message"]=aString;
  296. return self},
  297. args: ["aString"],
  298. source: "message: aString\x0a\x09message := aString",
  299. messageSends: [],
  300. referencedClasses: []
  301. }),
  302. globals.HLParseErrorRaised);
  303. smalltalk.addClass('HLUnknownVariableErrorRaised', globals.HLErrorRaised, [], 'Helios-Announcements');
  304. smalltalk.addClass('HLFocusRequested', globals.HLAnnouncement, [], 'Helios-Announcements');
  305. smalltalk.addClass('HLClassesFocusRequested', globals.HLFocusRequested, [], 'Helios-Announcements');
  306. smalltalk.addClass('HLMethodsFocusRequested', globals.HLFocusRequested, [], 'Helios-Announcements');
  307. smalltalk.addClass('HLPackagesFocusRequested', globals.HLFocusRequested, [], 'Helios-Announcements');
  308. smalltalk.addClass('HLProtocolsFocusRequested', globals.HLFocusRequested, [], 'Helios-Announcements');
  309. smalltalk.addClass('HLSourceCodeFocusRequested', globals.HLFocusRequested, [], 'Helios-Announcements');
  310. smalltalk.addClass('HLInstVarAdded', globals.HLAnnouncement, ['theClass', 'variableName'], 'Helios-Announcements');
  311. smalltalk.addMethod(
  312. smalltalk.method({
  313. selector: "theClass",
  314. protocol: 'accessing',
  315. fn: function (){
  316. var self=this;
  317. var $1;
  318. $1=self["@theClass"];
  319. return $1;
  320. },
  321. args: [],
  322. source: "theClass\x0a\x09^ theClass",
  323. messageSends: [],
  324. referencedClasses: []
  325. }),
  326. globals.HLInstVarAdded);
  327. smalltalk.addMethod(
  328. smalltalk.method({
  329. selector: "theClass:",
  330. protocol: 'accessing',
  331. fn: function (aClass){
  332. var self=this;
  333. self["@theClass"]=aClass;
  334. return self},
  335. args: ["aClass"],
  336. source: "theClass: aClass\x0a\x09theClass := aClass",
  337. messageSends: [],
  338. referencedClasses: []
  339. }),
  340. globals.HLInstVarAdded);
  341. smalltalk.addMethod(
  342. smalltalk.method({
  343. selector: "variableName",
  344. protocol: 'accessing',
  345. fn: function (){
  346. var self=this;
  347. var $1;
  348. $1=self["@variableName"];
  349. return $1;
  350. },
  351. args: [],
  352. source: "variableName\x0a\x09^ variableName",
  353. messageSends: [],
  354. referencedClasses: []
  355. }),
  356. globals.HLInstVarAdded);
  357. smalltalk.addMethod(
  358. smalltalk.method({
  359. selector: "variableName:",
  360. protocol: 'accessing',
  361. fn: function (aString){
  362. var self=this;
  363. self["@variableName"]=aString;
  364. return self},
  365. args: ["aString"],
  366. source: "variableName: aString\x0a\x09variableName := aString",
  367. messageSends: [],
  368. referencedClasses: []
  369. }),
  370. globals.HLInstVarAdded);
  371. smalltalk.addClass('HLItemSelected', globals.HLAnnouncement, ['item'], 'Helios-Announcements');
  372. smalltalk.addMethod(
  373. smalltalk.method({
  374. selector: "item",
  375. protocol: 'accessing',
  376. fn: function (){
  377. var self=this;
  378. var $1;
  379. $1=self["@item"];
  380. return $1;
  381. },
  382. args: [],
  383. source: "item\x0a\x09^ item",
  384. messageSends: [],
  385. referencedClasses: []
  386. }),
  387. globals.HLItemSelected);
  388. smalltalk.addMethod(
  389. smalltalk.method({
  390. selector: "item:",
  391. protocol: 'accessing',
  392. fn: function (anObject){
  393. var self=this;
  394. self["@item"]=anObject;
  395. return self},
  396. args: ["anObject"],
  397. source: "item: anObject\x0a\x09item := anObject",
  398. messageSends: [],
  399. referencedClasses: []
  400. }),
  401. globals.HLItemSelected);
  402. smalltalk.addMethod(
  403. smalltalk.method({
  404. selector: "on:",
  405. protocol: 'instance creation',
  406. fn: function (anItem){
  407. var self=this;
  408. return smalltalk.withContext(function($ctx1) {
  409. var $2,$3,$1;
  410. $2=self._new();
  411. _st($2)._item_(anItem);
  412. $3=_st($2)._yourself();
  413. $1=$3;
  414. return $1;
  415. }, function($ctx1) {$ctx1.fill(self,"on:",{anItem:anItem},globals.HLItemSelected.klass)})},
  416. args: ["anItem"],
  417. source: "on: anItem\x0a\x09^ self new\x0a \x09item: anItem;\x0a yourself",
  418. messageSends: ["item:", "new", "yourself"],
  419. referencedClasses: []
  420. }),
  421. globals.HLItemSelected.klass);
  422. smalltalk.addClass('HLClassSelected', globals.HLItemSelected, [], 'Helios-Announcements');
  423. smalltalk.addClass('HLInstanceVariableSelected', globals.HLItemSelected, [], 'Helios-Announcements');
  424. smalltalk.addClass('HLMethodSelected', globals.HLItemSelected, [], 'Helios-Announcements');
  425. smalltalk.addClass('HLPackageSelected', globals.HLItemSelected, [], 'Helios-Announcements');
  426. smalltalk.addClass('HLProtocolSelected', globals.HLItemSelected, [], 'Helios-Announcements');
  427. smalltalk.addClass('HLSaveSourceCode', globals.HLAnnouncement, [], 'Helios-Announcements');
  428. smalltalk.addClass('HLSearchReferences', globals.HLAnnouncement, ['searchString'], 'Helios-Announcements');
  429. smalltalk.addMethod(
  430. smalltalk.method({
  431. selector: "searchString",
  432. protocol: 'accessing',
  433. fn: function (){
  434. var self=this;
  435. var $1;
  436. $1=self["@searchString"];
  437. return $1;
  438. },
  439. args: [],
  440. source: "searchString\x0a\x09^ searchString",
  441. messageSends: [],
  442. referencedClasses: []
  443. }),
  444. globals.HLSearchReferences);
  445. smalltalk.addMethod(
  446. smalltalk.method({
  447. selector: "searchString:",
  448. protocol: 'accessing',
  449. fn: function (aString){
  450. var self=this;
  451. self["@searchString"]=aString;
  452. return self},
  453. args: ["aString"],
  454. source: "searchString: aString\x0a\x09searchString := aString",
  455. messageSends: [],
  456. referencedClasses: []
  457. }),
  458. globals.HLSearchReferences);
  459. smalltalk.addClass('HLShowCommentToggled', globals.HLAnnouncement, [], 'Helios-Announcements');
  460. smalltalk.addClass('HLShowInstanceToggled', globals.HLAnnouncement, [], 'Helios-Announcements');
  461. smalltalk.addClass('HLShowTemplate', globals.HLAnnouncement, ['template'], 'Helios-Announcements');
  462. smalltalk.addMethod(
  463. smalltalk.method({
  464. selector: "template",
  465. protocol: 'accessing',
  466. fn: function (){
  467. var self=this;
  468. var $1;
  469. $1=self["@template"];
  470. return $1;
  471. },
  472. args: [],
  473. source: "template\x0a\x09^ template",
  474. messageSends: [],
  475. referencedClasses: []
  476. }),
  477. globals.HLShowTemplate);
  478. smalltalk.addMethod(
  479. smalltalk.method({
  480. selector: "template:",
  481. protocol: 'accessing',
  482. fn: function (aString){
  483. var self=this;
  484. self["@template"]=aString;
  485. return self},
  486. args: ["aString"],
  487. source: "template: aString\x0a\x09template := aString",
  488. messageSends: [],
  489. referencedClasses: []
  490. }),
  491. globals.HLShowTemplate);
  492. smalltalk.addClass('HLSourceCodeSaved', globals.HLAnnouncement, [], 'Helios-Announcements');
  493. });