2
0

Helios-Commands.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. smalltalk.addPackage('Helios-Commands', {});
  2. smalltalk.addClass('HLCommand', smalltalk.Object, [], 'Helios-Commands');
  3. smalltalk.addMethod(
  4. "_asBinding",
  5. smalltalk.method({
  6. selector: "asBinding",
  7. category: 'converting',
  8. fn: function () {
  9. var self = this;
  10. var $1;
  11. $1 = smalltalk.send(smalltalk.send(smalltalk.HLBindingAction || HLBindingAction, "_on_labelled_", [smalltalk.send(self, "_key", []), smalltalk.send(self, "_label", [])]), "_callback_", [function () {return smalltalk.send(self, "_execute", []);}]);
  12. return $1;
  13. },
  14. args: [],
  15. source: "asBinding\x0a\x09^ (HLBindingAction on: self key labelled: self label)\x0a \x09callback: [ self execute ]",
  16. messageSends: ["callback:", "execute", "on:labelled:", "key", "label"],
  17. referencedClasses: ["HLBindingAction"]
  18. }),
  19. smalltalk.HLCommand);
  20. smalltalk.addMethod(
  21. "_documentation",
  22. smalltalk.method({
  23. selector: "documentation",
  24. category: 'accessing',
  25. fn: function () {
  26. var self = this;
  27. var $1;
  28. $1 = smalltalk.send(smalltalk.send(self, "_class", []), "_documentation", []);
  29. return $1;
  30. },
  31. args: [],
  32. source: "documentation\x0a\x09^ self class documentation",
  33. messageSends: ["documentation", "class"],
  34. referencedClasses: []
  35. }),
  36. smalltalk.HLCommand);
  37. smalltalk.addMethod(
  38. "_execute",
  39. smalltalk.method({
  40. selector: "execute",
  41. category: 'executing',
  42. fn: function () {
  43. var self = this;
  44. return self;
  45. },
  46. args: [],
  47. source: "execute\x0a\x09",
  48. messageSends: [],
  49. referencedClasses: []
  50. }),
  51. smalltalk.HLCommand);
  52. smalltalk.addMethod(
  53. "_key",
  54. smalltalk.method({
  55. selector: "key",
  56. category: 'accessing',
  57. fn: function () {
  58. var self = this;
  59. var $1;
  60. $1 = smalltalk.send(smalltalk.send(self, "_class", []), "_key", []);
  61. return $1;
  62. },
  63. args: [],
  64. source: "key\x0a\x09^ self class key",
  65. messageSends: ["key", "class"],
  66. referencedClasses: []
  67. }),
  68. smalltalk.HLCommand);
  69. smalltalk.addMethod(
  70. "_label",
  71. smalltalk.method({
  72. selector: "label",
  73. category: 'accessing',
  74. fn: function () {
  75. var self = this;
  76. var $1;
  77. $1 = smalltalk.send(smalltalk.send(self, "_class", []), "_label", []);
  78. return $1;
  79. },
  80. args: [],
  81. source: "label\x0a\x09^ self class label",
  82. messageSends: ["label", "class"],
  83. referencedClasses: []
  84. }),
  85. smalltalk.HLCommand);
  86. smalltalk.addMethod(
  87. "_bindingGroup",
  88. smalltalk.method({
  89. selector: "bindingGroup",
  90. category: 'accessing',
  91. fn: function () {
  92. var self = this;
  93. return nil;
  94. },
  95. args: [],
  96. source: "bindingGroup\x0a\x09^ nil",
  97. messageSends: [],
  98. referencedClasses: []
  99. }),
  100. smalltalk.HLCommand.klass);
  101. smalltalk.addMethod(
  102. "_documentation",
  103. smalltalk.method({
  104. selector: "documentation",
  105. category: 'accessing',
  106. fn: function () {
  107. var self = this;
  108. return "";
  109. },
  110. args: [],
  111. source: "documentation\x0a\x09^ ''",
  112. messageSends: [],
  113. referencedClasses: []
  114. }),
  115. smalltalk.HLCommand.klass);
  116. smalltalk.addMethod(
  117. "_key",
  118. smalltalk.method({
  119. selector: "key",
  120. category: 'accessing',
  121. fn: function () {
  122. var self = this;
  123. return nil;
  124. },
  125. args: [],
  126. source: "key\x0a\x09^ nil",
  127. messageSends: [],
  128. referencedClasses: []
  129. }),
  130. smalltalk.HLCommand.klass);
  131. smalltalk.addMethod(
  132. "_label",
  133. smalltalk.method({
  134. selector: "label",
  135. category: 'accessing',
  136. fn: function () {
  137. var self = this;
  138. return "";
  139. },
  140. args: [],
  141. source: "label\x0a\x09^ ''",
  142. messageSends: [],
  143. referencedClasses: []
  144. }),
  145. smalltalk.HLCommand.klass);
  146. smalltalk.addClass('HLBrowserCommand', smalltalk.HLCommand, ['model'], 'Helios-Commands');
  147. smalltalk.addMethod(
  148. "_model",
  149. smalltalk.method({
  150. selector: "model",
  151. category: 'accessing',
  152. fn: function () {
  153. var self = this;
  154. return self['@model'];
  155. },
  156. args: [],
  157. source: "model\x0a\x09^ model",
  158. messageSends: [],
  159. referencedClasses: []
  160. }),
  161. smalltalk.HLBrowserCommand);
  162. smalltalk.addMethod(
  163. "_model_",
  164. smalltalk.method({
  165. selector: "model:",
  166. category: 'accessing',
  167. fn: function (aBrowserModel) {
  168. var self = this;
  169. self['@model'] = aBrowserModel;
  170. return self;
  171. },
  172. args: ["aBrowserModel"],
  173. source: "model: aBrowserModel\x0a\x09model := aBrowserModel",
  174. messageSends: [],
  175. referencedClasses: []
  176. }),
  177. smalltalk.HLBrowserCommand);
  178. smalltalk.addMethod(
  179. "_on_",
  180. smalltalk.method({
  181. selector: "on:",
  182. category: 'instance creation',
  183. fn: function (aBrowserModel) {
  184. var self = this;
  185. var $2, $3, $1;
  186. $2 = smalltalk.send(self, "_new", []);
  187. smalltalk.send($2, "_model_", [aBrowserModel]);
  188. $3 = smalltalk.send($2, "_yourself", []);
  189. $1 = $3;
  190. return $1;
  191. },
  192. args: ["aBrowserModel"],
  193. source: "on: aBrowserModel\x0a\x09^ self new\x0a \x09model: aBrowserModel;\x0a yourself",
  194. messageSends: ["model:", "new", "yourself"],
  195. referencedClasses: []
  196. }),
  197. smalltalk.HLBrowserCommand.klass);
  198. smalltalk.addClass('HLGoToCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands');
  199. smalltalk.addMethod(
  200. "_bindingGroup",
  201. smalltalk.method({
  202. selector: "bindingGroup",
  203. category: 'accessing',
  204. fn: function () {
  205. var self = this;
  206. return "Go to";
  207. },
  208. args: [],
  209. source: "bindingGroup\x0a\x09^ 'Go to'",
  210. messageSends: [],
  211. referencedClasses: []
  212. }),
  213. smalltalk.HLGoToCommand.klass);
  214. smalltalk.addClass('HLGoToClassesCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
  215. smalltalk.addMethod(
  216. "_execute",
  217. smalltalk.method({
  218. selector: "execute",
  219. category: 'executing',
  220. fn: function () {
  221. var self = this;
  222. smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedClass", [])]);
  223. return self;
  224. },
  225. args: [],
  226. source: "execute\x0a\x09self model selectedClass: self model selectedClass",
  227. messageSends: ["selectedClass:", "selectedClass", "model"],
  228. referencedClasses: []
  229. }),
  230. smalltalk.HLGoToClassesCommand);
  231. smalltalk.addMethod(
  232. "_key",
  233. smalltalk.method({
  234. selector: "key",
  235. category: 'accessing',
  236. fn: function () {
  237. var self = this;
  238. return 67;
  239. },
  240. args: [],
  241. source: "key\x0a\x09\x22c\x22\x0a \x0a\x09^ 67",
  242. messageSends: [],
  243. referencedClasses: []
  244. }),
  245. smalltalk.HLGoToClassesCommand.klass);
  246. smalltalk.addMethod(
  247. "_label",
  248. smalltalk.method({
  249. selector: "label",
  250. category: 'accessing',
  251. fn: function () {
  252. var self = this;
  253. return "Classes";
  254. },
  255. args: [],
  256. source: "label\x0a\x09^ 'Classes'",
  257. messageSends: [],
  258. referencedClasses: []
  259. }),
  260. smalltalk.HLGoToClassesCommand.klass);
  261. smalltalk.addClass('HLGoToMethodsCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
  262. smalltalk.addMethod(
  263. "_execute",
  264. smalltalk.method({
  265. selector: "execute",
  266. category: 'executing',
  267. fn: function () {
  268. var self = this;
  269. smalltalk.send(smalltalk.send(self, "_model", []), "_selectedMethod_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedMethod", [])]);
  270. return self;
  271. },
  272. args: [],
  273. source: "execute\x0a\x09self model selectedMethod: self model selectedMethod",
  274. messageSends: ["selectedMethod:", "selectedMethod", "model"],
  275. referencedClasses: []
  276. }),
  277. smalltalk.HLGoToMethodsCommand);
  278. smalltalk.addMethod(
  279. "_key",
  280. smalltalk.method({
  281. selector: "key",
  282. category: 'accessing',
  283. fn: function () {
  284. var self = this;
  285. return 77;
  286. },
  287. args: [],
  288. source: "key\x0a\x09\x22m\x22\x0a \x0a\x09^ 77",
  289. messageSends: [],
  290. referencedClasses: []
  291. }),
  292. smalltalk.HLGoToMethodsCommand.klass);
  293. smalltalk.addMethod(
  294. "_label",
  295. smalltalk.method({
  296. selector: "label",
  297. category: 'accessing',
  298. fn: function () {
  299. var self = this;
  300. return "Methods";
  301. },
  302. args: [],
  303. source: "label\x0a\x09^ 'Methods'",
  304. messageSends: [],
  305. referencedClasses: []
  306. }),
  307. smalltalk.HLGoToMethodsCommand.klass);
  308. smalltalk.addClass('HLGoToPackagesCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
  309. smalltalk.addMethod(
  310. "_execute",
  311. smalltalk.method({
  312. selector: "execute",
  313. category: 'executing',
  314. fn: function () {
  315. var self = this;
  316. smalltalk.send(smalltalk.send(self, "_model", []), "_selectedPackage_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedPackage", [])]);
  317. return self;
  318. },
  319. args: [],
  320. source: "execute\x0a\x09self model selectedPackage: self model selectedPackage",
  321. messageSends: ["selectedPackage:", "selectedPackage", "model"],
  322. referencedClasses: []
  323. }),
  324. smalltalk.HLGoToPackagesCommand);
  325. smalltalk.addMethod(
  326. "_key",
  327. smalltalk.method({
  328. selector: "key",
  329. category: 'accessing',
  330. fn: function () {
  331. var self = this;
  332. return 80;
  333. },
  334. args: [],
  335. source: "key\x0a\x09\x22p\x22\x0a \x0a\x09^ 80",
  336. messageSends: [],
  337. referencedClasses: []
  338. }),
  339. smalltalk.HLGoToPackagesCommand.klass);
  340. smalltalk.addMethod(
  341. "_label",
  342. smalltalk.method({
  343. selector: "label",
  344. category: 'accessing',
  345. fn: function () {
  346. var self = this;
  347. return "Packages";
  348. },
  349. args: [],
  350. source: "label\x0a\x09^ 'Packages'",
  351. messageSends: [],
  352. referencedClasses: []
  353. }),
  354. smalltalk.HLGoToPackagesCommand.klass);
  355. smalltalk.addClass('HLGoToProtocolsCommand', smalltalk.HLGoToCommand, [], 'Helios-Commands');
  356. smalltalk.addMethod(
  357. "_execute",
  358. smalltalk.method({
  359. selector: "execute",
  360. category: 'executing',
  361. fn: function () {
  362. var self = this;
  363. smalltalk.send(smalltalk.send(self, "_model", []), "_selectedProtocol_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedProtocol", [])]);
  364. return self;
  365. },
  366. args: [],
  367. source: "execute\x0a\x09self model selectedProtocol: self model selectedProtocol",
  368. messageSends: ["selectedProtocol:", "selectedProtocol", "model"],
  369. referencedClasses: []
  370. }),
  371. smalltalk.HLGoToProtocolsCommand);
  372. smalltalk.addMethod(
  373. "_key",
  374. smalltalk.method({
  375. selector: "key",
  376. category: 'accessing',
  377. fn: function () {
  378. var self = this;
  379. return 84;
  380. },
  381. args: [],
  382. source: "key\x0a\x09\x22p\x22\x0a \x0a\x09^ 84",
  383. messageSends: [],
  384. referencedClasses: []
  385. }),
  386. smalltalk.HLGoToProtocolsCommand.klass);
  387. smalltalk.addMethod(
  388. "_label",
  389. smalltalk.method({
  390. selector: "label",
  391. category: 'accessing',
  392. fn: function () {
  393. var self = this;
  394. return "Protocols";
  395. },
  396. args: [],
  397. source: "label\x0a\x09^ 'Protocols'",
  398. messageSends: [],
  399. referencedClasses: []
  400. }),
  401. smalltalk.HLGoToProtocolsCommand.klass);
  402. smalltalk.addClass('HLToggleCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands');
  403. smalltalk.addMethod(
  404. "_bindingGroup",
  405. smalltalk.method({
  406. selector: "bindingGroup",
  407. category: 'accessing',
  408. fn: function () {
  409. var self = this;
  410. return "Toggle";
  411. },
  412. args: [],
  413. source: "bindingGroup\x0a\x09^ 'Toggle'",
  414. messageSends: [],
  415. referencedClasses: []
  416. }),
  417. smalltalk.HLToggleCommand.klass);
  418. smalltalk.addClass('HLToggleClassSideCommand', smalltalk.HLToggleCommand, [], 'Helios-Commands');
  419. smalltalk.addMethod(
  420. "_execute",
  421. smalltalk.method({
  422. selector: "execute",
  423. category: 'executing',
  424. fn: function () {
  425. var self = this;
  426. smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance_", [false]);
  427. return self;
  428. },
  429. args: [],
  430. source: "execute\x0a\x09self model showInstance: false",
  431. messageSends: ["showInstance:", "model"],
  432. referencedClasses: []
  433. }),
  434. smalltalk.HLToggleClassSideCommand);
  435. smalltalk.addMethod(
  436. "_key",
  437. smalltalk.method({
  438. selector: "key",
  439. category: 'accessing',
  440. fn: function () {
  441. var self = this;
  442. return 67;
  443. },
  444. args: [],
  445. source: "key\x0a\x09\x22c\x22\x0a \x0a\x09^ 67",
  446. messageSends: [],
  447. referencedClasses: []
  448. }),
  449. smalltalk.HLToggleClassSideCommand.klass);
  450. smalltalk.addMethod(
  451. "_label",
  452. smalltalk.method({
  453. selector: "label",
  454. category: 'accessing',
  455. fn: function () {
  456. var self = this;
  457. return "Class side";
  458. },
  459. args: [],
  460. source: "label\x0a\x09^ 'Class side'",
  461. messageSends: [],
  462. referencedClasses: []
  463. }),
  464. smalltalk.HLToggleClassSideCommand.klass);
  465. smalltalk.addClass('HLToggleInstanceSideCommand', smalltalk.HLToggleCommand, [], 'Helios-Commands');
  466. smalltalk.addMethod(
  467. "_execute",
  468. smalltalk.method({
  469. selector: "execute",
  470. category: 'executing',
  471. fn: function () {
  472. var self = this;
  473. smalltalk.send(smalltalk.send(self, "_model", []), "_showInstance_", [true]);
  474. return self;
  475. },
  476. args: [],
  477. source: "execute\x0a\x09self model showInstance: true",
  478. messageSends: ["showInstance:", "model"],
  479. referencedClasses: []
  480. }),
  481. smalltalk.HLToggleInstanceSideCommand);
  482. smalltalk.addMethod(
  483. "_key",
  484. smalltalk.method({
  485. selector: "key",
  486. category: 'accessing',
  487. fn: function () {
  488. var self = this;
  489. return 73;
  490. },
  491. args: [],
  492. source: "key\x0a\x09\x22i\x22\x0a \x0a\x09^ 73",
  493. messageSends: [],
  494. referencedClasses: []
  495. }),
  496. smalltalk.HLToggleInstanceSideCommand.klass);
  497. smalltalk.addMethod(
  498. "_label",
  499. smalltalk.method({
  500. selector: "label",
  501. category: 'accessing',
  502. fn: function () {
  503. var self = this;
  504. return "Instance side";
  505. },
  506. args: [],
  507. source: "label\x0a\x09^ 'Instance side'",
  508. messageSends: [],
  509. referencedClasses: []
  510. }),
  511. smalltalk.HLToggleInstanceSideCommand.klass);