Helios-Commands-Browser.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800
  1. define("helios/Helios-Commands-Browser", ["amber/boot", "helios/Helios-Commands-Tools"], function($boot){
  2. var smalltalk=$boot.vm,nil=$boot.nil,_st=$boot.asReceiver,globals=$boot.globals;
  3. smalltalk.addPackage('Helios-Commands-Browser');
  4. smalltalk.packages["Helios-Commands-Browser"].transport = {"type":"amd","amdNamespace":"helios"};
  5. smalltalk.addClass('HLBrowserCommand', globals.HLToolCommand, [], 'Helios-Commands-Browser');
  6. smalltalk.addMethod(
  7. smalltalk.method({
  8. selector: "isValidFor:",
  9. protocol: 'testing',
  10. fn: function (aModel){
  11. var self=this;
  12. return smalltalk.withContext(function($ctx1) {
  13. var $1;
  14. $1=_st(aModel)._isBrowserModel();
  15. return $1;
  16. }, function($ctx1) {$ctx1.fill(self,"isValidFor:",{aModel:aModel},globals.HLBrowserCommand.klass)})},
  17. args: ["aModel"],
  18. source: "isValidFor: aModel\x0a\x09^ aModel isBrowserModel",
  19. messageSends: ["isBrowserModel"],
  20. referencedClasses: []
  21. }),
  22. globals.HLBrowserCommand.klass);
  23. smalltalk.addClass('HLBrowserGoToCommand', globals.HLBrowserCommand, [], 'Helios-Commands-Browser');
  24. smalltalk.addMethod(
  25. smalltalk.method({
  26. selector: "isValidFor:",
  27. protocol: 'testing',
  28. fn: function (aModel){
  29. var self=this;
  30. return smalltalk.withContext(function($ctx1) {
  31. var $1;
  32. $1=_st(aModel)._isBrowserModel();
  33. return $1;
  34. }, function($ctx1) {$ctx1.fill(self,"isValidFor:",{aModel:aModel},globals.HLBrowserGoToCommand.klass)})},
  35. args: ["aModel"],
  36. source: "isValidFor: aModel\x0a\x09^ aModel isBrowserModel",
  37. messageSends: ["isBrowserModel"],
  38. referencedClasses: []
  39. }),
  40. globals.HLBrowserGoToCommand.klass);
  41. smalltalk.addMethod(
  42. smalltalk.method({
  43. selector: "key",
  44. protocol: 'accessing',
  45. fn: function (){
  46. var self=this;
  47. return "g";
  48. },
  49. args: [],
  50. source: "key\x0a\x09^ 'g'",
  51. messageSends: [],
  52. referencedClasses: []
  53. }),
  54. globals.HLBrowserGoToCommand.klass);
  55. smalltalk.addMethod(
  56. smalltalk.method({
  57. selector: "label",
  58. protocol: 'accessing',
  59. fn: function (){
  60. var self=this;
  61. return "Go to";
  62. },
  63. args: [],
  64. source: "label\x0a\x09^ 'Go to'",
  65. messageSends: [],
  66. referencedClasses: []
  67. }),
  68. globals.HLBrowserGoToCommand.klass);
  69. smalltalk.addClass('HLGoToClassesCommand', globals.HLBrowserGoToCommand, [], 'Helios-Commands-Browser');
  70. smalltalk.addMethod(
  71. smalltalk.method({
  72. selector: "execute",
  73. protocol: 'executing',
  74. fn: function (){
  75. var self=this;
  76. return smalltalk.withContext(function($ctx1) {
  77. _st(self._model())._focusOnClasses();
  78. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},globals.HLGoToClassesCommand)})},
  79. args: [],
  80. source: "execute\x0a\x09self model focusOnClasses",
  81. messageSends: ["focusOnClasses", "model"],
  82. referencedClasses: []
  83. }),
  84. globals.HLGoToClassesCommand);
  85. smalltalk.addMethod(
  86. smalltalk.method({
  87. selector: "key",
  88. protocol: 'accessing',
  89. fn: function (){
  90. var self=this;
  91. return "c";
  92. },
  93. args: [],
  94. source: "key\x0a\x09^ 'c'",
  95. messageSends: [],
  96. referencedClasses: []
  97. }),
  98. globals.HLGoToClassesCommand.klass);
  99. smalltalk.addMethod(
  100. smalltalk.method({
  101. selector: "label",
  102. protocol: 'accessing',
  103. fn: function (){
  104. var self=this;
  105. return "Classes";
  106. },
  107. args: [],
  108. source: "label\x0a\x09^ 'Classes'",
  109. messageSends: [],
  110. referencedClasses: []
  111. }),
  112. globals.HLGoToClassesCommand.klass);
  113. smalltalk.addClass('HLGoToDocumentationCommand', globals.HLBrowserGoToCommand, [], 'Helios-Commands-Browser');
  114. smalltalk.addMethod(
  115. smalltalk.method({
  116. selector: "execute",
  117. protocol: 'executing',
  118. fn: function (){
  119. var self=this;
  120. return smalltalk.withContext(function($ctx1) {
  121. _st(self._model())._focusOnDocumentation();
  122. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},globals.HLGoToDocumentationCommand)})},
  123. args: [],
  124. source: "execute\x0a\x09self model focusOnDocumentation",
  125. messageSends: ["focusOnDocumentation", "model"],
  126. referencedClasses: []
  127. }),
  128. globals.HLGoToDocumentationCommand);
  129. smalltalk.addMethod(
  130. smalltalk.method({
  131. selector: "key",
  132. protocol: 'accessing',
  133. fn: function (){
  134. var self=this;
  135. return "d";
  136. },
  137. args: [],
  138. source: "key\x0a\x09^ 'd'",
  139. messageSends: [],
  140. referencedClasses: []
  141. }),
  142. globals.HLGoToDocumentationCommand.klass);
  143. smalltalk.addMethod(
  144. smalltalk.method({
  145. selector: "label",
  146. protocol: 'accessing',
  147. fn: function (){
  148. var self=this;
  149. return "Documentation";
  150. },
  151. args: [],
  152. source: "label\x0a\x09^ 'Documentation'",
  153. messageSends: [],
  154. referencedClasses: []
  155. }),
  156. globals.HLGoToDocumentationCommand.klass);
  157. smalltalk.addClass('HLGoToMethodsCommand', globals.HLBrowserGoToCommand, [], 'Helios-Commands-Browser');
  158. smalltalk.addMethod(
  159. smalltalk.method({
  160. selector: "execute",
  161. protocol: 'executing',
  162. fn: function (){
  163. var self=this;
  164. return smalltalk.withContext(function($ctx1) {
  165. _st(self._model())._focusOnMethods();
  166. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},globals.HLGoToMethodsCommand)})},
  167. args: [],
  168. source: "execute\x0a\x09self model focusOnMethods",
  169. messageSends: ["focusOnMethods", "model"],
  170. referencedClasses: []
  171. }),
  172. globals.HLGoToMethodsCommand);
  173. smalltalk.addMethod(
  174. smalltalk.method({
  175. selector: "key",
  176. protocol: 'accessing',
  177. fn: function (){
  178. var self=this;
  179. return "m";
  180. },
  181. args: [],
  182. source: "key\x0a\x09^ 'm'",
  183. messageSends: [],
  184. referencedClasses: []
  185. }),
  186. globals.HLGoToMethodsCommand.klass);
  187. smalltalk.addMethod(
  188. smalltalk.method({
  189. selector: "label",
  190. protocol: 'accessing',
  191. fn: function (){
  192. var self=this;
  193. return "Methods";
  194. },
  195. args: [],
  196. source: "label\x0a\x09^ 'Methods'",
  197. messageSends: [],
  198. referencedClasses: []
  199. }),
  200. globals.HLGoToMethodsCommand.klass);
  201. smalltalk.addClass('HLGoToPackagesCommand', globals.HLBrowserGoToCommand, [], 'Helios-Commands-Browser');
  202. smalltalk.addMethod(
  203. smalltalk.method({
  204. selector: "execute",
  205. protocol: 'executing',
  206. fn: function (){
  207. var self=this;
  208. return smalltalk.withContext(function($ctx1) {
  209. _st(self._model())._focusOnPackages();
  210. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},globals.HLGoToPackagesCommand)})},
  211. args: [],
  212. source: "execute\x0a\x09self model focusOnPackages",
  213. messageSends: ["focusOnPackages", "model"],
  214. referencedClasses: []
  215. }),
  216. globals.HLGoToPackagesCommand);
  217. smalltalk.addMethod(
  218. smalltalk.method({
  219. selector: "key",
  220. protocol: 'accessing',
  221. fn: function (){
  222. var self=this;
  223. return "p";
  224. },
  225. args: [],
  226. source: "key\x0a\x09^ 'p'",
  227. messageSends: [],
  228. referencedClasses: []
  229. }),
  230. globals.HLGoToPackagesCommand.klass);
  231. smalltalk.addMethod(
  232. smalltalk.method({
  233. selector: "label",
  234. protocol: 'accessing',
  235. fn: function (){
  236. var self=this;
  237. return "Packages";
  238. },
  239. args: [],
  240. source: "label\x0a\x09^ 'Packages'",
  241. messageSends: [],
  242. referencedClasses: []
  243. }),
  244. globals.HLGoToPackagesCommand.klass);
  245. smalltalk.addClass('HLGoToProtocolsCommand', globals.HLBrowserGoToCommand, [], 'Helios-Commands-Browser');
  246. smalltalk.addMethod(
  247. smalltalk.method({
  248. selector: "execute",
  249. protocol: 'executing',
  250. fn: function (){
  251. var self=this;
  252. return smalltalk.withContext(function($ctx1) {
  253. _st(self._model())._focusOnProtocols();
  254. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},globals.HLGoToProtocolsCommand)})},
  255. args: [],
  256. source: "execute\x0a\x09self model focusOnProtocols",
  257. messageSends: ["focusOnProtocols", "model"],
  258. referencedClasses: []
  259. }),
  260. globals.HLGoToProtocolsCommand);
  261. smalltalk.addMethod(
  262. smalltalk.method({
  263. selector: "key",
  264. protocol: 'accessing',
  265. fn: function (){
  266. var self=this;
  267. return "t";
  268. },
  269. args: [],
  270. source: "key\x0a\x09^ 't'",
  271. messageSends: [],
  272. referencedClasses: []
  273. }),
  274. globals.HLGoToProtocolsCommand.klass);
  275. smalltalk.addMethod(
  276. smalltalk.method({
  277. selector: "label",
  278. protocol: 'accessing',
  279. fn: function (){
  280. var self=this;
  281. return "Protocols";
  282. },
  283. args: [],
  284. source: "label\x0a\x09^ 'Protocols'",
  285. messageSends: [],
  286. referencedClasses: []
  287. }),
  288. globals.HLGoToProtocolsCommand.klass);
  289. smalltalk.addClass('HLGoToSourceCodeCommand', globals.HLBrowserGoToCommand, [], 'Helios-Commands-Browser');
  290. smalltalk.addMethod(
  291. smalltalk.method({
  292. selector: "execute",
  293. protocol: 'executing',
  294. fn: function (){
  295. var self=this;
  296. return smalltalk.withContext(function($ctx1) {
  297. _st(self._model())._focusOnSourceCode();
  298. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},globals.HLGoToSourceCodeCommand)})},
  299. args: [],
  300. source: "execute\x0a\x09self model focusOnSourceCode",
  301. messageSends: ["focusOnSourceCode", "model"],
  302. referencedClasses: []
  303. }),
  304. globals.HLGoToSourceCodeCommand);
  305. smalltalk.addMethod(
  306. smalltalk.method({
  307. selector: "key",
  308. protocol: 'accessing',
  309. fn: function (){
  310. var self=this;
  311. return "s";
  312. },
  313. args: [],
  314. source: "key\x0a\x09^ 's'",
  315. messageSends: [],
  316. referencedClasses: []
  317. }),
  318. globals.HLGoToSourceCodeCommand.klass);
  319. smalltalk.addMethod(
  320. smalltalk.method({
  321. selector: "label",
  322. protocol: 'accessing',
  323. fn: function (){
  324. var self=this;
  325. return "Source code";
  326. },
  327. args: [],
  328. source: "label\x0a\x09^ 'Source code'",
  329. messageSends: [],
  330. referencedClasses: []
  331. }),
  332. globals.HLGoToSourceCodeCommand.klass);
  333. smalltalk.addClass('HLEditCommentCommand', globals.HLBrowserCommand, [], 'Helios-Commands-Browser');
  334. smalltalk.addMethod(
  335. smalltalk.method({
  336. selector: "execute",
  337. protocol: 'executing',
  338. fn: function (){
  339. var self=this;
  340. return smalltalk.withContext(function($ctx1) {
  341. _st(self._model())._editComment();
  342. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},globals.HLEditCommentCommand)})},
  343. args: [],
  344. source: "execute\x0a\x09self model editComment",
  345. messageSends: ["editComment", "model"],
  346. referencedClasses: []
  347. }),
  348. globals.HLEditCommentCommand);
  349. smalltalk.addMethod(
  350. smalltalk.method({
  351. selector: "isActive",
  352. protocol: 'testing',
  353. fn: function (){
  354. var self=this;
  355. return smalltalk.withContext(function($ctx1) {
  356. var $3,$2,$1;
  357. $3=self._model();
  358. $ctx1.sendIdx["model"]=1;
  359. $2=_st($3)._showComment();
  360. $1=_st($2)._and_((function(){
  361. return smalltalk.withContext(function($ctx2) {
  362. return _st(_st(self._model())._selectedClass())._notNil();
  363. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  364. return $1;
  365. }, function($ctx1) {$ctx1.fill(self,"isActive",{},globals.HLEditCommentCommand)})},
  366. args: [],
  367. source: "isActive\x0a\x09^ self model showComment and: [ self model selectedClass notNil ]",
  368. messageSends: ["and:", "showComment", "model", "notNil", "selectedClass"],
  369. referencedClasses: []
  370. }),
  371. globals.HLEditCommentCommand);
  372. smalltalk.addMethod(
  373. smalltalk.method({
  374. selector: "key",
  375. protocol: 'accessing',
  376. fn: function (){
  377. var self=this;
  378. return "d";
  379. },
  380. args: [],
  381. source: "key\x0a\x09^ 'd'",
  382. messageSends: [],
  383. referencedClasses: []
  384. }),
  385. globals.HLEditCommentCommand.klass);
  386. smalltalk.addMethod(
  387. smalltalk.method({
  388. selector: "label",
  389. protocol: 'accessing',
  390. fn: function (){
  391. var self=this;
  392. return "Edit documentation";
  393. },
  394. args: [],
  395. source: "label\x0a\x09^ 'Edit documentation'",
  396. messageSends: [],
  397. referencedClasses: []
  398. }),
  399. globals.HLEditCommentCommand.klass);
  400. smalltalk.addClass('HLGenerateCommand', globals.HLBrowserCommand, [], 'Helios-Commands-Browser');
  401. globals.HLGenerateCommand.comment="I am a group command used to gather all the commands generating code (`accessors`, `initialize`, etc)";
  402. smalltalk.addMethod(
  403. smalltalk.method({
  404. selector: "key",
  405. protocol: 'accessing',
  406. fn: function (){
  407. var self=this;
  408. return "h";
  409. },
  410. args: [],
  411. source: "key\x0a\x09^ 'h'",
  412. messageSends: [],
  413. referencedClasses: []
  414. }),
  415. globals.HLGenerateCommand.klass);
  416. smalltalk.addMethod(
  417. smalltalk.method({
  418. selector: "label",
  419. protocol: 'accessing',
  420. fn: function (){
  421. var self=this;
  422. return "Generate";
  423. },
  424. args: [],
  425. source: "label\x0a\x09^ 'Generate'",
  426. messageSends: [],
  427. referencedClasses: []
  428. }),
  429. globals.HLGenerateCommand.klass);
  430. smalltalk.addClass('HLCategorizeUnclassifiedCommand', globals.HLGenerateCommand, [], 'Helios-Commands-Browser');
  431. globals.HLCategorizeUnclassifiedCommand.comment="I am the command used to categorize unclassified methods";
  432. smalltalk.addMethod(
  433. smalltalk.method({
  434. selector: "execute",
  435. protocol: 'executing',
  436. fn: function (){
  437. var self=this;
  438. var targetClass,unclassified;
  439. function $HLMethodClassifier(){return globals.HLMethodClassifier||(typeof HLMethodClassifier=="undefined"?nil:HLMethodClassifier)}
  440. return smalltalk.withContext(function($ctx1) {
  441. targetClass=_st(self._model())._selectedClass();
  442. unclassified=_st(_st(targetClass)._methods())._select_((function(e){
  443. return smalltalk.withContext(function($ctx2) {
  444. return _st(_st(e)._protocol()).__eq("as yet unclassified");
  445. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)})}));
  446. _st(_st($HLMethodClassifier())._new())._classifyAll_(unclassified);
  447. return self}, function($ctx1) {$ctx1.fill(self,"execute",{targetClass:targetClass,unclassified:unclassified},globals.HLCategorizeUnclassifiedCommand)})},
  448. args: [],
  449. source: "execute\x0a\x09| targetClass unclassified |\x0a\x09targetClass := self model selectedClass.\x0a\x0a\x09unclassified := targetClass methods select:[ :e | e protocol = 'as yet unclassified' ].\x0a\x09\x09\x0a\x09HLMethodClassifier new\x0a\x09\x09classifyAll: unclassified",
  450. messageSends: ["selectedClass", "model", "select:", "methods", "=", "protocol", "classifyAll:", "new"],
  451. referencedClasses: ["HLMethodClassifier"]
  452. }),
  453. globals.HLCategorizeUnclassifiedCommand);
  454. smalltalk.addMethod(
  455. smalltalk.method({
  456. selector: "key",
  457. protocol: 'accessing',
  458. fn: function (){
  459. var self=this;
  460. return "c";
  461. },
  462. args: [],
  463. source: "key\x0a\x09^ 'c'",
  464. messageSends: [],
  465. referencedClasses: []
  466. }),
  467. globals.HLCategorizeUnclassifiedCommand.klass);
  468. smalltalk.addMethod(
  469. smalltalk.method({
  470. selector: "label",
  471. protocol: 'accessing',
  472. fn: function (){
  473. var self=this;
  474. return "Categorize";
  475. },
  476. args: [],
  477. source: "label\x0a\x09^ 'Categorize'",
  478. messageSends: [],
  479. referencedClasses: []
  480. }),
  481. globals.HLCategorizeUnclassifiedCommand.klass);
  482. smalltalk.addClass('HLGenerateAccessorsCommand', globals.HLGenerateCommand, [], 'Helios-Commands-Browser');
  483. globals.HLGenerateAccessorsCommand.comment="I am the command used to generate the `getter` and the `setter` methods depending of the selected class";
  484. smalltalk.addMethod(
  485. smalltalk.method({
  486. selector: "execute",
  487. protocol: 'executing',
  488. fn: function (){
  489. var self=this;
  490. var targetClass,output,first;
  491. function $HLInitializeGenerator(){return globals.HLInitializeGenerator||(typeof HLInitializeGenerator=="undefined"?nil:HLInitializeGenerator)}
  492. return smalltalk.withContext(function($ctx1) {
  493. var $1,$2,$3,$4,$5;
  494. $1=self._model();
  495. $ctx1.sendIdx["model"]=1;
  496. targetClass=_st($1)._selectedClass();
  497. $2=_st($HLInitializeGenerator())._new();
  498. _st($2)._class_(targetClass);
  499. _st($2)._generate();
  500. $3=_st($2)._output();
  501. output=$3;
  502. _st(output)._compile();
  503. first=_st(_st(output)._sourceCodes())._first();
  504. $4=self._model();
  505. _st($4)._selectedProtocol_(_st(output)._protocol());
  506. _st($4)._selectedMethod_(_st(targetClass).__gt_gt(_st(first)._selector()));
  507. $5=_st($4)._focusOnSourceCode();
  508. return self}, function($ctx1) {$ctx1.fill(self,"execute",{targetClass:targetClass,output:output,first:first},globals.HLGenerateAccessorsCommand)})},
  509. args: [],
  510. source: "execute\x0a\x09| targetClass output first |\x0a\x09targetClass := self model selectedClass.\x0a\x0a\x09output := HLInitializeGenerator new\x0a\x09\x09class: targetClass;\x0a\x09\x09generate;\x0a\x09\x09output.\x0a\x09\x09\x0a\x09output compile.\x0a\x09first := output sourceCodes first.\x0a\x09self model\x0a\x09\x09selectedProtocol: output protocol;\x0a\x09\x09selectedMethod:(targetClass>>first selector);\x0a\x09\x09focusOnSourceCode",
  511. messageSends: ["selectedClass", "model", "class:", "new", "generate", "output", "compile", "first", "sourceCodes", "selectedProtocol:", "protocol", "selectedMethod:", ">>", "selector", "focusOnSourceCode"],
  512. referencedClasses: ["HLInitializeGenerator"]
  513. }),
  514. globals.HLGenerateAccessorsCommand);
  515. smalltalk.addMethod(
  516. smalltalk.method({
  517. selector: "key",
  518. protocol: 'accessing',
  519. fn: function (){
  520. var self=this;
  521. return "i";
  522. },
  523. args: [],
  524. source: "key\x0a\x09^ 'i'",
  525. messageSends: [],
  526. referencedClasses: []
  527. }),
  528. globals.HLGenerateAccessorsCommand.klass);
  529. smalltalk.addMethod(
  530. smalltalk.method({
  531. selector: "label",
  532. protocol: 'accessing',
  533. fn: function (){
  534. var self=this;
  535. return "Initialize";
  536. },
  537. args: [],
  538. source: "label\x0a\x09^ 'Initialize'",
  539. messageSends: [],
  540. referencedClasses: []
  541. }),
  542. globals.HLGenerateAccessorsCommand.klass);
  543. smalltalk.addClass('HLGenerateInitializeCommand', globals.HLGenerateCommand, [], 'Helios-Commands-Browser');
  544. globals.HLGenerateInitializeCommand.comment="I am the command used to generate the `initialize` method depending of the selected class";
  545. smalltalk.addMethod(
  546. smalltalk.method({
  547. selector: "execute",
  548. protocol: 'executing',
  549. fn: function (){
  550. var self=this;
  551. var targetClass,output;
  552. function $HLAccessorsGenerator(){return globals.HLAccessorsGenerator||(typeof HLAccessorsGenerator=="undefined"?nil:HLAccessorsGenerator)}
  553. return smalltalk.withContext(function($ctx1) {
  554. var $1,$2,$3;
  555. $1=self._model();
  556. $ctx1.sendIdx["model"]=1;
  557. targetClass=_st($1)._selectedClass();
  558. $2=_st($HLAccessorsGenerator())._new();
  559. _st($2)._class_(targetClass);
  560. _st($2)._generate();
  561. $3=_st($2)._output();
  562. output=$3;
  563. _st(output)._compile();
  564. _st(self._model())._selectedProtocol_(_st(output)._protocol());
  565. return self}, function($ctx1) {$ctx1.fill(self,"execute",{targetClass:targetClass,output:output},globals.HLGenerateInitializeCommand)})},
  566. args: [],
  567. source: "execute\x0a\x09| targetClass output |\x0a\x09targetClass := self model selectedClass.\x0a\x0a\x09output := HLAccessorsGenerator new\x0a\x09\x09class: targetClass;\x0a\x09\x09generate;\x0a\x09\x09output.\x0a\x09\x09\x0a\x09output compile.\x0a\x09self model selectedProtocol: output protocol",
  568. messageSends: ["selectedClass", "model", "class:", "new", "generate", "output", "compile", "selectedProtocol:", "protocol"],
  569. referencedClasses: ["HLAccessorsGenerator"]
  570. }),
  571. globals.HLGenerateInitializeCommand);
  572. smalltalk.addMethod(
  573. smalltalk.method({
  574. selector: "key",
  575. protocol: 'accessing',
  576. fn: function (){
  577. var self=this;
  578. return "a";
  579. },
  580. args: [],
  581. source: "key\x0a\x09^ 'a'",
  582. messageSends: [],
  583. referencedClasses: []
  584. }),
  585. globals.HLGenerateInitializeCommand.klass);
  586. smalltalk.addMethod(
  587. smalltalk.method({
  588. selector: "label",
  589. protocol: 'accessing',
  590. fn: function (){
  591. var self=this;
  592. return "Accessors";
  593. },
  594. args: [],
  595. source: "label\x0a\x09^ 'Accessors'",
  596. messageSends: [],
  597. referencedClasses: []
  598. }),
  599. globals.HLGenerateInitializeCommand.klass);
  600. smalltalk.addClass('HLToggleCommand', globals.HLBrowserCommand, [], 'Helios-Commands-Browser');
  601. smalltalk.addMethod(
  602. smalltalk.method({
  603. selector: "key",
  604. protocol: 'accessing',
  605. fn: function (){
  606. var self=this;
  607. return "t";
  608. },
  609. args: [],
  610. source: "key\x0a\x09^ 't'",
  611. messageSends: [],
  612. referencedClasses: []
  613. }),
  614. globals.HLToggleCommand.klass);
  615. smalltalk.addMethod(
  616. smalltalk.method({
  617. selector: "label",
  618. protocol: 'accessing',
  619. fn: function (){
  620. var self=this;
  621. return "Toggle";
  622. },
  623. args: [],
  624. source: "label\x0a\x09^ 'Toggle'",
  625. messageSends: [],
  626. referencedClasses: []
  627. }),
  628. globals.HLToggleCommand.klass);
  629. smalltalk.addClass('HLToggleClassCommentCommand', globals.HLToggleCommand, [], 'Helios-Commands-Browser');
  630. smalltalk.addMethod(
  631. smalltalk.method({
  632. selector: "execute",
  633. protocol: 'executing',
  634. fn: function (){
  635. var self=this;
  636. return smalltalk.withContext(function($ctx1) {
  637. var $1;
  638. $1=self._model();
  639. $ctx1.sendIdx["model"]=1;
  640. _st($1)._showComment_(_st(_st(self._model())._showComment())._not());
  641. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},globals.HLToggleClassCommentCommand)})},
  642. args: [],
  643. source: "execute\x0a\x09self model showComment: self model showComment not",
  644. messageSends: ["showComment:", "model", "not", "showComment"],
  645. referencedClasses: []
  646. }),
  647. globals.HLToggleClassCommentCommand);
  648. smalltalk.addMethod(
  649. smalltalk.method({
  650. selector: "key",
  651. protocol: 'accessing',
  652. fn: function (){
  653. var self=this;
  654. return "d";
  655. },
  656. args: [],
  657. source: "key\x0a\x09^ 'd'",
  658. messageSends: [],
  659. referencedClasses: []
  660. }),
  661. globals.HLToggleClassCommentCommand.klass);
  662. smalltalk.addMethod(
  663. smalltalk.method({
  664. selector: "label",
  665. protocol: 'accessing',
  666. fn: function (){
  667. var self=this;
  668. return "Documentation";
  669. },
  670. args: [],
  671. source: "label\x0a\x09^ 'Documentation'",
  672. messageSends: [],
  673. referencedClasses: []
  674. }),
  675. globals.HLToggleClassCommentCommand.klass);
  676. smalltalk.addClass('HLToggleClassSideCommand', globals.HLToggleCommand, [], 'Helios-Commands-Browser');
  677. smalltalk.addMethod(
  678. smalltalk.method({
  679. selector: "execute",
  680. protocol: 'executing',
  681. fn: function (){
  682. var self=this;
  683. return smalltalk.withContext(function($ctx1) {
  684. var $1;
  685. $1=self._model();
  686. $ctx1.sendIdx["model"]=1;
  687. _st($1)._showInstance_(_st(_st(self._model())._showInstance())._not());
  688. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},globals.HLToggleClassSideCommand)})},
  689. args: [],
  690. source: "execute\x0a\x09self model showInstance: self model showInstance not",
  691. messageSends: ["showInstance:", "model", "not", "showInstance"],
  692. referencedClasses: []
  693. }),
  694. globals.HLToggleClassSideCommand);
  695. smalltalk.addMethod(
  696. smalltalk.method({
  697. selector: "key",
  698. protocol: 'accessing',
  699. fn: function (){
  700. var self=this;
  701. return "c";
  702. },
  703. args: [],
  704. source: "key\x0a\x09^ 'c'",
  705. messageSends: [],
  706. referencedClasses: []
  707. }),
  708. globals.HLToggleClassSideCommand.klass);
  709. smalltalk.addMethod(
  710. smalltalk.method({
  711. selector: "label",
  712. protocol: 'accessing',
  713. fn: function (){
  714. var self=this;
  715. return "Class side";
  716. },
  717. args: [],
  718. source: "label\x0a\x09^ 'Class side'",
  719. messageSends: [],
  720. referencedClasses: []
  721. }),
  722. globals.HLToggleClassSideCommand.klass);
  723. });