Helios-Commands-Core.js 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315
  1. define(["amber/boot", "require", "amber/core/Kernel-Objects"], function($boot,requirejs){"use strict";
  2. var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  3. var $pkg = $core.addPackage("Helios-Commands-Core");
  4. $pkg.innerEval = function (expr) { return eval(expr); };
  5. $pkg.transport = {"type":"amd","amdNamespace":"helios"};
  6. $core.addClass("HLCommand", $globals.Object, ["input"], "Helios-Commands-Core");
  7. $core.addMethod(
  8. $core.method({
  9. selector: "asActionBinding",
  10. protocol: "converting",
  11. fn: function (){
  12. var self=this,$self=this;
  13. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  14. return $core.withContext(function($ctx1) {
  15. //>>excludeEnd("ctx");
  16. var $1;
  17. $1=$recv($globals.HLBindingAction)._on_labelled_($self._keyCode(),$self._label());
  18. $recv($1)._command_(self);
  19. return $recv($1)._yourself();
  20. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  21. }, function($ctx1) {$ctx1.fill(self,"asActionBinding",{})});
  22. //>>excludeEnd("ctx");
  23. },
  24. //>>excludeStart("ide", pragmas.excludeIdeData);
  25. args: [],
  26. source: "asActionBinding\x0a\x09^ (HLBindingAction on: self keyCode labelled: self label)\x0a \x09command: self;\x0a\x09\x09yourself",
  27. referencedClasses: ["HLBindingAction"],
  28. //>>excludeEnd("ide");
  29. pragmas: [],
  30. messageSends: ["command:", "on:labelled:", "keyCode", "label", "yourself"]
  31. }),
  32. $globals.HLCommand);
  33. $core.addMethod(
  34. $core.method({
  35. selector: "asBinding",
  36. protocol: "converting",
  37. fn: function (){
  38. var self=this,$self=this;
  39. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  40. return $core.withContext(function($ctx1) {
  41. //>>excludeEnd("ctx");
  42. var $1;
  43. $1=$self._isBindingGroup();
  44. if($core.assert($1)){
  45. return $self._asGroupBinding();
  46. } else {
  47. return $self._asActionBinding();
  48. }
  49. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  50. }, function($ctx1) {$ctx1.fill(self,"asBinding",{})});
  51. //>>excludeEnd("ctx");
  52. },
  53. //>>excludeStart("ide", pragmas.excludeIdeData);
  54. args: [],
  55. source: "asBinding\x0a\x09^ self isBindingGroup\x0a\x09\x09ifTrue: [ self asGroupBinding ]\x0a\x09\x09ifFalse: [ self asActionBinding ]",
  56. referencedClasses: [],
  57. //>>excludeEnd("ide");
  58. pragmas: [],
  59. messageSends: ["ifTrue:ifFalse:", "isBindingGroup", "asGroupBinding", "asActionBinding"]
  60. }),
  61. $globals.HLCommand);
  62. $core.addMethod(
  63. $core.method({
  64. selector: "asGroupBinding",
  65. protocol: "converting",
  66. fn: function (){
  67. var self=this,$self=this;
  68. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  69. return $core.withContext(function($ctx1) {
  70. //>>excludeEnd("ctx");
  71. return $recv($globals.HLBindingGroup)._on_labelled_($self._keyCode(),$self._label());
  72. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  73. }, function($ctx1) {$ctx1.fill(self,"asGroupBinding",{})});
  74. //>>excludeEnd("ctx");
  75. },
  76. //>>excludeStart("ide", pragmas.excludeIdeData);
  77. args: [],
  78. source: "asGroupBinding\x0a\x09^ HLBindingGroup \x0a\x09\x09on: self keyCode\x0a\x09\x09labelled: self label",
  79. referencedClasses: ["HLBindingGroup"],
  80. //>>excludeEnd("ide");
  81. pragmas: [],
  82. messageSends: ["on:labelled:", "keyCode", "label"]
  83. }),
  84. $globals.HLCommand);
  85. $core.addMethod(
  86. $core.method({
  87. selector: "commandError:",
  88. protocol: "error handling",
  89. fn: function (aString){
  90. var self=this,$self=this;
  91. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  92. return $core.withContext(function($ctx1) {
  93. //>>excludeEnd("ctx");
  94. $self._error_(aString);
  95. return self;
  96. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  97. }, function($ctx1) {$ctx1.fill(self,"commandError:",{aString:aString})});
  98. //>>excludeEnd("ctx");
  99. },
  100. //>>excludeStart("ide", pragmas.excludeIdeData);
  101. args: ["aString"],
  102. source: "commandError: aString\x0a\x09self error: aString",
  103. referencedClasses: [],
  104. //>>excludeEnd("ide");
  105. pragmas: [],
  106. messageSends: ["error:"]
  107. }),
  108. $globals.HLCommand);
  109. $core.addMethod(
  110. $core.method({
  111. selector: "defaultInput",
  112. protocol: "defaults",
  113. fn: function (){
  114. var self=this,$self=this;
  115. return "";
  116. },
  117. //>>excludeStart("ide", pragmas.excludeIdeData);
  118. args: [],
  119. source: "defaultInput\x0a\x09^ ''",
  120. referencedClasses: [],
  121. //>>excludeEnd("ide");
  122. pragmas: [],
  123. messageSends: []
  124. }),
  125. $globals.HLCommand);
  126. $core.addMethod(
  127. $core.method({
  128. selector: "documentation",
  129. protocol: "accessing",
  130. fn: function (){
  131. var self=this,$self=this;
  132. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  133. return $core.withContext(function($ctx1) {
  134. //>>excludeEnd("ctx");
  135. return $recv($self._class())._documentation();
  136. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  137. }, function($ctx1) {$ctx1.fill(self,"documentation",{})});
  138. //>>excludeEnd("ctx");
  139. },
  140. //>>excludeStart("ide", pragmas.excludeIdeData);
  141. args: [],
  142. source: "documentation\x0a\x09^ self class documentation",
  143. referencedClasses: [],
  144. //>>excludeEnd("ide");
  145. pragmas: [],
  146. messageSends: ["documentation", "class"]
  147. }),
  148. $globals.HLCommand);
  149. $core.addMethod(
  150. $core.method({
  151. selector: "execute",
  152. protocol: "executing",
  153. fn: function (){
  154. var self=this,$self=this;
  155. return self;
  156. },
  157. //>>excludeStart("ide", pragmas.excludeIdeData);
  158. args: [],
  159. source: "execute",
  160. referencedClasses: [],
  161. //>>excludeEnd("ide");
  162. pragmas: [],
  163. messageSends: []
  164. }),
  165. $globals.HLCommand);
  166. $core.addMethod(
  167. $core.method({
  168. selector: "input",
  169. protocol: "accessing",
  170. fn: function (){
  171. var self=this,$self=this;
  172. return $self.input;
  173. },
  174. //>>excludeStart("ide", pragmas.excludeIdeData);
  175. args: [],
  176. source: "input\x0a\x09^ input",
  177. referencedClasses: [],
  178. //>>excludeEnd("ide");
  179. pragmas: [],
  180. messageSends: []
  181. }),
  182. $globals.HLCommand);
  183. $core.addMethod(
  184. $core.method({
  185. selector: "input:",
  186. protocol: "accessing",
  187. fn: function (aString){
  188. var self=this,$self=this;
  189. var $1;
  190. $self.input=aString;
  191. $1=$self.input;
  192. return $1;
  193. },
  194. //>>excludeStart("ide", pragmas.excludeIdeData);
  195. args: ["aString"],
  196. source: "input: aString\x0a\x09^ input := aString",
  197. referencedClasses: [],
  198. //>>excludeEnd("ide");
  199. pragmas: [],
  200. messageSends: []
  201. }),
  202. $globals.HLCommand);
  203. $core.addMethod(
  204. $core.method({
  205. selector: "inputCompletion",
  206. protocol: "accessing",
  207. fn: function (){
  208. var self=this,$self=this;
  209. return [];
  210. },
  211. //>>excludeStart("ide", pragmas.excludeIdeData);
  212. args: [],
  213. source: "inputCompletion\x0a\x09^ #()",
  214. referencedClasses: [],
  215. //>>excludeEnd("ide");
  216. pragmas: [],
  217. messageSends: []
  218. }),
  219. $globals.HLCommand);
  220. $core.addMethod(
  221. $core.method({
  222. selector: "inputLabel",
  223. protocol: "accessing",
  224. fn: function (){
  225. var self=this,$self=this;
  226. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  227. return $core.withContext(function($ctx1) {
  228. //>>excludeEnd("ctx");
  229. return $self._label();
  230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  231. }, function($ctx1) {$ctx1.fill(self,"inputLabel",{})});
  232. //>>excludeEnd("ctx");
  233. },
  234. //>>excludeStart("ide", pragmas.excludeIdeData);
  235. args: [],
  236. source: "inputLabel\x0a\x09^ self label",
  237. referencedClasses: [],
  238. //>>excludeEnd("ide");
  239. pragmas: [],
  240. messageSends: ["label"]
  241. }),
  242. $globals.HLCommand);
  243. $core.addMethod(
  244. $core.method({
  245. selector: "isAction",
  246. protocol: "testing",
  247. fn: function (){
  248. var self=this,$self=this;
  249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  250. return $core.withContext(function($ctx1) {
  251. //>>excludeEnd("ctx");
  252. return $recv($self._isBindingGroup())._not();
  253. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  254. }, function($ctx1) {$ctx1.fill(self,"isAction",{})});
  255. //>>excludeEnd("ctx");
  256. },
  257. //>>excludeStart("ide", pragmas.excludeIdeData);
  258. args: [],
  259. source: "isAction\x0a\x09^ self isBindingGroup not",
  260. referencedClasses: [],
  261. //>>excludeEnd("ide");
  262. pragmas: [],
  263. messageSends: ["not", "isBindingGroup"]
  264. }),
  265. $globals.HLCommand);
  266. $core.addMethod(
  267. $core.method({
  268. selector: "isActive",
  269. protocol: "testing",
  270. fn: function (){
  271. var self=this,$self=this;
  272. return true;
  273. },
  274. //>>excludeStart("ide", pragmas.excludeIdeData);
  275. args: [],
  276. source: "isActive\x0a\x09^ true",
  277. referencedClasses: [],
  278. //>>excludeEnd("ide");
  279. pragmas: [],
  280. messageSends: []
  281. }),
  282. $globals.HLCommand);
  283. $core.addMethod(
  284. $core.method({
  285. selector: "isBindingGroup",
  286. protocol: "testing",
  287. fn: function (){
  288. var self=this,$self=this;
  289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  290. return $core.withContext(function($ctx1) {
  291. //>>excludeEnd("ctx");
  292. return $recv($recv($recv($self._class())._methodDictionary())._includesKey_("execute"))._not();
  293. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  294. }, function($ctx1) {$ctx1.fill(self,"isBindingGroup",{})});
  295. //>>excludeEnd("ctx");
  296. },
  297. //>>excludeStart("ide", pragmas.excludeIdeData);
  298. args: [],
  299. source: "isBindingGroup\x0a\x09^ (self class methodDictionary includesKey: 'execute') not",
  300. referencedClasses: [],
  301. //>>excludeEnd("ide");
  302. pragmas: [],
  303. messageSends: ["not", "includesKey:", "methodDictionary", "class"]
  304. }),
  305. $globals.HLCommand);
  306. $core.addMethod(
  307. $core.method({
  308. selector: "isInputRequired",
  309. protocol: "testing",
  310. fn: function (){
  311. var self=this,$self=this;
  312. return false;
  313. },
  314. //>>excludeStart("ide", pragmas.excludeIdeData);
  315. args: [],
  316. source: "isInputRequired\x0a\x09^ false",
  317. referencedClasses: [],
  318. //>>excludeEnd("ide");
  319. pragmas: [],
  320. messageSends: []
  321. }),
  322. $globals.HLCommand);
  323. $core.addMethod(
  324. $core.method({
  325. selector: "key",
  326. protocol: "accessing",
  327. fn: function (){
  328. var self=this,$self=this;
  329. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  330. return $core.withContext(function($ctx1) {
  331. //>>excludeEnd("ctx");
  332. return $recv($self._class())._key();
  333. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  334. }, function($ctx1) {$ctx1.fill(self,"key",{})});
  335. //>>excludeEnd("ctx");
  336. },
  337. //>>excludeStart("ide", pragmas.excludeIdeData);
  338. args: [],
  339. source: "key\x0a\x09^ self class key",
  340. referencedClasses: [],
  341. //>>excludeEnd("ide");
  342. pragmas: [],
  343. messageSends: ["key", "class"]
  344. }),
  345. $globals.HLCommand);
  346. $core.addMethod(
  347. $core.method({
  348. selector: "keyCode",
  349. protocol: "accessing",
  350. fn: function (){
  351. var self=this,$self=this;
  352. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  353. return $core.withContext(function($ctx1) {
  354. //>>excludeEnd("ctx");
  355. return $recv($recv($self._key())._asUppercase())._charCodeAt_((1));
  356. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  357. }, function($ctx1) {$ctx1.fill(self,"keyCode",{})});
  358. //>>excludeEnd("ctx");
  359. },
  360. //>>excludeStart("ide", pragmas.excludeIdeData);
  361. args: [],
  362. source: "keyCode\x0a\x09^ self key asUppercase charCodeAt: 1",
  363. referencedClasses: [],
  364. //>>excludeEnd("ide");
  365. pragmas: [],
  366. messageSends: ["charCodeAt:", "asUppercase", "key"]
  367. }),
  368. $globals.HLCommand);
  369. $core.addMethod(
  370. $core.method({
  371. selector: "label",
  372. protocol: "accessing",
  373. fn: function (){
  374. var self=this,$self=this;
  375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  376. return $core.withContext(function($ctx1) {
  377. //>>excludeEnd("ctx");
  378. return $recv($self._class())._label();
  379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  380. }, function($ctx1) {$ctx1.fill(self,"label",{})});
  381. //>>excludeEnd("ctx");
  382. },
  383. //>>excludeStart("ide", pragmas.excludeIdeData);
  384. args: [],
  385. source: "label\x0a\x09^ self class label",
  386. referencedClasses: [],
  387. //>>excludeEnd("ide");
  388. pragmas: [],
  389. messageSends: ["label", "class"]
  390. }),
  391. $globals.HLCommand);
  392. $core.addMethod(
  393. $core.method({
  394. selector: "menuLabel",
  395. protocol: "accessing",
  396. fn: function (){
  397. var self=this,$self=this;
  398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  399. return $core.withContext(function($ctx1) {
  400. //>>excludeEnd("ctx");
  401. return $recv($self._class())._menuLabel();
  402. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  403. }, function($ctx1) {$ctx1.fill(self,"menuLabel",{})});
  404. //>>excludeEnd("ctx");
  405. },
  406. //>>excludeStart("ide", pragmas.excludeIdeData);
  407. args: [],
  408. source: "menuLabel\x0a\x09^ self class menuLabel",
  409. referencedClasses: [],
  410. //>>excludeEnd("ide");
  411. pragmas: [],
  412. messageSends: ["menuLabel", "class"]
  413. }),
  414. $globals.HLCommand);
  415. $core.addMethod(
  416. $core.method({
  417. selector: "registerOn:",
  418. protocol: "registration",
  419. fn: function (aBinding){
  420. var self=this,$self=this;
  421. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  422. return $core.withContext(function($ctx1) {
  423. //>>excludeEnd("ctx");
  424. return $recv(aBinding)._add_($self._asBinding());
  425. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  426. }, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding})});
  427. //>>excludeEnd("ctx");
  428. },
  429. //>>excludeStart("ide", pragmas.excludeIdeData);
  430. args: ["aBinding"],
  431. source: "registerOn: aBinding\x0a\x09^ aBinding add: self asBinding",
  432. referencedClasses: [],
  433. //>>excludeEnd("ide");
  434. pragmas: [],
  435. messageSends: ["add:", "asBinding"]
  436. }),
  437. $globals.HLCommand);
  438. $core.addMethod(
  439. $core.method({
  440. selector: "concreteClasses",
  441. protocol: "registration",
  442. fn: function (){
  443. var self=this,$self=this;
  444. var classes;
  445. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  446. return $core.withContext(function($ctx1) {
  447. //>>excludeEnd("ctx");
  448. var $1;
  449. classes=$recv($globals.OrderedCollection)._new();
  450. $1=$self._isConcrete();
  451. if($core.assert($1)){
  452. $recv(classes)._add_(self);
  453. }
  454. $recv($self._subclasses())._do_((function(each){
  455. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  456. return $core.withContext(function($ctx2) {
  457. //>>excludeEnd("ctx");
  458. return $recv(classes)._addAll_($recv(each)._concreteClasses());
  459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  460. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  461. //>>excludeEnd("ctx");
  462. }));
  463. return classes;
  464. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  465. }, function($ctx1) {$ctx1.fill(self,"concreteClasses",{classes:classes})});
  466. //>>excludeEnd("ctx");
  467. },
  468. //>>excludeStart("ide", pragmas.excludeIdeData);
  469. args: [],
  470. source: "concreteClasses\x0a\x09| classes |\x0a\x09\x0a\x09classes := OrderedCollection new.\x0a\x09\x0a\x09self isConcrete\x0a\x09\x09ifTrue: [ classes add: self ].\x0a\x09\x09\x0a\x09self subclasses do: [ :each | \x0a\x09\x09classes addAll: each concreteClasses ].\x0a\x09\x09\x0a\x09^ classes",
  471. referencedClasses: ["OrderedCollection"],
  472. //>>excludeEnd("ide");
  473. pragmas: [],
  474. messageSends: ["new", "ifTrue:", "isConcrete", "add:", "do:", "subclasses", "addAll:", "concreteClasses"]
  475. }),
  476. $globals.HLCommand.a$cls);
  477. $core.addMethod(
  478. $core.method({
  479. selector: "documentation",
  480. protocol: "accessing",
  481. fn: function (){
  482. var self=this,$self=this;
  483. return "";
  484. },
  485. //>>excludeStart("ide", pragmas.excludeIdeData);
  486. args: [],
  487. source: "documentation\x0a\x09^ ''",
  488. referencedClasses: [],
  489. //>>excludeEnd("ide");
  490. pragmas: [],
  491. messageSends: []
  492. }),
  493. $globals.HLCommand.a$cls);
  494. $core.addMethod(
  495. $core.method({
  496. selector: "isConcrete",
  497. protocol: "testing",
  498. fn: function (){
  499. var self=this,$self=this;
  500. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  501. return $core.withContext(function($ctx1) {
  502. //>>excludeEnd("ctx");
  503. return $recv($self._key())._notNil();
  504. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  505. }, function($ctx1) {$ctx1.fill(self,"isConcrete",{})});
  506. //>>excludeEnd("ctx");
  507. },
  508. //>>excludeStart("ide", pragmas.excludeIdeData);
  509. args: [],
  510. source: "isConcrete\x0a\x09^ self key notNil",
  511. referencedClasses: [],
  512. //>>excludeEnd("ide");
  513. pragmas: [],
  514. messageSends: ["notNil", "key"]
  515. }),
  516. $globals.HLCommand.a$cls);
  517. $core.addMethod(
  518. $core.method({
  519. selector: "isValidFor:",
  520. protocol: "testing",
  521. fn: function (aModel){
  522. var self=this,$self=this;
  523. return true;
  524. },
  525. //>>excludeStart("ide", pragmas.excludeIdeData);
  526. args: ["aModel"],
  527. source: "isValidFor: aModel\x0a\x09^ true",
  528. referencedClasses: [],
  529. //>>excludeEnd("ide");
  530. pragmas: [],
  531. messageSends: []
  532. }),
  533. $globals.HLCommand.a$cls);
  534. $core.addMethod(
  535. $core.method({
  536. selector: "key",
  537. protocol: "accessing",
  538. fn: function (){
  539. var self=this,$self=this;
  540. return nil;
  541. },
  542. //>>excludeStart("ide", pragmas.excludeIdeData);
  543. args: [],
  544. source: "key\x0a\x09\x22Answer a single character string or nil if no key\x22\x0a\x09\x0a\x09^ nil",
  545. referencedClasses: [],
  546. //>>excludeEnd("ide");
  547. pragmas: [],
  548. messageSends: []
  549. }),
  550. $globals.HLCommand.a$cls);
  551. $core.addMethod(
  552. $core.method({
  553. selector: "label",
  554. protocol: "accessing",
  555. fn: function (){
  556. var self=this,$self=this;
  557. return "";
  558. },
  559. //>>excludeStart("ide", pragmas.excludeIdeData);
  560. args: [],
  561. source: "label\x0a\x09^ ''",
  562. referencedClasses: [],
  563. //>>excludeEnd("ide");
  564. pragmas: [],
  565. messageSends: []
  566. }),
  567. $globals.HLCommand.a$cls);
  568. $core.addMethod(
  569. $core.method({
  570. selector: "menuLabel",
  571. protocol: "accessing",
  572. fn: function (){
  573. var self=this,$self=this;
  574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  575. return $core.withContext(function($ctx1) {
  576. //>>excludeEnd("ctx");
  577. return $self._label();
  578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  579. }, function($ctx1) {$ctx1.fill(self,"menuLabel",{})});
  580. //>>excludeEnd("ctx");
  581. },
  582. //>>excludeStart("ide", pragmas.excludeIdeData);
  583. args: [],
  584. source: "menuLabel\x0a\x09^ self label",
  585. referencedClasses: [],
  586. //>>excludeEnd("ide");
  587. pragmas: [],
  588. messageSends: ["label"]
  589. }),
  590. $globals.HLCommand.a$cls);
  591. $core.addMethod(
  592. $core.method({
  593. selector: "registerConcreteClassesOn:",
  594. protocol: "accessing",
  595. fn: function (aBinding){
  596. var self=this,$self=this;
  597. var newBinding;
  598. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  599. return $core.withContext(function($ctx1) {
  600. //>>excludeEnd("ctx");
  601. var $1;
  602. $1=$self._isConcrete();
  603. if($core.assert($1)){
  604. newBinding=$self._registerOn_(aBinding);
  605. newBinding;
  606. } else {
  607. newBinding=aBinding;
  608. newBinding;
  609. }
  610. $recv($self._subclasses())._do_((function(each){
  611. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  612. return $core.withContext(function($ctx2) {
  613. //>>excludeEnd("ctx");
  614. return $recv(each)._registerConcreteClassesOn_(newBinding);
  615. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  616. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)});
  617. //>>excludeEnd("ctx");
  618. }));
  619. return self;
  620. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  621. }, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:",{aBinding:aBinding,newBinding:newBinding})});
  622. //>>excludeEnd("ctx");
  623. },
  624. //>>excludeStart("ide", pragmas.excludeIdeData);
  625. args: ["aBinding"],
  626. source: "registerConcreteClassesOn: aBinding\x0a\x09| newBinding |\x0a\x09\x0a\x09self isConcrete\x0a\x09\x09ifTrue: [ newBinding := self registerOn: aBinding ]\x0a\x09\x09ifFalse: [ newBinding := aBinding ].\x0a\x09\x09\x0a\x09self subclasses do: [ :each | each registerConcreteClassesOn: newBinding ]",
  627. referencedClasses: [],
  628. //>>excludeEnd("ide");
  629. pragmas: [],
  630. messageSends: ["ifTrue:ifFalse:", "isConcrete", "registerOn:", "do:", "subclasses", "registerConcreteClassesOn:"]
  631. }),
  632. $globals.HLCommand.a$cls);
  633. $core.addMethod(
  634. $core.method({
  635. selector: "registerOn:",
  636. protocol: "registration",
  637. fn: function (aBinding){
  638. var self=this,$self=this;
  639. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  640. return $core.withContext(function($ctx1) {
  641. //>>excludeEnd("ctx");
  642. return $recv($self._new())._registerOn_(aBinding);
  643. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  644. }, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding})});
  645. //>>excludeEnd("ctx");
  646. },
  647. //>>excludeStart("ide", pragmas.excludeIdeData);
  648. args: ["aBinding"],
  649. source: "registerOn: aBinding\x0a\x09^ self new registerOn: aBinding",
  650. referencedClasses: [],
  651. //>>excludeEnd("ide");
  652. pragmas: [],
  653. messageSends: ["registerOn:", "new"]
  654. }),
  655. $globals.HLCommand.a$cls);
  656. $core.addClass("HLCloseTabCommand", $globals.HLCommand, [], "Helios-Commands-Core");
  657. $core.addMethod(
  658. $core.method({
  659. selector: "execute",
  660. protocol: "executing",
  661. fn: function (){
  662. var self=this,$self=this;
  663. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  664. return $core.withContext(function($ctx1) {
  665. //>>excludeEnd("ctx");
  666. $recv($recv($globals.HLManager)._current())._removeActiveTab();
  667. return self;
  668. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  669. }, function($ctx1) {$ctx1.fill(self,"execute",{})});
  670. //>>excludeEnd("ctx");
  671. },
  672. //>>excludeStart("ide", pragmas.excludeIdeData);
  673. args: [],
  674. source: "execute\x0a\x09HLManager current removeActiveTab",
  675. referencedClasses: ["HLManager"],
  676. //>>excludeEnd("ide");
  677. pragmas: [],
  678. messageSends: ["removeActiveTab", "current"]
  679. }),
  680. $globals.HLCloseTabCommand);
  681. $core.addMethod(
  682. $core.method({
  683. selector: "key",
  684. protocol: "accessing",
  685. fn: function (){
  686. var self=this,$self=this;
  687. return "w";
  688. },
  689. //>>excludeStart("ide", pragmas.excludeIdeData);
  690. args: [],
  691. source: "key\x0a\x09^ 'w'",
  692. referencedClasses: [],
  693. //>>excludeEnd("ide");
  694. pragmas: [],
  695. messageSends: []
  696. }),
  697. $globals.HLCloseTabCommand.a$cls);
  698. $core.addMethod(
  699. $core.method({
  700. selector: "label",
  701. protocol: "accessing",
  702. fn: function (){
  703. var self=this,$self=this;
  704. return "Close tab";
  705. },
  706. //>>excludeStart("ide", pragmas.excludeIdeData);
  707. args: [],
  708. source: "label\x0a\x09^ 'Close tab'",
  709. referencedClasses: [],
  710. //>>excludeEnd("ide");
  711. pragmas: [],
  712. messageSends: []
  713. }),
  714. $globals.HLCloseTabCommand.a$cls);
  715. $core.addClass("HLModelCommand", $globals.HLCommand, ["model"], "Helios-Commands-Core");
  716. $core.addMethod(
  717. $core.method({
  718. selector: "model",
  719. protocol: "accessing",
  720. fn: function (){
  721. var self=this,$self=this;
  722. return $self.model;
  723. },
  724. //>>excludeStart("ide", pragmas.excludeIdeData);
  725. args: [],
  726. source: "model\x0a\x09^ model",
  727. referencedClasses: [],
  728. //>>excludeEnd("ide");
  729. pragmas: [],
  730. messageSends: []
  731. }),
  732. $globals.HLModelCommand);
  733. $core.addMethod(
  734. $core.method({
  735. selector: "model:",
  736. protocol: "accessing",
  737. fn: function (aModel){
  738. var self=this,$self=this;
  739. $self.model=aModel;
  740. return self;
  741. },
  742. //>>excludeStart("ide", pragmas.excludeIdeData);
  743. args: ["aModel"],
  744. source: "model: aModel\x0a\x09model := aModel",
  745. referencedClasses: [],
  746. //>>excludeEnd("ide");
  747. pragmas: [],
  748. messageSends: []
  749. }),
  750. $globals.HLModelCommand);
  751. $core.addMethod(
  752. $core.method({
  753. selector: "for:",
  754. protocol: "instance creation",
  755. fn: function (aModel){
  756. var self=this,$self=this;
  757. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  758. return $core.withContext(function($ctx1) {
  759. //>>excludeEnd("ctx");
  760. return $self._new();
  761. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  762. }, function($ctx1) {$ctx1.fill(self,"for:",{aModel:aModel})});
  763. //>>excludeEnd("ctx");
  764. },
  765. //>>excludeStart("ide", pragmas.excludeIdeData);
  766. args: ["aModel"],
  767. source: "for: aModel\x0a\x09^ self new",
  768. referencedClasses: [],
  769. //>>excludeEnd("ide");
  770. pragmas: [],
  771. messageSends: ["new"]
  772. }),
  773. $globals.HLModelCommand.a$cls);
  774. $core.addMethod(
  775. $core.method({
  776. selector: "registerConcreteClassesOn:for:",
  777. protocol: "registration",
  778. fn: function (aBinding,aModel){
  779. var self=this,$self=this;
  780. var newBinding;
  781. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  782. return $core.withContext(function($ctx1) {
  783. //>>excludeEnd("ctx");
  784. var $1;
  785. $1=$recv($self._isConcrete())._and_((function(){
  786. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  787. return $core.withContext(function($ctx2) {
  788. //>>excludeEnd("ctx");
  789. return $self._isValidFor_(aModel);
  790. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  791. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  792. //>>excludeEnd("ctx");
  793. }));
  794. if($core.assert($1)){
  795. newBinding=$self._registerOn_for_(aBinding,aModel);
  796. newBinding;
  797. } else {
  798. newBinding=aBinding;
  799. newBinding;
  800. }
  801. $recv($self._subclasses())._do_((function(each){
  802. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  803. return $core.withContext(function($ctx2) {
  804. //>>excludeEnd("ctx");
  805. return $recv(each)._registerConcreteClassesOn_for_(newBinding,aModel);
  806. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  807. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
  808. //>>excludeEnd("ctx");
  809. }));
  810. return self;
  811. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  812. }, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:for:",{aBinding:aBinding,aModel:aModel,newBinding:newBinding})});
  813. //>>excludeEnd("ctx");
  814. },
  815. //>>excludeStart("ide", pragmas.excludeIdeData);
  816. args: ["aBinding", "aModel"],
  817. source: "registerConcreteClassesOn: aBinding for: aModel\x0a\x09| newBinding |\x0a\x09\x0a\x09(self isConcrete and: [ self isValidFor: aModel ])\x0a\x09\x09ifTrue: [ newBinding := self registerOn: aBinding for: aModel ]\x0a\x09\x09ifFalse: [ newBinding := aBinding ].\x0a\x09\x09\x0a\x09self subclasses do: [ :each |\x0a\x09\x09each registerConcreteClassesOn: newBinding for: aModel ]",
  818. referencedClasses: [],
  819. //>>excludeEnd("ide");
  820. pragmas: [],
  821. messageSends: ["ifTrue:ifFalse:", "and:", "isConcrete", "isValidFor:", "registerOn:for:", "do:", "subclasses", "registerConcreteClassesOn:for:"]
  822. }),
  823. $globals.HLModelCommand.a$cls);
  824. $core.addMethod(
  825. $core.method({
  826. selector: "registerOn:for:",
  827. protocol: "registration",
  828. fn: function (aBinding,aModel){
  829. var self=this,$self=this;
  830. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  831. return $core.withContext(function($ctx1) {
  832. //>>excludeEnd("ctx");
  833. return $recv($self._for_(aModel))._registerOn_(aBinding);
  834. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  835. }, function($ctx1) {$ctx1.fill(self,"registerOn:for:",{aBinding:aBinding,aModel:aModel})});
  836. //>>excludeEnd("ctx");
  837. },
  838. //>>excludeStart("ide", pragmas.excludeIdeData);
  839. args: ["aBinding", "aModel"],
  840. source: "registerOn: aBinding for: aModel\x0a\x09^ (self for: aModel) registerOn: aBinding",
  841. referencedClasses: [],
  842. //>>excludeEnd("ide");
  843. pragmas: [],
  844. messageSends: ["registerOn:", "for:"]
  845. }),
  846. $globals.HLModelCommand.a$cls);
  847. $core.addClass("HLOpenCommand", $globals.HLCommand, [], "Helios-Commands-Core");
  848. $core.addMethod(
  849. $core.method({
  850. selector: "key",
  851. protocol: "accessing",
  852. fn: function (){
  853. var self=this,$self=this;
  854. return "o";
  855. },
  856. //>>excludeStart("ide", pragmas.excludeIdeData);
  857. args: [],
  858. source: "key\x0a\x09^ 'o'",
  859. referencedClasses: [],
  860. //>>excludeEnd("ide");
  861. pragmas: [],
  862. messageSends: []
  863. }),
  864. $globals.HLOpenCommand.a$cls);
  865. $core.addMethod(
  866. $core.method({
  867. selector: "label",
  868. protocol: "accessing",
  869. fn: function (){
  870. var self=this,$self=this;
  871. return "Open";
  872. },
  873. //>>excludeStart("ide", pragmas.excludeIdeData);
  874. args: [],
  875. source: "label\x0a\x09^ 'Open'",
  876. referencedClasses: [],
  877. //>>excludeEnd("ide");
  878. pragmas: [],
  879. messageSends: []
  880. }),
  881. $globals.HLOpenCommand.a$cls);
  882. $core.addClass("HLOpenBrowserCommand", $globals.HLOpenCommand, [], "Helios-Commands-Core");
  883. $core.addMethod(
  884. $core.method({
  885. selector: "execute",
  886. protocol: "executing",
  887. fn: function (){
  888. var self=this,$self=this;
  889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  890. return $core.withContext(function($ctx1) {
  891. //>>excludeEnd("ctx");
  892. return $recv($globals.HLBrowser)._openAsTab();
  893. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  894. }, function($ctx1) {$ctx1.fill(self,"execute",{})});
  895. //>>excludeEnd("ctx");
  896. },
  897. //>>excludeStart("ide", pragmas.excludeIdeData);
  898. args: [],
  899. source: "execute\x0a\x09^ HLBrowser openAsTab",
  900. referencedClasses: ["HLBrowser"],
  901. //>>excludeEnd("ide");
  902. pragmas: [],
  903. messageSends: ["openAsTab"]
  904. }),
  905. $globals.HLOpenBrowserCommand);
  906. $core.addMethod(
  907. $core.method({
  908. selector: "key",
  909. protocol: "accessing",
  910. fn: function (){
  911. var self=this,$self=this;
  912. return "b";
  913. },
  914. //>>excludeStart("ide", pragmas.excludeIdeData);
  915. args: [],
  916. source: "key\x0a\x09^ 'b'",
  917. referencedClasses: [],
  918. //>>excludeEnd("ide");
  919. pragmas: [],
  920. messageSends: []
  921. }),
  922. $globals.HLOpenBrowserCommand.a$cls);
  923. $core.addMethod(
  924. $core.method({
  925. selector: "label",
  926. protocol: "accessing",
  927. fn: function (){
  928. var self=this,$self=this;
  929. return "Browser";
  930. },
  931. //>>excludeStart("ide", pragmas.excludeIdeData);
  932. args: [],
  933. source: "label\x0a\x09^ 'Browser'",
  934. referencedClasses: [],
  935. //>>excludeEnd("ide");
  936. pragmas: [],
  937. messageSends: []
  938. }),
  939. $globals.HLOpenBrowserCommand.a$cls);
  940. $core.addClass("HLOpenSUnitCommand", $globals.HLOpenCommand, [], "Helios-Commands-Core");
  941. $core.addMethod(
  942. $core.method({
  943. selector: "execute",
  944. protocol: "executing",
  945. fn: function (){
  946. var self=this,$self=this;
  947. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  948. return $core.withContext(function($ctx1) {
  949. //>>excludeEnd("ctx");
  950. return $recv($globals.HLSUnit)._openAsTab();
  951. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  952. }, function($ctx1) {$ctx1.fill(self,"execute",{})});
  953. //>>excludeEnd("ctx");
  954. },
  955. //>>excludeStart("ide", pragmas.excludeIdeData);
  956. args: [],
  957. source: "execute\x0a\x09^ HLSUnit openAsTab",
  958. referencedClasses: ["HLSUnit"],
  959. //>>excludeEnd("ide");
  960. pragmas: [],
  961. messageSends: ["openAsTab"]
  962. }),
  963. $globals.HLOpenSUnitCommand);
  964. $core.addMethod(
  965. $core.method({
  966. selector: "key",
  967. protocol: "accessing",
  968. fn: function (){
  969. var self=this,$self=this;
  970. return "s";
  971. },
  972. //>>excludeStart("ide", pragmas.excludeIdeData);
  973. args: [],
  974. source: "key\x0a\x09^ 's'",
  975. referencedClasses: [],
  976. //>>excludeEnd("ide");
  977. pragmas: [],
  978. messageSends: []
  979. }),
  980. $globals.HLOpenSUnitCommand.a$cls);
  981. $core.addMethod(
  982. $core.method({
  983. selector: "label",
  984. protocol: "accessing",
  985. fn: function (){
  986. var self=this,$self=this;
  987. return "SUnit";
  988. },
  989. //>>excludeStart("ide", pragmas.excludeIdeData);
  990. args: [],
  991. source: "label\x0a\x09^ 'SUnit'",
  992. referencedClasses: [],
  993. //>>excludeEnd("ide");
  994. pragmas: [],
  995. messageSends: []
  996. }),
  997. $globals.HLOpenSUnitCommand.a$cls);
  998. $core.addClass("HLOpenWorkspaceCommand", $globals.HLOpenCommand, [], "Helios-Commands-Core");
  999. $core.addMethod(
  1000. $core.method({
  1001. selector: "execute",
  1002. protocol: "executing",
  1003. fn: function (){
  1004. var self=this,$self=this;
  1005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1006. return $core.withContext(function($ctx1) {
  1007. //>>excludeEnd("ctx");
  1008. return $recv($globals.HLWorkspace)._openAsTab();
  1009. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1010. }, function($ctx1) {$ctx1.fill(self,"execute",{})});
  1011. //>>excludeEnd("ctx");
  1012. },
  1013. //>>excludeStart("ide", pragmas.excludeIdeData);
  1014. args: [],
  1015. source: "execute\x0a\x09^ HLWorkspace openAsTab",
  1016. referencedClasses: ["HLWorkspace"],
  1017. //>>excludeEnd("ide");
  1018. pragmas: [],
  1019. messageSends: ["openAsTab"]
  1020. }),
  1021. $globals.HLOpenWorkspaceCommand);
  1022. $core.addMethod(
  1023. $core.method({
  1024. selector: "key",
  1025. protocol: "accessing",
  1026. fn: function (){
  1027. var self=this,$self=this;
  1028. return "w";
  1029. },
  1030. //>>excludeStart("ide", pragmas.excludeIdeData);
  1031. args: [],
  1032. source: "key\x0a\x09^ 'w'",
  1033. referencedClasses: [],
  1034. //>>excludeEnd("ide");
  1035. pragmas: [],
  1036. messageSends: []
  1037. }),
  1038. $globals.HLOpenWorkspaceCommand.a$cls);
  1039. $core.addMethod(
  1040. $core.method({
  1041. selector: "label",
  1042. protocol: "accessing",
  1043. fn: function (){
  1044. var self=this,$self=this;
  1045. return "Workspace";
  1046. },
  1047. //>>excludeStart("ide", pragmas.excludeIdeData);
  1048. args: [],
  1049. source: "label\x0a\x09^ 'Workspace'",
  1050. referencedClasses: [],
  1051. //>>excludeEnd("ide");
  1052. pragmas: [],
  1053. messageSends: []
  1054. }),
  1055. $globals.HLOpenWorkspaceCommand.a$cls);
  1056. $core.addClass("HLSwitchTabCommand", $globals.HLCommand, [], "Helios-Commands-Core");
  1057. $core.addMethod(
  1058. $core.method({
  1059. selector: "execute",
  1060. protocol: "executing",
  1061. fn: function (){
  1062. var self=this,$self=this;
  1063. var activeTab;
  1064. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1065. return $core.withContext(function($ctx1) {
  1066. //>>excludeEnd("ctx");
  1067. var $1;
  1068. activeTab=$self._selectedTab();
  1069. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1070. $ctx1.sendIdx["selectedTab"]=1;
  1071. //>>excludeEnd("ctx");
  1072. $1=$recv($globals.HLTabSelectionWidget)._new();
  1073. $recv($1)._tabs_($self._tabs());
  1074. $recv($1)._selectedTab_($self._selectedTab());
  1075. $recv($1)._selectCallback_((function(tab){
  1076. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1077. return $core.withContext(function($ctx2) {
  1078. //>>excludeEnd("ctx");
  1079. return $recv(tab)._activate();
  1080. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1081. $ctx2.sendIdx["activate"]=1;
  1082. //>>excludeEnd("ctx");
  1083. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1084. }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1,1)});
  1085. //>>excludeEnd("ctx");
  1086. }));
  1087. $recv($1)._confirmCallback_((function(tab){
  1088. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1089. return $core.withContext(function($ctx2) {
  1090. //>>excludeEnd("ctx");
  1091. return $recv(tab)._focus();
  1092. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1093. }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1,2)});
  1094. //>>excludeEnd("ctx");
  1095. }));
  1096. $recv($1)._cancelCallback_((function(){
  1097. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1098. return $core.withContext(function($ctx2) {
  1099. //>>excludeEnd("ctx");
  1100. return $recv(activeTab)._activate();
  1101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1102. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  1103. //>>excludeEnd("ctx");
  1104. }));
  1105. return $recv($1)._show();
  1106. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1107. }, function($ctx1) {$ctx1.fill(self,"execute",{activeTab:activeTab})});
  1108. //>>excludeEnd("ctx");
  1109. },
  1110. //>>excludeStart("ide", pragmas.excludeIdeData);
  1111. args: [],
  1112. source: "execute\x0a\x09| activeTab |\x0a\x09\x0a\x09activeTab := self selectedTab.\x0a\x09\x0a\x09^ HLTabSelectionWidget new\x0a\x09\x09tabs: self tabs;\x0a\x09\x09selectedTab: self selectedTab;\x0a\x09\x09selectCallback: [ :tab | tab activate ];\x0a\x09\x09confirmCallback: [ :tab | tab focus ];\x0a\x09\x09cancelCallback: [ activeTab activate ];\x0a\x09\x09show",
  1113. referencedClasses: ["HLTabSelectionWidget"],
  1114. //>>excludeEnd("ide");
  1115. pragmas: [],
  1116. messageSends: ["selectedTab", "tabs:", "new", "tabs", "selectedTab:", "selectCallback:", "activate", "confirmCallback:", "focus", "cancelCallback:", "show"]
  1117. }),
  1118. $globals.HLSwitchTabCommand);
  1119. $core.addMethod(
  1120. $core.method({
  1121. selector: "selectedTab",
  1122. protocol: "accessing",
  1123. fn: function (){
  1124. var self=this,$self=this;
  1125. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1126. return $core.withContext(function($ctx1) {
  1127. //>>excludeEnd("ctx");
  1128. return $recv($recv($globals.HLManager)._current())._activeTab();
  1129. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1130. }, function($ctx1) {$ctx1.fill(self,"selectedTab",{})});
  1131. //>>excludeEnd("ctx");
  1132. },
  1133. //>>excludeStart("ide", pragmas.excludeIdeData);
  1134. args: [],
  1135. source: "selectedTab\x0a\x09^ HLManager current activeTab",
  1136. referencedClasses: ["HLManager"],
  1137. //>>excludeEnd("ide");
  1138. pragmas: [],
  1139. messageSends: ["activeTab", "current"]
  1140. }),
  1141. $globals.HLSwitchTabCommand);
  1142. $core.addMethod(
  1143. $core.method({
  1144. selector: "tabs",
  1145. protocol: "accessing",
  1146. fn: function (){
  1147. var self=this,$self=this;
  1148. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1149. return $core.withContext(function($ctx1) {
  1150. //>>excludeEnd("ctx");
  1151. return $recv($recv($globals.HLManager)._current())._tabs();
  1152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1153. }, function($ctx1) {$ctx1.fill(self,"tabs",{})});
  1154. //>>excludeEnd("ctx");
  1155. },
  1156. //>>excludeStart("ide", pragmas.excludeIdeData);
  1157. args: [],
  1158. source: "tabs\x0a\x09^ HLManager current tabs",
  1159. referencedClasses: ["HLManager"],
  1160. //>>excludeEnd("ide");
  1161. pragmas: [],
  1162. messageSends: ["tabs", "current"]
  1163. }),
  1164. $globals.HLSwitchTabCommand);
  1165. $core.addMethod(
  1166. $core.method({
  1167. selector: "key",
  1168. protocol: "accessing",
  1169. fn: function (){
  1170. var self=this,$self=this;
  1171. return "s";
  1172. },
  1173. //>>excludeStart("ide", pragmas.excludeIdeData);
  1174. args: [],
  1175. source: "key\x0a\x09^ 's'",
  1176. referencedClasses: [],
  1177. //>>excludeEnd("ide");
  1178. pragmas: [],
  1179. messageSends: []
  1180. }),
  1181. $globals.HLSwitchTabCommand.a$cls);
  1182. $core.addMethod(
  1183. $core.method({
  1184. selector: "label",
  1185. protocol: "accessing",
  1186. fn: function (){
  1187. var self=this,$self=this;
  1188. return "Switch tab";
  1189. },
  1190. //>>excludeStart("ide", pragmas.excludeIdeData);
  1191. args: [],
  1192. source: "label\x0a\x09^ 'Switch tab'",
  1193. referencedClasses: [],
  1194. //>>excludeEnd("ide");
  1195. pragmas: [],
  1196. messageSends: []
  1197. }),
  1198. $globals.HLSwitchTabCommand.a$cls);
  1199. $core.addClass("HLViewCommand", $globals.HLCommand, [], "Helios-Commands-Core");
  1200. $core.addMethod(
  1201. $core.method({
  1202. selector: "label",
  1203. protocol: "accessing",
  1204. fn: function (){
  1205. var self=this,$self=this;
  1206. return "View";
  1207. },
  1208. //>>excludeStart("ide", pragmas.excludeIdeData);
  1209. args: [],
  1210. source: "label\x0a\x09^ 'View'",
  1211. referencedClasses: [],
  1212. //>>excludeEnd("ide");
  1213. pragmas: [],
  1214. messageSends: []
  1215. }),
  1216. $globals.HLViewCommand.a$cls);
  1217. });