Helios-Commands-Core.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859
  1. smalltalk.addPackage('Helios-Commands-Core');
  2. smalltalk.addClass('HLCommand', smalltalk.Object, ['input'], 'Helios-Commands-Core');
  3. smalltalk.addMethod(
  4. smalltalk.method({
  5. selector: "asActionBinding",
  6. category: 'converting',
  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. args: [],
  19. source: "asActionBinding\x0a\x09^ (HLBindingAction on: self keyCode labelled: self label)\x0a \x09command: self;\x0a\x09\x09yourself",
  20. messageSends: ["command:", "on:labelled:", "keyCode", "label", "yourself"],
  21. referencedClasses: ["HLBindingAction"]
  22. }),
  23. smalltalk.HLCommand);
  24. smalltalk.addMethod(
  25. smalltalk.method({
  26. selector: "asBinding",
  27. category: 'converting',
  28. fn: function (){
  29. var self=this;
  30. return smalltalk.withContext(function($ctx1) {
  31. var $2,$1;
  32. $2=self._isBindingGroup();
  33. if(smalltalk.assert($2)){
  34. $1=self._asGroupBinding();
  35. } else {
  36. $1=self._asActionBinding();
  37. };
  38. return $1;
  39. }, function($ctx1) {$ctx1.fill(self,"asBinding",{},smalltalk.HLCommand)})},
  40. args: [],
  41. source: "asBinding\x0a\x09^ self isBindingGroup\x0a\x09\x09ifTrue: [ self asGroupBinding ]\x0a\x09\x09ifFalse: [ self asActionBinding ]",
  42. messageSends: ["ifTrue:ifFalse:", "asGroupBinding", "asActionBinding", "isBindingGroup"],
  43. referencedClasses: []
  44. }),
  45. smalltalk.HLCommand);
  46. smalltalk.addMethod(
  47. smalltalk.method({
  48. selector: "asGroupBinding",
  49. category: 'converting',
  50. fn: function (){
  51. var self=this;
  52. function $HLBindingGroup(){return smalltalk.HLBindingGroup||(typeof HLBindingGroup=="undefined"?nil:HLBindingGroup)}
  53. return smalltalk.withContext(function($ctx1) {
  54. var $1;
  55. $1=_st($HLBindingGroup())._on_labelled_(self._keyCode(),self._label());
  56. return $1;
  57. }, function($ctx1) {$ctx1.fill(self,"asGroupBinding",{},smalltalk.HLCommand)})},
  58. args: [],
  59. source: "asGroupBinding\x0a\x09^ HLBindingGroup \x0a\x09\x09on: self keyCode\x0a\x09\x09labelled: self label",
  60. messageSends: ["on:labelled:", "keyCode", "label"],
  61. referencedClasses: ["HLBindingGroup"]
  62. }),
  63. smalltalk.HLCommand);
  64. smalltalk.addMethod(
  65. smalltalk.method({
  66. selector: "commandError:",
  67. category: 'error handling',
  68. fn: function (aString){
  69. var self=this;
  70. return smalltalk.withContext(function($ctx1) {
  71. self._error_(aString);
  72. return self}, function($ctx1) {$ctx1.fill(self,"commandError:",{aString:aString},smalltalk.HLCommand)})},
  73. args: ["aString"],
  74. source: "commandError: aString\x0a\x09self error: aString",
  75. messageSends: ["error:"],
  76. referencedClasses: []
  77. }),
  78. smalltalk.HLCommand);
  79. smalltalk.addMethod(
  80. smalltalk.method({
  81. selector: "defaultInput",
  82. category: 'defaults',
  83. fn: function (){
  84. var self=this;
  85. return smalltalk.withContext(function($ctx1) {
  86. return "";
  87. }, function($ctx1) {$ctx1.fill(self,"defaultInput",{},smalltalk.HLCommand)})},
  88. args: [],
  89. source: "defaultInput\x0a\x09^ ''",
  90. messageSends: [],
  91. referencedClasses: []
  92. }),
  93. smalltalk.HLCommand);
  94. smalltalk.addMethod(
  95. smalltalk.method({
  96. selector: "documentation",
  97. category: 'accessing',
  98. fn: function (){
  99. var self=this;
  100. return smalltalk.withContext(function($ctx1) {
  101. var $1;
  102. $1=_st(self._class())._documentation();
  103. return $1;
  104. }, function($ctx1) {$ctx1.fill(self,"documentation",{},smalltalk.HLCommand)})},
  105. args: [],
  106. source: "documentation\x0a\x09^ self class documentation",
  107. messageSends: ["documentation", "class"],
  108. referencedClasses: []
  109. }),
  110. smalltalk.HLCommand);
  111. smalltalk.addMethod(
  112. smalltalk.method({
  113. selector: "execute",
  114. category: 'executing',
  115. fn: function (){
  116. var self=this;
  117. return smalltalk.withContext(function($ctx1) {
  118. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLCommand)})},
  119. args: [],
  120. source: "execute\x0a\x09",
  121. messageSends: [],
  122. referencedClasses: []
  123. }),
  124. smalltalk.HLCommand);
  125. smalltalk.addMethod(
  126. smalltalk.method({
  127. selector: "input",
  128. category: 'accessing',
  129. fn: function (){
  130. var self=this;
  131. return smalltalk.withContext(function($ctx1) {
  132. var $1;
  133. $1=self["@input"];
  134. return $1;
  135. }, function($ctx1) {$ctx1.fill(self,"input",{},smalltalk.HLCommand)})},
  136. args: [],
  137. source: "input\x0a\x09^ input",
  138. messageSends: [],
  139. referencedClasses: []
  140. }),
  141. smalltalk.HLCommand);
  142. smalltalk.addMethod(
  143. smalltalk.method({
  144. selector: "input:",
  145. category: 'accessing',
  146. fn: function (aString){
  147. var self=this;
  148. return smalltalk.withContext(function($ctx1) {
  149. var $1;
  150. self["@input"]=aString;
  151. $1=self["@input"];
  152. return $1;
  153. }, function($ctx1) {$ctx1.fill(self,"input:",{aString:aString},smalltalk.HLCommand)})},
  154. args: ["aString"],
  155. source: "input: aString\x0a\x09^ input := aString",
  156. messageSends: [],
  157. referencedClasses: []
  158. }),
  159. smalltalk.HLCommand);
  160. smalltalk.addMethod(
  161. smalltalk.method({
  162. selector: "inputCompletion",
  163. category: 'accessing',
  164. fn: function (){
  165. var self=this;
  166. return smalltalk.withContext(function($ctx1) {
  167. var $1;
  168. $1=[];
  169. return $1;
  170. }, function($ctx1) {$ctx1.fill(self,"inputCompletion",{},smalltalk.HLCommand)})},
  171. args: [],
  172. source: "inputCompletion\x0a\x09^ #()",
  173. messageSends: [],
  174. referencedClasses: []
  175. }),
  176. smalltalk.HLCommand);
  177. smalltalk.addMethod(
  178. smalltalk.method({
  179. selector: "inputLabel",
  180. category: 'accessing',
  181. fn: function (){
  182. var self=this;
  183. return smalltalk.withContext(function($ctx1) {
  184. var $1;
  185. $1=self._label();
  186. return $1;
  187. }, function($ctx1) {$ctx1.fill(self,"inputLabel",{},smalltalk.HLCommand)})},
  188. args: [],
  189. source: "inputLabel\x0a\x09^ self label",
  190. messageSends: ["label"],
  191. referencedClasses: []
  192. }),
  193. smalltalk.HLCommand);
  194. smalltalk.addMethod(
  195. smalltalk.method({
  196. selector: "isAction",
  197. category: 'testing',
  198. fn: function (){
  199. var self=this;
  200. return smalltalk.withContext(function($ctx1) {
  201. var $1;
  202. $1=_st(self._isBindingGroup())._not();
  203. return $1;
  204. }, function($ctx1) {$ctx1.fill(self,"isAction",{},smalltalk.HLCommand)})},
  205. args: [],
  206. source: "isAction\x0a\x09^ self isBindingGroup not",
  207. messageSends: ["not", "isBindingGroup"],
  208. referencedClasses: []
  209. }),
  210. smalltalk.HLCommand);
  211. smalltalk.addMethod(
  212. smalltalk.method({
  213. selector: "isActive",
  214. category: 'testing',
  215. fn: function (){
  216. var self=this;
  217. return smalltalk.withContext(function($ctx1) {
  218. return true;
  219. }, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLCommand)})},
  220. args: [],
  221. source: "isActive\x0a\x09^ true",
  222. messageSends: [],
  223. referencedClasses: []
  224. }),
  225. smalltalk.HLCommand);
  226. smalltalk.addMethod(
  227. smalltalk.method({
  228. selector: "isBindingGroup",
  229. category: 'testing',
  230. fn: function (){
  231. var self=this;
  232. return smalltalk.withContext(function($ctx1) {
  233. var $1;
  234. $1=_st(_st(_st(self._class())._methodDictionary())._includesKey_("execute"))._not();
  235. return $1;
  236. }, function($ctx1) {$ctx1.fill(self,"isBindingGroup",{},smalltalk.HLCommand)})},
  237. args: [],
  238. source: "isBindingGroup\x0a\x09^ (self class methodDictionary includesKey: 'execute') not",
  239. messageSends: ["not", "includesKey:", "methodDictionary", "class"],
  240. referencedClasses: []
  241. }),
  242. smalltalk.HLCommand);
  243. smalltalk.addMethod(
  244. smalltalk.method({
  245. selector: "isInputRequired",
  246. category: 'testing',
  247. fn: function (){
  248. var self=this;
  249. return smalltalk.withContext(function($ctx1) {
  250. return false;
  251. }, function($ctx1) {$ctx1.fill(self,"isInputRequired",{},smalltalk.HLCommand)})},
  252. args: [],
  253. source: "isInputRequired\x0a\x09^ false",
  254. messageSends: [],
  255. referencedClasses: []
  256. }),
  257. smalltalk.HLCommand);
  258. smalltalk.addMethod(
  259. smalltalk.method({
  260. selector: "key",
  261. category: 'accessing',
  262. fn: function (){
  263. var self=this;
  264. return smalltalk.withContext(function($ctx1) {
  265. var $1;
  266. $1=_st(self._class())._key();
  267. return $1;
  268. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCommand)})},
  269. args: [],
  270. source: "key\x0a\x09^ self class key",
  271. messageSends: ["key", "class"],
  272. referencedClasses: []
  273. }),
  274. smalltalk.HLCommand);
  275. smalltalk.addMethod(
  276. smalltalk.method({
  277. selector: "keyCode",
  278. category: 'accessing',
  279. fn: function (){
  280. var self=this;
  281. return smalltalk.withContext(function($ctx1) {
  282. var $1;
  283. $1=_st(_st(self._key())._asUppercase())._charCodeAt_((1));
  284. return $1;
  285. }, function($ctx1) {$ctx1.fill(self,"keyCode",{},smalltalk.HLCommand)})},
  286. args: [],
  287. source: "keyCode\x0a\x09^ self key asUppercase charCodeAt: 1",
  288. messageSends: ["charCodeAt:", "asUppercase", "key"],
  289. referencedClasses: []
  290. }),
  291. smalltalk.HLCommand);
  292. smalltalk.addMethod(
  293. smalltalk.method({
  294. selector: "label",
  295. category: 'accessing',
  296. fn: function (){
  297. var self=this;
  298. return smalltalk.withContext(function($ctx1) {
  299. var $1;
  300. $1=_st(self._class())._label();
  301. return $1;
  302. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLCommand)})},
  303. args: [],
  304. source: "label\x0a\x09^ self class label",
  305. messageSends: ["label", "class"],
  306. referencedClasses: []
  307. }),
  308. smalltalk.HLCommand);
  309. smalltalk.addMethod(
  310. smalltalk.method({
  311. selector: "menuLabel",
  312. category: 'accessing',
  313. fn: function (){
  314. var self=this;
  315. return smalltalk.withContext(function($ctx1) {
  316. var $1;
  317. $1=_st(self._class())._menuLabel();
  318. return $1;
  319. }, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLCommand)})},
  320. args: [],
  321. source: "menuLabel\x0a\x09^ self class menuLabel",
  322. messageSends: ["menuLabel", "class"],
  323. referencedClasses: []
  324. }),
  325. smalltalk.HLCommand);
  326. smalltalk.addMethod(
  327. smalltalk.method({
  328. selector: "registerOn:",
  329. category: 'registration',
  330. fn: function (aBinding){
  331. var self=this;
  332. return smalltalk.withContext(function($ctx1) {
  333. var $1;
  334. $1=_st(aBinding)._add_(self._asBinding());
  335. return $1;
  336. }, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding},smalltalk.HLCommand)})},
  337. args: ["aBinding"],
  338. source: "registerOn: aBinding\x0a\x09^ aBinding add: self asBinding",
  339. messageSends: ["add:", "asBinding"],
  340. referencedClasses: []
  341. }),
  342. smalltalk.HLCommand);
  343. smalltalk.addMethod(
  344. smalltalk.method({
  345. selector: "concreteClasses",
  346. category: 'registration',
  347. fn: function (){
  348. var self=this;
  349. var classes;
  350. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  351. return smalltalk.withContext(function($ctx1) {
  352. var $1,$2;
  353. classes=_st($OrderedCollection())._new();
  354. $1=self._isConcrete();
  355. if(smalltalk.assert($1)){
  356. _st(classes)._add_(self);
  357. };
  358. _st(self._subclasses())._do_((function(each){
  359. return smalltalk.withContext(function($ctx2) {
  360. return _st(classes)._addAll_(_st(each)._concreteClasses());
  361. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  362. $2=classes;
  363. return $2;
  364. }, function($ctx1) {$ctx1.fill(self,"concreteClasses",{classes:classes},smalltalk.HLCommand.klass)})},
  365. args: [],
  366. 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",
  367. messageSends: ["new", "ifTrue:", "add:", "isConcrete", "do:", "addAll:", "concreteClasses", "subclasses"],
  368. referencedClasses: ["OrderedCollection"]
  369. }),
  370. smalltalk.HLCommand.klass);
  371. smalltalk.addMethod(
  372. smalltalk.method({
  373. selector: "documentation",
  374. category: 'accessing',
  375. fn: function (){
  376. var self=this;
  377. return smalltalk.withContext(function($ctx1) {
  378. return "";
  379. }, function($ctx1) {$ctx1.fill(self,"documentation",{},smalltalk.HLCommand.klass)})},
  380. args: [],
  381. source: "documentation\x0a\x09^ ''",
  382. messageSends: [],
  383. referencedClasses: []
  384. }),
  385. smalltalk.HLCommand.klass);
  386. smalltalk.addMethod(
  387. smalltalk.method({
  388. selector: "isConcrete",
  389. category: 'testing',
  390. fn: function (){
  391. var self=this;
  392. return smalltalk.withContext(function($ctx1) {
  393. var $1;
  394. $1=_st(self._key())._notNil();
  395. return $1;
  396. }, function($ctx1) {$ctx1.fill(self,"isConcrete",{},smalltalk.HLCommand.klass)})},
  397. args: [],
  398. source: "isConcrete\x0a\x09^ self key notNil",
  399. messageSends: ["notNil", "key"],
  400. referencedClasses: []
  401. }),
  402. smalltalk.HLCommand.klass);
  403. smalltalk.addMethod(
  404. smalltalk.method({
  405. selector: "isValidFor:",
  406. category: 'testing',
  407. fn: function (aModel){
  408. var self=this;
  409. return smalltalk.withContext(function($ctx1) {
  410. return true;
  411. }, function($ctx1) {$ctx1.fill(self,"isValidFor:",{aModel:aModel},smalltalk.HLCommand.klass)})},
  412. args: ["aModel"],
  413. source: "isValidFor: aModel\x0a\x09^ true",
  414. messageSends: [],
  415. referencedClasses: []
  416. }),
  417. smalltalk.HLCommand.klass);
  418. smalltalk.addMethod(
  419. smalltalk.method({
  420. selector: "key",
  421. category: 'accessing',
  422. fn: function (){
  423. var self=this;
  424. return smalltalk.withContext(function($ctx1) {
  425. return nil;
  426. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCommand.klass)})},
  427. args: [],
  428. source: "key\x0a\x09\x22Answer a single character string or nil if no key\x22\x0a\x09\x0a\x09^ nil",
  429. messageSends: [],
  430. referencedClasses: []
  431. }),
  432. smalltalk.HLCommand.klass);
  433. smalltalk.addMethod(
  434. smalltalk.method({
  435. selector: "label",
  436. category: 'accessing',
  437. fn: function (){
  438. var self=this;
  439. return smalltalk.withContext(function($ctx1) {
  440. return "";
  441. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLCommand.klass)})},
  442. args: [],
  443. source: "label\x0a\x09^ ''",
  444. messageSends: [],
  445. referencedClasses: []
  446. }),
  447. smalltalk.HLCommand.klass);
  448. smalltalk.addMethod(
  449. smalltalk.method({
  450. selector: "menuLabel",
  451. category: 'accessing',
  452. fn: function (){
  453. var self=this;
  454. return smalltalk.withContext(function($ctx1) {
  455. var $1;
  456. $1=self._label();
  457. return $1;
  458. }, function($ctx1) {$ctx1.fill(self,"menuLabel",{},smalltalk.HLCommand.klass)})},
  459. args: [],
  460. source: "menuLabel\x0a\x09^ self label",
  461. messageSends: ["label"],
  462. referencedClasses: []
  463. }),
  464. smalltalk.HLCommand.klass);
  465. smalltalk.addMethod(
  466. smalltalk.method({
  467. selector: "registerConcreteClassesOn:",
  468. category: 'accessing',
  469. fn: function (aBinding){
  470. var self=this;
  471. var newBinding;
  472. return smalltalk.withContext(function($ctx1) {
  473. var $1;
  474. $1=self._isConcrete();
  475. if(smalltalk.assert($1)){
  476. newBinding=self._registerOn_(aBinding);
  477. newBinding;
  478. } else {
  479. newBinding=aBinding;
  480. newBinding;
  481. };
  482. _st(self._subclasses())._do_((function(each){
  483. return smalltalk.withContext(function($ctx2) {
  484. return _st(each)._registerConcreteClassesOn_(newBinding);
  485. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  486. return self}, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:",{aBinding:aBinding,newBinding:newBinding},smalltalk.HLCommand.klass)})},
  487. args: ["aBinding"],
  488. 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 ]",
  489. messageSends: ["ifTrue:ifFalse:", "registerOn:", "isConcrete", "do:", "registerConcreteClassesOn:", "subclasses"],
  490. referencedClasses: []
  491. }),
  492. smalltalk.HLCommand.klass);
  493. smalltalk.addMethod(
  494. smalltalk.method({
  495. selector: "registerOn:",
  496. category: 'registration',
  497. fn: function (aBinding){
  498. var self=this;
  499. return smalltalk.withContext(function($ctx1) {
  500. var $1;
  501. $1=_st(self._new())._registerOn_(aBinding);
  502. return $1;
  503. }, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding},smalltalk.HLCommand.klass)})},
  504. args: ["aBinding"],
  505. source: "registerOn: aBinding\x0a\x09^ self new registerOn: aBinding",
  506. messageSends: ["registerOn:", "new"],
  507. referencedClasses: []
  508. }),
  509. smalltalk.HLCommand.klass);
  510. smalltalk.addClass('HLCloseTabCommand', smalltalk.HLCommand, [], 'Helios-Commands-Core');
  511. smalltalk.addMethod(
  512. smalltalk.method({
  513. selector: "execute",
  514. category: 'executing',
  515. fn: function (){
  516. var self=this;
  517. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  518. return smalltalk.withContext(function($ctx1) {
  519. _st(_st($HLManager())._current())._removeActiveTab();
  520. return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLCloseTabCommand)})},
  521. args: [],
  522. source: "execute\x0a\x09HLManager current removeActiveTab",
  523. messageSends: ["removeActiveTab", "current"],
  524. referencedClasses: ["HLManager"]
  525. }),
  526. smalltalk.HLCloseTabCommand);
  527. smalltalk.addMethod(
  528. smalltalk.method({
  529. selector: "key",
  530. category: 'accessing',
  531. fn: function (){
  532. var self=this;
  533. return smalltalk.withContext(function($ctx1) {
  534. return "w";
  535. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCloseTabCommand.klass)})},
  536. args: [],
  537. source: "key\x0a\x09^ 'w'",
  538. messageSends: [],
  539. referencedClasses: []
  540. }),
  541. smalltalk.HLCloseTabCommand.klass);
  542. smalltalk.addMethod(
  543. smalltalk.method({
  544. selector: "label",
  545. category: 'accessing',
  546. fn: function (){
  547. var self=this;
  548. return smalltalk.withContext(function($ctx1) {
  549. return "Close tab";
  550. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLCloseTabCommand.klass)})},
  551. args: [],
  552. source: "label\x0a\x09^ 'Close tab'",
  553. messageSends: [],
  554. referencedClasses: []
  555. }),
  556. smalltalk.HLCloseTabCommand.klass);
  557. smalltalk.addClass('HLModelCommand', smalltalk.HLCommand, ['model'], 'Helios-Commands-Core');
  558. smalltalk.addMethod(
  559. smalltalk.method({
  560. selector: "model",
  561. category: 'accessing',
  562. fn: function (){
  563. var self=this;
  564. return smalltalk.withContext(function($ctx1) {
  565. var $1;
  566. $1=self["@model"];
  567. return $1;
  568. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLModelCommand)})},
  569. args: [],
  570. source: "model\x0a\x09^ model",
  571. messageSends: [],
  572. referencedClasses: []
  573. }),
  574. smalltalk.HLModelCommand);
  575. smalltalk.addMethod(
  576. smalltalk.method({
  577. selector: "model:",
  578. category: 'accessing',
  579. fn: function (aModel){
  580. var self=this;
  581. return smalltalk.withContext(function($ctx1) {
  582. self["@model"]=aModel;
  583. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLModelCommand)})},
  584. args: ["aModel"],
  585. source: "model: aModel\x0a\x09model := aModel",
  586. messageSends: [],
  587. referencedClasses: []
  588. }),
  589. smalltalk.HLModelCommand);
  590. smalltalk.addMethod(
  591. smalltalk.method({
  592. selector: "for:",
  593. category: 'instance creation',
  594. fn: function (aModel){
  595. var self=this;
  596. return smalltalk.withContext(function($ctx1) {
  597. var $1;
  598. $1=self._new();
  599. return $1;
  600. }, function($ctx1) {$ctx1.fill(self,"for:",{aModel:aModel},smalltalk.HLModelCommand.klass)})},
  601. args: ["aModel"],
  602. source: "for: aModel\x0a\x09^ self new",
  603. messageSends: ["new"],
  604. referencedClasses: []
  605. }),
  606. smalltalk.HLModelCommand.klass);
  607. smalltalk.addMethod(
  608. smalltalk.method({
  609. selector: "registerConcreteClassesOn:for:",
  610. category: 'registration',
  611. fn: function (aBinding,aModel){
  612. var self=this;
  613. var newBinding;
  614. return smalltalk.withContext(function($ctx1) {
  615. var $1;
  616. $1=_st(self._isConcrete())._and_((function(){
  617. return smalltalk.withContext(function($ctx2) {
  618. return self._isValidFor_(aModel);
  619. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  620. if(smalltalk.assert($1)){
  621. newBinding=self._registerOn_for_(aBinding,aModel);
  622. newBinding;
  623. } else {
  624. newBinding=aBinding;
  625. newBinding;
  626. };
  627. _st(self._subclasses())._do_((function(each){
  628. return smalltalk.withContext(function($ctx2) {
  629. return _st(each)._registerConcreteClassesOn_for_(newBinding,aModel);
  630. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  631. return self}, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:for:",{aBinding:aBinding,aModel:aModel,newBinding:newBinding},smalltalk.HLModelCommand.klass)})},
  632. args: ["aBinding", "aModel"],
  633. 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 ]",
  634. messageSends: ["ifTrue:ifFalse:", "registerOn:for:", "and:", "isValidFor:", "isConcrete", "do:", "registerConcreteClassesOn:for:", "subclasses"],
  635. referencedClasses: []
  636. }),
  637. smalltalk.HLModelCommand.klass);
  638. smalltalk.addMethod(
  639. smalltalk.method({
  640. selector: "registerOn:for:",
  641. category: 'registration',
  642. fn: function (aBinding,aModel){
  643. var self=this;
  644. return smalltalk.withContext(function($ctx1) {
  645. var $1;
  646. $1=_st(self._for_(aModel))._registerOn_(aBinding);
  647. return $1;
  648. }, function($ctx1) {$ctx1.fill(self,"registerOn:for:",{aBinding:aBinding,aModel:aModel},smalltalk.HLModelCommand.klass)})},
  649. args: ["aBinding", "aModel"],
  650. source: "registerOn: aBinding for: aModel\x0a\x09^ (self for: aModel) registerOn: aBinding",
  651. messageSends: ["registerOn:", "for:"],
  652. referencedClasses: []
  653. }),
  654. smalltalk.HLModelCommand.klass);
  655. smalltalk.addClass('HLOpenCommand', smalltalk.HLCommand, [], 'Helios-Commands-Core');
  656. smalltalk.addMethod(
  657. smalltalk.method({
  658. selector: "key",
  659. category: 'accessing',
  660. fn: function (){
  661. var self=this;
  662. return smalltalk.withContext(function($ctx1) {
  663. return "o";
  664. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenCommand.klass)})},
  665. args: [],
  666. source: "key\x0a\x09^ 'o'",
  667. messageSends: [],
  668. referencedClasses: []
  669. }),
  670. smalltalk.HLOpenCommand.klass);
  671. smalltalk.addMethod(
  672. smalltalk.method({
  673. selector: "label",
  674. category: 'accessing',
  675. fn: function (){
  676. var self=this;
  677. return smalltalk.withContext(function($ctx1) {
  678. return "Open";
  679. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenCommand.klass)})},
  680. args: [],
  681. source: "label\x0a\x09^ 'Open'",
  682. messageSends: [],
  683. referencedClasses: []
  684. }),
  685. smalltalk.HLOpenCommand.klass);
  686. smalltalk.addClass('HLOpenBrowserCommand', smalltalk.HLOpenCommand, [], 'Helios-Commands-Core');
  687. smalltalk.addMethod(
  688. smalltalk.method({
  689. selector: "execute",
  690. category: 'executing',
  691. fn: function (){
  692. var self=this;
  693. function $HLBrowser(){return smalltalk.HLBrowser||(typeof HLBrowser=="undefined"?nil:HLBrowser)}
  694. return smalltalk.withContext(function($ctx1) {
  695. var $1;
  696. $1=_st($HLBrowser())._openAsTab();
  697. return $1;
  698. }, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLOpenBrowserCommand)})},
  699. args: [],
  700. source: "execute\x0a\x09^ HLBrowser openAsTab",
  701. messageSends: ["openAsTab"],
  702. referencedClasses: ["HLBrowser"]
  703. }),
  704. smalltalk.HLOpenBrowserCommand);
  705. smalltalk.addMethod(
  706. smalltalk.method({
  707. selector: "key",
  708. category: 'accessing',
  709. fn: function (){
  710. var self=this;
  711. return smalltalk.withContext(function($ctx1) {
  712. return "b";
  713. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenBrowserCommand.klass)})},
  714. args: [],
  715. source: "key\x0a\x09^ 'b'",
  716. messageSends: [],
  717. referencedClasses: []
  718. }),
  719. smalltalk.HLOpenBrowserCommand.klass);
  720. smalltalk.addMethod(
  721. smalltalk.method({
  722. selector: "label",
  723. category: 'accessing',
  724. fn: function (){
  725. var self=this;
  726. return smalltalk.withContext(function($ctx1) {
  727. return "Browser";
  728. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenBrowserCommand.klass)})},
  729. args: [],
  730. source: "label\x0a\x09^ 'Browser'",
  731. messageSends: [],
  732. referencedClasses: []
  733. }),
  734. smalltalk.HLOpenBrowserCommand.klass);
  735. smalltalk.addClass('HLOpenWorkspaceCommand', smalltalk.HLOpenCommand, [], 'Helios-Commands-Core');
  736. smalltalk.addMethod(
  737. smalltalk.method({
  738. selector: "execute",
  739. category: 'executing',
  740. fn: function (){
  741. var self=this;
  742. function $HLWorkspace(){return smalltalk.HLWorkspace||(typeof HLWorkspace=="undefined"?nil:HLWorkspace)}
  743. return smalltalk.withContext(function($ctx1) {
  744. var $1;
  745. $1=_st($HLWorkspace())._openAsTab();
  746. return $1;
  747. }, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLOpenWorkspaceCommand)})},
  748. args: [],
  749. source: "execute\x0a\x09^ HLWorkspace openAsTab",
  750. messageSends: ["openAsTab"],
  751. referencedClasses: ["HLWorkspace"]
  752. }),
  753. smalltalk.HLOpenWorkspaceCommand);
  754. smalltalk.addMethod(
  755. smalltalk.method({
  756. selector: "key",
  757. category: 'accessing',
  758. fn: function (){
  759. var self=this;
  760. return smalltalk.withContext(function($ctx1) {
  761. return "w";
  762. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenWorkspaceCommand.klass)})},
  763. args: [],
  764. source: "key\x0a\x09^ 'w'",
  765. messageSends: [],
  766. referencedClasses: []
  767. }),
  768. smalltalk.HLOpenWorkspaceCommand.klass);
  769. smalltalk.addMethod(
  770. smalltalk.method({
  771. selector: "label",
  772. category: 'accessing',
  773. fn: function (){
  774. var self=this;
  775. return smalltalk.withContext(function($ctx1) {
  776. return "Workspace";
  777. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenWorkspaceCommand.klass)})},
  778. args: [],
  779. source: "label\x0a\x09^ 'Workspace'",
  780. messageSends: [],
  781. referencedClasses: []
  782. }),
  783. smalltalk.HLOpenWorkspaceCommand.klass);
  784. smalltalk.addClass('HLViewCommand', smalltalk.HLCommand, [], 'Helios-Commands-Core');
  785. smalltalk.addMethod(
  786. smalltalk.method({
  787. selector: "label",
  788. category: 'accessing',
  789. fn: function (){
  790. var self=this;
  791. return smalltalk.withContext(function($ctx1) {
  792. return "View";
  793. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLViewCommand.klass)})},
  794. args: [],
  795. source: "label\x0a\x09^ 'View'",
  796. messageSends: [],
  797. referencedClasses: []
  798. }),
  799. smalltalk.HLViewCommand.klass);