2
0

Helios-Commands-Browser.js 20 KB

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