Helios-Commands-Browser.js 16 KB

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