Helios-Commands-Core.deploy.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. (function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Helios-Commands-Core');
  3. smalltalk.addClass('HLCommand', smalltalk.Object, ['input'], 'Helios-Commands-Core');
  4. smalltalk.addMethod(
  5. smalltalk.method({
  6. selector: "asActionBinding",
  7. fn: function (){
  8. var self=this;
  9. function $HLBindingAction(){return smalltalk.HLBindingAction||(typeof HLBindingAction=="undefined"?nil:HLBindingAction)}
  10. return smalltalk.withContext(function($ctx1) {
  11. var $2,$3,$1;
  12. $2=_st($HLBindingAction())._on_labelled_(self._keyCode(),self._label());
  13. _st($2)._command_(self);
  14. $3=_st($2)._yourself();
  15. $1=$3;
  16. return $1;
  17. }, function($ctx1) {$ctx1.fill(self,"asActionBinding",{},smalltalk.HLCommand)})},
  18. messageSends: ["command:", "on:labelled:", "keyCode", "label", "yourself"]}),
  19. smalltalk.HLCommand);
  20. smalltalk.addMethod(
  21. smalltalk.method({
  22. selector: "asBinding",
  23. fn: function (){
  24. var self=this;
  25. return smalltalk.withContext(function($ctx1) {
  26. var $2,$1;
  27. $2=self._isBindingGroup();
  28. if(smalltalk.assert($2)){
  29. $1=self._asGroupBinding();
  30. } else {
  31. $1=self._asActionBinding();
  32. };
  33. return $1;
  34. }, function($ctx1) {$ctx1.fill(self,"asBinding",{},smalltalk.HLCommand)})},
  35. messageSends: ["ifTrue:ifFalse:", "asGroupBinding", "asActionBinding", "isBindingGroup"]}),
  36. smalltalk.HLCommand);
  37. smalltalk.addMethod(
  38. smalltalk.method({
  39. selector: "asGroupBinding",
  40. fn: function (){
  41. var self=this;
  42. function $HLBindingGroup(){return smalltalk.HLBindingGroup||(typeof HLBindingGroup=="undefined"?nil:HLBindingGroup)}
  43. return smalltalk.withContext(function($ctx1) {
  44. var $1;
  45. $1=_st($HLBindingGroup())._on_labelled_(self._keyCode(),self._label());
  46. return $1;
  47. }, function($ctx1) {$ctx1.fill(self,"asGroupBinding",{},smalltalk.HLCommand)})},
  48. messageSends: ["on:labelled:", "keyCode", "label"]}),
  49. smalltalk.HLCommand);
  50. smalltalk.addMethod(
  51. smalltalk.method({
  52. selector: "commandError:",
  53. fn: function (aString){
  54. var self=this;
  55. return smalltalk.withContext(function($ctx1) {
  56. self._error_(aString);
  57. return self}, function($ctx1) {$ctx1.fill(self,"commandError:",{aString:aString},smalltalk.HLCommand)})},
  58. messageSends: ["error:"]}),
  59. smalltalk.HLCommand);
  60. smalltalk.addMethod(
  61. smalltalk.method({
  62. selector: "defaultInput",
  63. fn: function (){
  64. var self=this;
  65. return smalltalk.withContext(function($ctx1) {
  66. return "";
  67. }, function($ctx1) {$ctx1.fill(self,"defaultInput",{},smalltalk.HLCommand)})},
  68. messageSends: []}),
  69. smalltalk.HLCommand);
  70. smalltalk.addMethod(
  71. smalltalk.method({
  72. selector: "documentation",
  73. fn: function (){
  74. var self=this;
  75. return smalltalk.withContext(function($ctx1) {
  76. var $1;
  77. $1=_st(self._class())._documentation();
  78. return $1;
  79. }, function($ctx1) {$ctx1.fill(self,"documentation",{},smalltalk.HLCommand)})},
  80. messageSends: ["documentation", "class"]}),
  81. smalltalk.HLCommand);
  82. smalltalk.addMethod(
  83. smalltalk.method({
  84. selector: "execute",
  85. fn: function (){
  86. var self=this;
  87. return smalltalk.withContext(function($ctx1) {
  88. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLCommand)})},
  89. messageSends: []}),
  90. smalltalk.HLCommand);
  91. smalltalk.addMethod(
  92. smalltalk.method({
  93. selector: "input",
  94. fn: function (){
  95. var self=this;
  96. return smalltalk.withContext(function($ctx1) {
  97. var $1;
  98. $1=self["@input"];
  99. return $1;
  100. }, function($ctx1) {$ctx1.fill(self,"input",{},smalltalk.HLCommand)})},
  101. messageSends: []}),
  102. smalltalk.HLCommand);
  103. smalltalk.addMethod(
  104. smalltalk.method({
  105. selector: "input:",
  106. fn: function (aString){
  107. var self=this;
  108. return smalltalk.withContext(function($ctx1) {
  109. var $1;
  110. self["@input"]=aString;
  111. $1=self["@input"];
  112. return $1;
  113. }, function($ctx1) {$ctx1.fill(self,"input:",{aString:aString},smalltalk.HLCommand)})},
  114. messageSends: []}),
  115. smalltalk.HLCommand);
  116. smalltalk.addMethod(
  117. smalltalk.method({
  118. selector: "inputCompletion",
  119. fn: function (){
  120. var self=this;
  121. return smalltalk.withContext(function($ctx1) {
  122. var $1;
  123. $1=[];
  124. return $1;
  125. }, function($ctx1) {$ctx1.fill(self,"inputCompletion",{},smalltalk.HLCommand)})},
  126. messageSends: []}),
  127. smalltalk.HLCommand);
  128. smalltalk.addMethod(
  129. smalltalk.method({
  130. selector: "inputLabel",
  131. fn: function (){
  132. var self=this;
  133. return smalltalk.withContext(function($ctx1) {
  134. var $1;
  135. $1=self._label();
  136. return $1;
  137. }, function($ctx1) {$ctx1.fill(self,"inputLabel",{},smalltalk.HLCommand)})},
  138. messageSends: ["label"]}),
  139. smalltalk.HLCommand);
  140. smalltalk.addMethod(
  141. smalltalk.method({
  142. selector: "isAction",
  143. fn: function (){
  144. var self=this;
  145. return smalltalk.withContext(function($ctx1) {
  146. var $1;
  147. $1=_st(self._isBindingGroup())._not();
  148. return $1;
  149. }, function($ctx1) {$ctx1.fill(self,"isAction",{},smalltalk.HLCommand)})},
  150. messageSends: ["not", "isBindingGroup"]}),
  151. smalltalk.HLCommand);
  152. smalltalk.addMethod(
  153. smalltalk.method({
  154. selector: "isActive",
  155. fn: function (){
  156. var self=this;
  157. return smalltalk.withContext(function($ctx1) {
  158. return true;
  159. }, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLCommand)})},
  160. messageSends: []}),
  161. smalltalk.HLCommand);
  162. smalltalk.addMethod(
  163. smalltalk.method({
  164. selector: "isBindingGroup",
  165. fn: function (){
  166. var self=this;
  167. return smalltalk.withContext(function($ctx1) {
  168. var $1;
  169. $1=_st(_st(_st(self._class())._methodDictionary())._includesKey_("execute"))._not();
  170. return $1;
  171. }, function($ctx1) {$ctx1.fill(self,"isBindingGroup",{},smalltalk.HLCommand)})},
  172. messageSends: ["not", "includesKey:", "methodDictionary", "class"]}),
  173. smalltalk.HLCommand);
  174. smalltalk.addMethod(
  175. smalltalk.method({
  176. selector: "isInputRequired",
  177. fn: function (){
  178. var self=this;
  179. return smalltalk.withContext(function($ctx1) {
  180. return false;
  181. }, function($ctx1) {$ctx1.fill(self,"isInputRequired",{},smalltalk.HLCommand)})},
  182. messageSends: []}),
  183. smalltalk.HLCommand);
  184. smalltalk.addMethod(
  185. smalltalk.method({
  186. selector: "key",
  187. fn: function (){
  188. var self=this;
  189. return smalltalk.withContext(function($ctx1) {
  190. var $1;
  191. $1=_st(self._class())._key();
  192. return $1;
  193. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCommand)})},
  194. messageSends: ["key", "class"]}),
  195. smalltalk.HLCommand);
  196. smalltalk.addMethod(
  197. smalltalk.method({
  198. selector: "keyCode",
  199. fn: function (){
  200. var self=this;
  201. return smalltalk.withContext(function($ctx1) {
  202. var $1;
  203. $1=_st(_st(self._key())._asUppercase())._charCodeAt_((1));
  204. return $1;
  205. }, function($ctx1) {$ctx1.fill(self,"keyCode",{},smalltalk.HLCommand)})},
  206. messageSends: ["charCodeAt:", "asUppercase", "key"]}),
  207. smalltalk.HLCommand);
  208. smalltalk.addMethod(
  209. smalltalk.method({
  210. selector: "label",
  211. fn: function (){
  212. var self=this;
  213. return smalltalk.withContext(function($ctx1) {
  214. var $1;
  215. $1=_st(self._class())._label();
  216. return $1;
  217. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLCommand)})},
  218. messageSends: ["label", "class"]}),
  219. smalltalk.HLCommand);
  220. smalltalk.addMethod(
  221. smalltalk.method({
  222. selector: "menuLabel",
  223. fn: function (){
  224. var self=this;
  225. return smalltalk.withContext(function($ctx1) {
  226. var $1;
  227. $1=_st(self._class())._menuLabel();
  228. return $1;
  229. }, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLCommand)})},
  230. messageSends: ["menuLabel", "class"]}),
  231. smalltalk.HLCommand);
  232. smalltalk.addMethod(
  233. smalltalk.method({
  234. selector: "registerOn:",
  235. fn: function (aBinding){
  236. var self=this;
  237. return smalltalk.withContext(function($ctx1) {
  238. var $1;
  239. $1=_st(aBinding)._add_(self._asBinding());
  240. return $1;
  241. }, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding},smalltalk.HLCommand)})},
  242. messageSends: ["add:", "asBinding"]}),
  243. smalltalk.HLCommand);
  244. smalltalk.addMethod(
  245. smalltalk.method({
  246. selector: "concreteClasses",
  247. fn: function (){
  248. var self=this;
  249. var classes;
  250. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  251. return smalltalk.withContext(function($ctx1) {
  252. var $1,$2;
  253. classes=_st($OrderedCollection())._new();
  254. $1=self._isConcrete();
  255. if(smalltalk.assert($1)){
  256. _st(classes)._add_(self);
  257. };
  258. _st(self._subclasses())._do_((function(each){
  259. return smalltalk.withContext(function($ctx2) {
  260. return _st(classes)._addAll_(_st(each)._concreteClasses());
  261. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  262. $2=classes;
  263. return $2;
  264. }, function($ctx1) {$ctx1.fill(self,"concreteClasses",{classes:classes},smalltalk.HLCommand.klass)})},
  265. messageSends: ["new", "ifTrue:", "add:", "isConcrete", "do:", "addAll:", "concreteClasses", "subclasses"]}),
  266. smalltalk.HLCommand.klass);
  267. smalltalk.addMethod(
  268. smalltalk.method({
  269. selector: "documentation",
  270. fn: function (){
  271. var self=this;
  272. return smalltalk.withContext(function($ctx1) {
  273. return "";
  274. }, function($ctx1) {$ctx1.fill(self,"documentation",{},smalltalk.HLCommand.klass)})},
  275. messageSends: []}),
  276. smalltalk.HLCommand.klass);
  277. smalltalk.addMethod(
  278. smalltalk.method({
  279. selector: "isConcrete",
  280. fn: function (){
  281. var self=this;
  282. return smalltalk.withContext(function($ctx1) {
  283. var $1;
  284. $1=_st(self._key())._notNil();
  285. return $1;
  286. }, function($ctx1) {$ctx1.fill(self,"isConcrete",{},smalltalk.HLCommand.klass)})},
  287. messageSends: ["notNil", "key"]}),
  288. smalltalk.HLCommand.klass);
  289. smalltalk.addMethod(
  290. smalltalk.method({
  291. selector: "isValidFor:",
  292. fn: function (aModel){
  293. var self=this;
  294. return smalltalk.withContext(function($ctx1) {
  295. return true;
  296. }, function($ctx1) {$ctx1.fill(self,"isValidFor:",{aModel:aModel},smalltalk.HLCommand.klass)})},
  297. messageSends: []}),
  298. smalltalk.HLCommand.klass);
  299. smalltalk.addMethod(
  300. smalltalk.method({
  301. selector: "key",
  302. fn: function (){
  303. var self=this;
  304. return smalltalk.withContext(function($ctx1) {
  305. return nil;
  306. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCommand.klass)})},
  307. messageSends: []}),
  308. smalltalk.HLCommand.klass);
  309. smalltalk.addMethod(
  310. smalltalk.method({
  311. selector: "label",
  312. fn: function (){
  313. var self=this;
  314. return smalltalk.withContext(function($ctx1) {
  315. return "";
  316. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLCommand.klass)})},
  317. messageSends: []}),
  318. smalltalk.HLCommand.klass);
  319. smalltalk.addMethod(
  320. smalltalk.method({
  321. selector: "menuLabel",
  322. fn: function (){
  323. var self=this;
  324. return smalltalk.withContext(function($ctx1) {
  325. var $1;
  326. $1=self._label();
  327. return $1;
  328. }, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLCommand.klass)})},
  329. messageSends: ["label"]}),
  330. smalltalk.HLCommand.klass);
  331. smalltalk.addMethod(
  332. smalltalk.method({
  333. selector: "registerConcreteClassesOn:",
  334. fn: function (aBinding){
  335. var self=this;
  336. var newBinding;
  337. return smalltalk.withContext(function($ctx1) {
  338. var $1;
  339. $1=self._isConcrete();
  340. if(smalltalk.assert($1)){
  341. newBinding=self._registerOn_(aBinding);
  342. newBinding;
  343. } else {
  344. newBinding=aBinding;
  345. newBinding;
  346. };
  347. _st(self._subclasses())._do_((function(each){
  348. return smalltalk.withContext(function($ctx2) {
  349. return _st(each)._registerConcreteClassesOn_(newBinding);
  350. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  351. return self}, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:",{aBinding:aBinding,newBinding:newBinding},smalltalk.HLCommand.klass)})},
  352. messageSends: ["ifTrue:ifFalse:", "registerOn:", "isConcrete", "do:", "registerConcreteClassesOn:", "subclasses"]}),
  353. smalltalk.HLCommand.klass);
  354. smalltalk.addMethod(
  355. smalltalk.method({
  356. selector: "registerOn:",
  357. fn: function (aBinding){
  358. var self=this;
  359. return smalltalk.withContext(function($ctx1) {
  360. var $1;
  361. $1=_st(self._new())._registerOn_(aBinding);
  362. return $1;
  363. }, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding},smalltalk.HLCommand.klass)})},
  364. messageSends: ["registerOn:", "new"]}),
  365. smalltalk.HLCommand.klass);
  366. smalltalk.addClass('HLCloseTabCommand', smalltalk.HLCommand, [], 'Helios-Commands-Core');
  367. smalltalk.addMethod(
  368. smalltalk.method({
  369. selector: "execute",
  370. fn: function (){
  371. var self=this;
  372. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  373. return smalltalk.withContext(function($ctx1) {
  374. _st(_st($HLManager())._current())._removeActiveTab();
  375. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLCloseTabCommand)})},
  376. messageSends: ["removeActiveTab", "current"]}),
  377. smalltalk.HLCloseTabCommand);
  378. smalltalk.addMethod(
  379. smalltalk.method({
  380. selector: "key",
  381. fn: function (){
  382. var self=this;
  383. return smalltalk.withContext(function($ctx1) {
  384. return "w";
  385. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCloseTabCommand.klass)})},
  386. messageSends: []}),
  387. smalltalk.HLCloseTabCommand.klass);
  388. smalltalk.addMethod(
  389. smalltalk.method({
  390. selector: "label",
  391. fn: function (){
  392. var self=this;
  393. return smalltalk.withContext(function($ctx1) {
  394. return "Close tab";
  395. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLCloseTabCommand.klass)})},
  396. messageSends: []}),
  397. smalltalk.HLCloseTabCommand.klass);
  398. smalltalk.addClass('HLModelCommand', smalltalk.HLCommand, ['model'], 'Helios-Commands-Core');
  399. smalltalk.addMethod(
  400. smalltalk.method({
  401. selector: "model",
  402. fn: function (){
  403. var self=this;
  404. return smalltalk.withContext(function($ctx1) {
  405. var $1;
  406. $1=self["@model"];
  407. return $1;
  408. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLModelCommand)})},
  409. messageSends: []}),
  410. smalltalk.HLModelCommand);
  411. smalltalk.addMethod(
  412. smalltalk.method({
  413. selector: "model:",
  414. fn: function (aModel){
  415. var self=this;
  416. return smalltalk.withContext(function($ctx1) {
  417. self["@model"]=aModel;
  418. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLModelCommand)})},
  419. messageSends: []}),
  420. smalltalk.HLModelCommand);
  421. smalltalk.addMethod(
  422. smalltalk.method({
  423. selector: "for:",
  424. fn: function (aModel){
  425. var self=this;
  426. return smalltalk.withContext(function($ctx1) {
  427. var $1;
  428. $1=self._new();
  429. return $1;
  430. }, function($ctx1) {$ctx1.fill(self,"for:",{aModel:aModel},smalltalk.HLModelCommand.klass)})},
  431. messageSends: ["new"]}),
  432. smalltalk.HLModelCommand.klass);
  433. smalltalk.addMethod(
  434. smalltalk.method({
  435. selector: "registerConcreteClassesOn:for:",
  436. fn: function (aBinding,aModel){
  437. var self=this;
  438. var newBinding;
  439. return smalltalk.withContext(function($ctx1) {
  440. var $1;
  441. $1=_st(self._isConcrete())._and_((function(){
  442. return smalltalk.withContext(function($ctx2) {
  443. return self._isValidFor_(aModel);
  444. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  445. if(smalltalk.assert($1)){
  446. newBinding=self._registerOn_for_(aBinding,aModel);
  447. newBinding;
  448. } else {
  449. newBinding=aBinding;
  450. newBinding;
  451. };
  452. _st(self._subclasses())._do_((function(each){
  453. return smalltalk.withContext(function($ctx2) {
  454. return _st(each)._registerConcreteClassesOn_for_(newBinding,aModel);
  455. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  456. return self}, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:for:",{aBinding:aBinding,aModel:aModel,newBinding:newBinding},smalltalk.HLModelCommand.klass)})},
  457. messageSends: ["ifTrue:ifFalse:", "registerOn:for:", "and:", "isValidFor:", "isConcrete", "do:", "registerConcreteClassesOn:for:", "subclasses"]}),
  458. smalltalk.HLModelCommand.klass);
  459. smalltalk.addMethod(
  460. smalltalk.method({
  461. selector: "registerOn:for:",
  462. fn: function (aBinding,aModel){
  463. var self=this;
  464. return smalltalk.withContext(function($ctx1) {
  465. var $1;
  466. $1=_st(self._for_(aModel))._registerOn_(aBinding);
  467. return $1;
  468. }, function($ctx1) {$ctx1.fill(self,"registerOn:for:",{aBinding:aBinding,aModel:aModel},smalltalk.HLModelCommand.klass)})},
  469. messageSends: ["registerOn:", "for:"]}),
  470. smalltalk.HLModelCommand.klass);
  471. smalltalk.addClass('HLOpenCommand', smalltalk.HLCommand, [], 'Helios-Commands-Core');
  472. smalltalk.addMethod(
  473. smalltalk.method({
  474. selector: "key",
  475. fn: function (){
  476. var self=this;
  477. return smalltalk.withContext(function($ctx1) {
  478. return "o";
  479. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenCommand.klass)})},
  480. messageSends: []}),
  481. smalltalk.HLOpenCommand.klass);
  482. smalltalk.addMethod(
  483. smalltalk.method({
  484. selector: "label",
  485. fn: function (){
  486. var self=this;
  487. return smalltalk.withContext(function($ctx1) {
  488. return "Open";
  489. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenCommand.klass)})},
  490. messageSends: []}),
  491. smalltalk.HLOpenCommand.klass);
  492. smalltalk.addClass('HLOpenBrowserCommand', smalltalk.HLOpenCommand, [], 'Helios-Commands-Core');
  493. smalltalk.addMethod(
  494. smalltalk.method({
  495. selector: "execute",
  496. fn: function (){
  497. var self=this;
  498. function $HLBrowser(){return smalltalk.HLBrowser||(typeof HLBrowser=="undefined"?nil:HLBrowser)}
  499. return smalltalk.withContext(function($ctx1) {
  500. var $1;
  501. $1=_st($HLBrowser())._openAsTab();
  502. return $1;
  503. }, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLOpenBrowserCommand)})},
  504. messageSends: ["openAsTab"]}),
  505. smalltalk.HLOpenBrowserCommand);
  506. smalltalk.addMethod(
  507. smalltalk.method({
  508. selector: "key",
  509. fn: function (){
  510. var self=this;
  511. return smalltalk.withContext(function($ctx1) {
  512. return "b";
  513. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenBrowserCommand.klass)})},
  514. messageSends: []}),
  515. smalltalk.HLOpenBrowserCommand.klass);
  516. smalltalk.addMethod(
  517. smalltalk.method({
  518. selector: "label",
  519. fn: function (){
  520. var self=this;
  521. return smalltalk.withContext(function($ctx1) {
  522. return "Browser";
  523. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenBrowserCommand.klass)})},
  524. messageSends: []}),
  525. smalltalk.HLOpenBrowserCommand.klass);
  526. smalltalk.addClass('HLOpenWorkspaceCommand', smalltalk.HLOpenCommand, [], 'Helios-Commands-Core');
  527. smalltalk.addMethod(
  528. smalltalk.method({
  529. selector: "execute",
  530. fn: function (){
  531. var self=this;
  532. function $HLWorkspace(){return smalltalk.HLWorkspace||(typeof HLWorkspace=="undefined"?nil:HLWorkspace)}
  533. return smalltalk.withContext(function($ctx1) {
  534. var $1;
  535. $1=_st($HLWorkspace())._openAsTab();
  536. return $1;
  537. }, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLOpenWorkspaceCommand)})},
  538. messageSends: ["openAsTab"]}),
  539. smalltalk.HLOpenWorkspaceCommand);
  540. smalltalk.addMethod(
  541. smalltalk.method({
  542. selector: "key",
  543. fn: function (){
  544. var self=this;
  545. return smalltalk.withContext(function($ctx1) {
  546. return "w";
  547. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenWorkspaceCommand.klass)})},
  548. messageSends: []}),
  549. smalltalk.HLOpenWorkspaceCommand.klass);
  550. smalltalk.addMethod(
  551. smalltalk.method({
  552. selector: "label",
  553. fn: function (){
  554. var self=this;
  555. return smalltalk.withContext(function($ctx1) {
  556. return "Workspace";
  557. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenWorkspaceCommand.klass)})},
  558. messageSends: []}),
  559. smalltalk.HLOpenWorkspaceCommand.klass);
  560. smalltalk.addClass('HLSwitchTabCommand', smalltalk.HLCommand, [], 'Helios-Commands-Core');
  561. smalltalk.addMethod(
  562. smalltalk.method({
  563. selector: "execute",
  564. fn: function (){
  565. var self=this;
  566. var activeTab;
  567. function $HLTabSelectionWidget(){return smalltalk.HLTabSelectionWidget||(typeof HLTabSelectionWidget=="undefined"?nil:HLTabSelectionWidget)}
  568. return smalltalk.withContext(function($ctx1) {
  569. var $2,$3,$1;
  570. activeTab=self._selectedTab();
  571. $2=_st($HLTabSelectionWidget())._new();
  572. _st($2)._tabs_(self._tabs());
  573. _st($2)._selectedTab_(self._selectedTab());
  574. _st($2)._selectCallback_((function(tab){
  575. return smalltalk.withContext(function($ctx2) {
  576. return _st(tab)._activate();
  577. }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1)})}));
  578. _st($2)._confirmCallback_((function(tab){
  579. return smalltalk.withContext(function($ctx2) {
  580. return _st(tab)._focus();
  581. }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1)})}));
  582. _st($2)._cancelCallback_((function(){
  583. return smalltalk.withContext(function($ctx2) {
  584. return _st(activeTab)._activate();
  585. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  586. $3=_st($2)._show();
  587. $1=$3;
  588. return $1;
  589. }, function($ctx1) {$ctx1.fill(self,"execute",{activeTab:activeTab},smalltalk.HLSwitchTabCommand)})},
  590. messageSends: ["selectedTab", "tabs:", "tabs", "new", "selectedTab:", "selectCallback:", "activate", "confirmCallback:", "focus", "cancelCallback:", "show"]}),
  591. smalltalk.HLSwitchTabCommand);
  592. smalltalk.addMethod(
  593. smalltalk.method({
  594. selector: "selectedTab",
  595. fn: function (){
  596. var self=this;
  597. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  598. return smalltalk.withContext(function($ctx1) {
  599. var $1;
  600. $1=_st(_st($HLManager())._current())._activeTab();
  601. return $1;
  602. }, function($ctx1) {$ctx1.fill(self,"selectedTab",{},smalltalk.HLSwitchTabCommand)})},
  603. messageSends: ["activeTab", "current"]}),
  604. smalltalk.HLSwitchTabCommand);
  605. smalltalk.addMethod(
  606. smalltalk.method({
  607. selector: "tabs",
  608. fn: function (){
  609. var self=this;
  610. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  611. return smalltalk.withContext(function($ctx1) {
  612. var $1;
  613. $1=_st(_st($HLManager())._current())._tabs();
  614. return $1;
  615. }, function($ctx1) {$ctx1.fill(self,"tabs",{},smalltalk.HLSwitchTabCommand)})},
  616. messageSends: ["tabs", "current"]}),
  617. smalltalk.HLSwitchTabCommand);
  618. smalltalk.addMethod(
  619. smalltalk.method({
  620. selector: "key",
  621. fn: function (){
  622. var self=this;
  623. return smalltalk.withContext(function($ctx1) {
  624. return "s";
  625. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLSwitchTabCommand.klass)})},
  626. messageSends: []}),
  627. smalltalk.HLSwitchTabCommand.klass);
  628. smalltalk.addMethod(
  629. smalltalk.method({
  630. selector: "label",
  631. fn: function (){
  632. var self=this;
  633. return smalltalk.withContext(function($ctx1) {
  634. return "Switch";
  635. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLSwitchTabCommand.klass)})},
  636. messageSends: []}),
  637. smalltalk.HLSwitchTabCommand.klass);
  638. smalltalk.addClass('HLViewCommand', smalltalk.HLCommand, [], 'Helios-Commands-Core');
  639. smalltalk.addMethod(
  640. smalltalk.method({
  641. selector: "label",
  642. fn: function (){
  643. var self=this;
  644. return smalltalk.withContext(function($ctx1) {
  645. return "View";
  646. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLViewCommand.klass)})},
  647. messageSends: []}),
  648. smalltalk.HLViewCommand.klass);
  649. })(global_smalltalk,global_nil,global__st);