Helios-Commands-Browser.js 24 KB

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