Helios-Commands-Browser.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: 'testing',
  320. fn: function (){
  321. var self=this;
  322. return smalltalk.withContext(function($ctx1) {
  323. var $1;
  324. $1=_st(_st(self._model())._showComment())._and_((function(){
  325. return smalltalk.withContext(function($ctx2) {
  326. return _st(_st(self._model())._selectedClass())._notNil();
  327. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  328. return $1;
  329. }, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLEditCommentCommand)})},
  330. args: [],
  331. source: "isActive\x0a\x09^ self model showComment and: [ self model selectedClass notNil ]",
  332. messageSends: ["and:", "showComment", "model", "notNil", "selectedClass"],
  333. referencedClasses: []
  334. }),
  335. smalltalk.HLEditCommentCommand);
  336. smalltalk.addMethod(
  337. smalltalk.method({
  338. selector: "key",
  339. category: 'accessing',
  340. fn: function (){
  341. var self=this;
  342. return smalltalk.withContext(function($ctx1) {
  343. return "d";
  344. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLEditCommentCommand.klass)})},
  345. args: [],
  346. source: "key\x0a\x09^ 'd'",
  347. messageSends: [],
  348. referencedClasses: []
  349. }),
  350. smalltalk.HLEditCommentCommand.klass);
  351. smalltalk.addMethod(
  352. smalltalk.method({
  353. selector: "label",
  354. category: 'accessing',
  355. fn: function (){
  356. var self=this;
  357. return smalltalk.withContext(function($ctx1) {
  358. return "Edit documentation";
  359. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLEditCommentCommand.klass)})},
  360. args: [],
  361. source: "label\x0a\x09^ 'Edit documentation'",
  362. messageSends: [],
  363. referencedClasses: []
  364. }),
  365. smalltalk.HLEditCommentCommand.klass);
  366. smalltalk.addClass('HLToggleCommand', smalltalk.HLBrowserCommand, [], 'Helios-Commands-Browser');
  367. smalltalk.addMethod(
  368. smalltalk.method({
  369. selector: "key",
  370. category: 'accessing',
  371. fn: function (){
  372. var self=this;
  373. return smalltalk.withContext(function($ctx1) {
  374. return "t";
  375. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleCommand.klass)})},
  376. args: [],
  377. source: "key\x0a\x09^ 't'",
  378. messageSends: [],
  379. referencedClasses: []
  380. }),
  381. smalltalk.HLToggleCommand.klass);
  382. smalltalk.addMethod(
  383. smalltalk.method({
  384. selector: "label",
  385. category: 'accessing',
  386. fn: function (){
  387. var self=this;
  388. return smalltalk.withContext(function($ctx1) {
  389. return "Toggle";
  390. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleCommand.klass)})},
  391. args: [],
  392. source: "label\x0a\x09^ 'Toggle'",
  393. messageSends: [],
  394. referencedClasses: []
  395. }),
  396. smalltalk.HLToggleCommand.klass);
  397. smalltalk.addClass('HLToggleClassCommentCommand', smalltalk.HLToggleCommand, [], 'Helios-Commands-Browser');
  398. smalltalk.addMethod(
  399. smalltalk.method({
  400. selector: "execute",
  401. category: 'executing',
  402. fn: function (){
  403. var self=this;
  404. return smalltalk.withContext(function($ctx1) {
  405. _st(self._model())._showComment_(_st(_st(self._model())._showComment())._not());
  406. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLToggleClassCommentCommand)})},
  407. args: [],
  408. source: "execute\x0a\x09self model showComment: self model showComment not",
  409. messageSends: ["showComment:", "model", "not", "showComment"],
  410. referencedClasses: []
  411. }),
  412. smalltalk.HLToggleClassCommentCommand);
  413. smalltalk.addMethod(
  414. smalltalk.method({
  415. selector: "key",
  416. category: 'accessing',
  417. fn: function (){
  418. var self=this;
  419. return smalltalk.withContext(function($ctx1) {
  420. return "d";
  421. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleClassCommentCommand.klass)})},
  422. args: [],
  423. source: "key\x0a\x09^ 'd'",
  424. messageSends: [],
  425. referencedClasses: []
  426. }),
  427. smalltalk.HLToggleClassCommentCommand.klass);
  428. smalltalk.addMethod(
  429. smalltalk.method({
  430. selector: "label",
  431. category: 'accessing',
  432. fn: function (){
  433. var self=this;
  434. return smalltalk.withContext(function($ctx1) {
  435. return "Documentation";
  436. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleClassCommentCommand.klass)})},
  437. args: [],
  438. source: "label\x0a\x09^ 'Documentation'",
  439. messageSends: [],
  440. referencedClasses: []
  441. }),
  442. smalltalk.HLToggleClassCommentCommand.klass);
  443. smalltalk.addClass('HLToggleClassSideCommand', smalltalk.HLToggleCommand, [], 'Helios-Commands-Browser');
  444. smalltalk.addMethod(
  445. smalltalk.method({
  446. selector: "execute",
  447. category: 'executing',
  448. fn: function (){
  449. var self=this;
  450. return smalltalk.withContext(function($ctx1) {
  451. _st(self._model())._showInstance_(false);
  452. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLToggleClassSideCommand)})},
  453. args: [],
  454. source: "execute\x0a\x09self model showInstance: false",
  455. messageSends: ["showInstance:", "model"],
  456. referencedClasses: []
  457. }),
  458. smalltalk.HLToggleClassSideCommand);
  459. smalltalk.addMethod(
  460. smalltalk.method({
  461. selector: "key",
  462. category: 'accessing',
  463. fn: function (){
  464. var self=this;
  465. return smalltalk.withContext(function($ctx1) {
  466. return "c";
  467. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleClassSideCommand.klass)})},
  468. args: [],
  469. source: "key\x0a\x09^ 'c'",
  470. messageSends: [],
  471. referencedClasses: []
  472. }),
  473. smalltalk.HLToggleClassSideCommand.klass);
  474. smalltalk.addMethod(
  475. smalltalk.method({
  476. selector: "label",
  477. category: 'accessing',
  478. fn: function (){
  479. var self=this;
  480. return smalltalk.withContext(function($ctx1) {
  481. return "Class side";
  482. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleClassSideCommand.klass)})},
  483. args: [],
  484. source: "label\x0a\x09^ 'Class side'",
  485. messageSends: [],
  486. referencedClasses: []
  487. }),
  488. smalltalk.HLToggleClassSideCommand.klass);
  489. smalltalk.addClass('HLToggleInstanceSideCommand', smalltalk.HLToggleCommand, [], 'Helios-Commands-Browser');
  490. smalltalk.addMethod(
  491. smalltalk.method({
  492. selector: "execute",
  493. category: 'executing',
  494. fn: function (){
  495. var self=this;
  496. return smalltalk.withContext(function($ctx1) {
  497. _st(self._model())._showInstance_(true);
  498. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLToggleInstanceSideCommand)})},
  499. args: [],
  500. source: "execute\x0a\x09self model showInstance: true",
  501. messageSends: ["showInstance:", "model"],
  502. referencedClasses: []
  503. }),
  504. smalltalk.HLToggleInstanceSideCommand);
  505. smalltalk.addMethod(
  506. smalltalk.method({
  507. selector: "key",
  508. category: 'accessing',
  509. fn: function (){
  510. var self=this;
  511. return smalltalk.withContext(function($ctx1) {
  512. return "i";
  513. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLToggleInstanceSideCommand.klass)})},
  514. args: [],
  515. source: "key\x0a\x09^ 'i'",
  516. messageSends: [],
  517. referencedClasses: []
  518. }),
  519. smalltalk.HLToggleInstanceSideCommand.klass);
  520. smalltalk.addMethod(
  521. smalltalk.method({
  522. selector: "label",
  523. category: 'accessing',
  524. fn: function (){
  525. var self=this;
  526. return smalltalk.withContext(function($ctx1) {
  527. return "Instance side";
  528. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLToggleInstanceSideCommand.klass)})},
  529. args: [],
  530. source: "label\x0a\x09^ 'Instance side'",
  531. messageSends: [],
  532. referencedClasses: []
  533. }),
  534. smalltalk.HLToggleInstanceSideCommand.klass);
  535. });