2
0

Helios-Commands-Browser.js 16 KB

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