Helios-Commands-Core.deploy.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  1. smalltalk.addPackage('Helios-Commands-Core');
  2. smalltalk.addClass('HLCommand', smalltalk.Object, [], 'Helios-Commands-Core');
  3. smalltalk.addMethod(
  4. "_activeBlock",
  5. smalltalk.method({
  6. selector: "activeBlock",
  7. fn: function (){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) { var $1;
  10. $1=(function(){
  11. return smalltalk.withContext(function($ctx2) { return true;
  12. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
  13. return $1;
  14. }, function($ctx1) {$ctx1.fill(self,"activeBlock",{},smalltalk.HLCommand)})},
  15. messageSends: []}),
  16. smalltalk.HLCommand);
  17. smalltalk.addMethod(
  18. "_asActionBinding",
  19. smalltalk.method({
  20. selector: "asActionBinding",
  21. fn: function (){
  22. var self=this;
  23. return smalltalk.withContext(function($ctx1) { var $1;
  24. $1=_st(_st((smalltalk.HLBindingAction || HLBindingAction))._on_labelled_activeBlock_(_st(self)._key(),_st(self)._label(),_st(self)._activeBlock()))._callback_((function(){
  25. return smalltalk.withContext(function($ctx2) { return _st(self)._execute();
  26. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  27. return $1;
  28. }, function($ctx1) {$ctx1.fill(self,"asActionBinding",{},smalltalk.HLCommand)})},
  29. messageSends: ["callback:", "execute", "on:labelled:activeBlock:", "key", "label", "activeBlock"]}),
  30. smalltalk.HLCommand);
  31. smalltalk.addMethod(
  32. "_asBinding",
  33. smalltalk.method({
  34. selector: "asBinding",
  35. fn: function (){
  36. var self=this;
  37. return smalltalk.withContext(function($ctx1) { var $2,$1;
  38. $2=_st(self)._isBindingGroup();
  39. if(smalltalk.assert($2)){
  40. $1=_st(self)._asGroupBinding();
  41. } else {
  42. $1=_st(self)._asActionBinding();
  43. };
  44. return $1;
  45. }, function($ctx1) {$ctx1.fill(self,"asBinding",{},smalltalk.HLCommand)})},
  46. messageSends: ["ifTrue:ifFalse:", "asGroupBinding", "asActionBinding", "isBindingGroup"]}),
  47. smalltalk.HLCommand);
  48. smalltalk.addMethod(
  49. "_asGroupBinding",
  50. smalltalk.method({
  51. selector: "asGroupBinding",
  52. fn: function (){
  53. var self=this;
  54. return smalltalk.withContext(function($ctx1) { var $1;
  55. $1=_st((smalltalk.HLBindingGroup || HLBindingGroup))._on_labelled_(_st(self)._key(),_st(self)._label());
  56. return $1;
  57. }, function($ctx1) {$ctx1.fill(self,"asGroupBinding",{},smalltalk.HLCommand)})},
  58. messageSends: ["on:labelled:", "key", "label"]}),
  59. smalltalk.HLCommand);
  60. smalltalk.addMethod(
  61. "_documentation",
  62. smalltalk.method({
  63. selector: "documentation",
  64. fn: function (){
  65. var self=this;
  66. return smalltalk.withContext(function($ctx1) { var $1;
  67. $1=_st(_st(self)._class())._documentation();
  68. return $1;
  69. }, function($ctx1) {$ctx1.fill(self,"documentation",{}, smalltalk.HLCommand)})},
  70. messageSends: ["documentation", "class"]}),
  71. smalltalk.HLCommand);
  72. smalltalk.addMethod(
  73. "_execute",
  74. smalltalk.method({
  75. selector: "execute",
  76. fn: function (){
  77. var self=this;
  78. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLCommand)})},
  79. messageSends: []}),
  80. smalltalk.HLCommand);
  81. smalltalk.addMethod(
  82. "_isBindingGroup",
  83. smalltalk.method({
  84. selector: "isBindingGroup",
  85. fn: function (){
  86. var self=this;
  87. return smalltalk.withContext(function($ctx1) { var $1;
  88. $1=_st(_st(_st(_st(self)._class())._methodDictionary())._includesKey_("execute"))._not();
  89. return $1;
  90. }, function($ctx1) {$ctx1.fill(self,"isBindingGroup",{},smalltalk.HLCommand)})},
  91. messageSends: ["not", "includesKey:", "methodDictionary", "class"]}),
  92. smalltalk.HLCommand);
  93. smalltalk.addMethod(
  94. "_key",
  95. smalltalk.method({
  96. selector: "key",
  97. fn: function (){
  98. var self=this;
  99. return smalltalk.withContext(function($ctx1) { var $1;
  100. $1=_st(_st(self)._class())._key();
  101. return $1;
  102. }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLCommand)})},
  103. messageSends: ["key", "class"]}),
  104. smalltalk.HLCommand);
  105. smalltalk.addMethod(
  106. "_label",
  107. smalltalk.method({
  108. selector: "label",
  109. fn: function (){
  110. var self=this;
  111. return smalltalk.withContext(function($ctx1) { var $1;
  112. $1=_st(_st(self)._class())._label();
  113. return $1;
  114. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLCommand)})},
  115. messageSends: ["label", "class"]}),
  116. smalltalk.HLCommand);
  117. smalltalk.addMethod(
  118. "_registerOn_",
  119. smalltalk.method({
  120. selector: "registerOn:",
  121. fn: function (aBinding){
  122. var self=this;
  123. return smalltalk.withContext(function($ctx1) { var $1;
  124. $1=_st(aBinding)._add_(_st(self)._asBinding());
  125. return $1;
  126. }, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding},smalltalk.HLCommand)})},
  127. messageSends: ["add:", "asBinding"]}),
  128. smalltalk.HLCommand);
  129. smalltalk.addMethod(
  130. "_asBindingOn_",
  131. smalltalk.method({
  132. selector: "asBindingOn:",
  133. fn: function (aBinding){
  134. var self=this;
  135. var instance;
  136. return smalltalk.withContext(function($ctx1) { var $1;
  137. instance=_st(_st(self)._new())._asBinding();
  138. _st(aBinding)._add_(instance);
  139. $1=instance;
  140. return $1;
  141. }, function($ctx1) {$ctx1.fill(self,"asBindingOn:",{aBinding:aBinding,instance:instance},smalltalk.HLCommand.klass)})},
  142. messageSends: ["asBinding", "new", "add:"]}),
  143. smalltalk.HLCommand.klass);
  144. smalltalk.addMethod(
  145. "_concreteSubclasses",
  146. smalltalk.method({
  147. selector: "concreteSubclasses",
  148. fn: function (){
  149. var self=this;
  150. return smalltalk.withContext(function($ctx1) { var $1;
  151. $1=_st(_st(self)._subclasses())._select_((function(each){
  152. return smalltalk.withContext(function($ctx2) { return _st(each)._isConcrete();
  153. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  154. return $1;
  155. }, function($ctx1) {$ctx1.fill(self,"concreteSubclasses",{},smalltalk.HLCommand.klass)})},
  156. messageSends: ["select:", "isConcrete", "subclasses"]}),
  157. smalltalk.HLCommand.klass);
  158. smalltalk.addMethod(
  159. "_documentation",
  160. smalltalk.method({
  161. selector: "documentation",
  162. fn: function (){
  163. var self=this;
  164. return smalltalk.withContext(function($ctx1) { return "";
  165. }, function($ctx1) {$ctx1.fill(self,"documentation",{}, smalltalk.HLCommand.klass)})},
  166. messageSends: []}),
  167. smalltalk.HLCommand.klass);
  168. smalltalk.addMethod(
  169. "_isConcrete",
  170. smalltalk.method({
  171. selector: "isConcrete",
  172. fn: function (){
  173. var self=this;
  174. return smalltalk.withContext(function($ctx1) { var $1;
  175. $1=_st(_st(self)._key())._notNil();
  176. return $1;
  177. }, function($ctx1) {$ctx1.fill(self,"isConcrete",{},smalltalk.HLCommand.klass)})},
  178. messageSends: ["notNil", "key"]}),
  179. smalltalk.HLCommand.klass);
  180. smalltalk.addMethod(
  181. "_key",
  182. smalltalk.method({
  183. selector: "key",
  184. fn: function (){
  185. var self=this;
  186. return smalltalk.withContext(function($ctx1) { return nil;
  187. }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLCommand.klass)})},
  188. messageSends: []}),
  189. smalltalk.HLCommand.klass);
  190. smalltalk.addMethod(
  191. "_label",
  192. smalltalk.method({
  193. selector: "label",
  194. fn: function (){
  195. var self=this;
  196. return smalltalk.withContext(function($ctx1) { return "";
  197. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLCommand.klass)})},
  198. messageSends: []}),
  199. smalltalk.HLCommand.klass);
  200. smalltalk.addMethod(
  201. "_registerConcreteClassesOn_",
  202. smalltalk.method({
  203. selector: "registerConcreteClassesOn:",
  204. fn: function (aBinding){
  205. var self=this;
  206. var newBinding;
  207. return smalltalk.withContext(function($ctx1) { var $1;
  208. $1=_st(self)._isConcrete();
  209. if(smalltalk.assert($1)){
  210. newBinding=_st(self)._asBindingOn_(aBinding);
  211. newBinding;
  212. } else {
  213. newBinding=aBinding;
  214. newBinding;
  215. };
  216. _st(_st(self)._subclasses())._do_((function(each){
  217. return smalltalk.withContext(function($ctx2) { return _st(each)._registerConcreteClassesOn_(newBinding);
  218. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  219. return self}, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:",{aBinding:aBinding,newBinding:newBinding},smalltalk.HLCommand.klass)})},
  220. messageSends: ["ifTrue:ifFalse:", "asBindingOn:", "isConcrete", "do:", "registerConcreteClassesOn:", "subclasses"]}),
  221. smalltalk.HLCommand.klass);
  222. smalltalk.addMethod(
  223. "_registerOn_",
  224. smalltalk.method({
  225. selector: "registerOn:",
  226. fn: function (aBinding){
  227. var self=this;
  228. return smalltalk.withContext(function($ctx1) { var $1;
  229. $1=_st(_st(self)._new())._registerOn_(aBinding);
  230. return $1;
  231. }, function($ctx1) {$ctx1.fill(self,"registerOn:",{aBinding:aBinding},smalltalk.HLCommand.klass)})},
  232. messageSends: ["registerOn:", "new"]}),
  233. smalltalk.HLCommand.klass);
  234. smalltalk.addClass('HLCloseTabCommand', smalltalk.HLCommand, [], 'Helios-Commands-Core');
  235. smalltalk.addMethod(
  236. "_execute",
  237. smalltalk.method({
  238. selector: "execute",
  239. fn: function (){
  240. var self=this;
  241. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.HLManager || HLManager))._current())._removeActiveTab();
  242. return self}, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLCloseTabCommand)})},
  243. messageSends: ["removeActiveTab", "current"]}),
  244. smalltalk.HLCloseTabCommand);
  245. smalltalk.addMethod(
  246. "_key",
  247. smalltalk.method({
  248. selector: "key",
  249. fn: function (){
  250. var self=this;
  251. return smalltalk.withContext(function($ctx1) { return (87);
  252. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLCloseTabCommand.klass)})},
  253. messageSends: []}),
  254. smalltalk.HLCloseTabCommand.klass);
  255. smalltalk.addMethod(
  256. "_label",
  257. smalltalk.method({
  258. selector: "label",
  259. fn: function (){
  260. var self=this;
  261. return smalltalk.withContext(function($ctx1) { return "Close tab";
  262. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLCloseTabCommand.klass)})},
  263. messageSends: []}),
  264. smalltalk.HLCloseTabCommand.klass);
  265. smalltalk.addClass('HLModelCommand', smalltalk.HLCommand, ['model'], 'Helios-Commands-Core');
  266. smalltalk.addMethod(
  267. "_model",
  268. smalltalk.method({
  269. selector: "model",
  270. fn: function (){
  271. var self=this;
  272. return smalltalk.withContext(function($ctx1) { var $1;
  273. $1=self["@model"];
  274. return $1;
  275. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLModelCommand)})},
  276. messageSends: []}),
  277. smalltalk.HLModelCommand);
  278. smalltalk.addMethod(
  279. "_model_",
  280. smalltalk.method({
  281. selector: "model:",
  282. fn: function (aModel){
  283. var self=this;
  284. return smalltalk.withContext(function($ctx1) { self["@model"]=aModel;
  285. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLModelCommand)})},
  286. messageSends: []}),
  287. smalltalk.HLModelCommand);
  288. smalltalk.addMethod(
  289. "_for_",
  290. smalltalk.method({
  291. selector: "for:",
  292. fn: function (aModel){
  293. var self=this;
  294. return smalltalk.withContext(function($ctx1) { var $1;
  295. $1=_st(self)._new();
  296. return $1;
  297. }, function($ctx1) {$ctx1.fill(self,"for:",{aModel:aModel},smalltalk.HLModelCommand.klass)})},
  298. messageSends: ["new"]}),
  299. smalltalk.HLModelCommand.klass);
  300. smalltalk.addMethod(
  301. "_registerConcreteClassesOn_for_",
  302. smalltalk.method({
  303. selector: "registerConcreteClassesOn:for:",
  304. fn: function (aBinding,aModel){
  305. var self=this;
  306. return smalltalk.withContext(function($ctx1) { var $1;
  307. _st(_st(self)._concreteSubclasses())._do_((function(each){
  308. var binding;
  309. return smalltalk.withContext(function($ctx2) { binding=_st(each)._registerOn_for_(aBinding,aModel);
  310. binding;
  311. $1=_st(binding)._isBindingGroup();
  312. if(smalltalk.assert($1)){
  313. return _st(each)._registerConcreteClassesOn_for_(binding,aModel);
  314. };
  315. }, function($ctx2) {$ctx2.fillBlock({each:each,binding:binding},$ctx1)})}));
  316. return self}, function($ctx1) {$ctx1.fill(self,"registerConcreteClassesOn:for:",{aBinding:aBinding,aModel:aModel},smalltalk.HLModelCommand.klass)})},
  317. messageSends: ["do:", "registerOn:for:", "ifTrue:", "registerConcreteClassesOn:for:", "isBindingGroup", "concreteSubclasses"]}),
  318. smalltalk.HLModelCommand.klass);
  319. smalltalk.addMethod(
  320. "_registerOn_for_",
  321. smalltalk.method({
  322. selector: "registerOn:for:",
  323. fn: function (aBinding,aModel){
  324. var self=this;
  325. return smalltalk.withContext(function($ctx1) { var $1;
  326. $1=_st(_st(self)._for_(aModel))._registerOn_(aBinding);
  327. return $1;
  328. }, function($ctx1) {$ctx1.fill(self,"registerOn:for:",{aBinding:aBinding,aModel:aModel},smalltalk.HLModelCommand.klass)})},
  329. messageSends: ["registerOn:", "for:"]}),
  330. smalltalk.HLModelCommand.klass);
  331. smalltalk.addClass('HLOpenCommand', smalltalk.HLCommand, [], 'Helios-Commands-Core');
  332. smalltalk.addMethod(
  333. "_key",
  334. smalltalk.method({
  335. selector: "key",
  336. fn: function (){
  337. var self=this;
  338. return smalltalk.withContext(function($ctx1) { return (79);
  339. }, function($ctx1) {$ctx1.fill(self,"key",{},smalltalk.HLOpenCommand.klass)})},
  340. messageSends: []}),
  341. smalltalk.HLOpenCommand.klass);
  342. smalltalk.addMethod(
  343. "_label",
  344. smalltalk.method({
  345. selector: "label",
  346. fn: function (){
  347. var self=this;
  348. return smalltalk.withContext(function($ctx1) { return "Open";
  349. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLOpenCommand.klass)})},
  350. messageSends: []}),
  351. smalltalk.HLOpenCommand.klass);
  352. smalltalk.addClass('HLOpenBrowserCommand', smalltalk.HLOpenCommand, [], 'Helios-Commands-Core');
  353. smalltalk.addMethod(
  354. "_execute",
  355. smalltalk.method({
  356. selector: "execute",
  357. fn: function (){
  358. var self=this;
  359. return smalltalk.withContext(function($ctx1) { var $1;
  360. $1=_st((smalltalk.HLBrowser || HLBrowser))._openAsTab();
  361. return $1;
  362. }, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLOpenBrowserCommand)})},
  363. messageSends: ["openAsTab"]}),
  364. smalltalk.HLOpenBrowserCommand);
  365. smalltalk.addMethod(
  366. "_key",
  367. smalltalk.method({
  368. selector: "key",
  369. fn: function (){
  370. var self=this;
  371. return smalltalk.withContext(function($ctx1) { return (66);
  372. }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLOpenBrowserCommand.klass)})},
  373. messageSends: []}),
  374. smalltalk.HLOpenBrowserCommand.klass);
  375. smalltalk.addMethod(
  376. "_label",
  377. smalltalk.method({
  378. selector: "label",
  379. fn: function (){
  380. var self=this;
  381. return smalltalk.withContext(function($ctx1) { return "Browser";
  382. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLOpenBrowserCommand.klass)})},
  383. messageSends: []}),
  384. smalltalk.HLOpenBrowserCommand.klass);
  385. smalltalk.addClass('HLOpenTranscriptCommand', smalltalk.HLOpenCommand, [], 'Helios-Commands-Core');
  386. smalltalk.addMethod(
  387. "_execute",
  388. smalltalk.method({
  389. selector: "execute",
  390. fn: function (){
  391. var self=this;
  392. return smalltalk.withContext(function($ctx1) { var $1;
  393. $1=_st((smalltalk.HLTranscript || HLTranscript))._openAsTab();
  394. return $1;
  395. }, function($ctx1) {$ctx1.fill(self,"execute",{}, smalltalk.HLOpenTranscriptCommand)})},
  396. messageSends: ["openAsTab"]}),
  397. smalltalk.HLOpenTranscriptCommand);
  398. smalltalk.addMethod(
  399. "_key",
  400. smalltalk.method({
  401. selector: "key",
  402. fn: function (){
  403. var self=this;
  404. return smalltalk.withContext(function($ctx1) { return (84);
  405. }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLOpenTranscriptCommand.klass)})},
  406. messageSends: []}),
  407. smalltalk.HLOpenTranscriptCommand.klass);
  408. smalltalk.addMethod(
  409. "_label",
  410. smalltalk.method({
  411. selector: "label",
  412. fn: function (){
  413. var self=this;
  414. return smalltalk.withContext(function($ctx1) { return "Transcript";
  415. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLOpenTranscriptCommand.klass)})},
  416. messageSends: []}),
  417. smalltalk.HLOpenTranscriptCommand.klass);
  418. smalltalk.addClass('HLOpenWorkspaceCommand', smalltalk.HLOpenCommand, [], 'Helios-Commands-Core');
  419. smalltalk.addMethod(
  420. "_execute",
  421. smalltalk.method({
  422. selector: "execute",
  423. fn: function (){
  424. var self=this;
  425. return smalltalk.withContext(function($ctx1) { var $1;
  426. $1=_st((smalltalk.HLCodeWidget || HLCodeWidget))._openAsTab();
  427. return $1;
  428. }, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLOpenWorkspaceCommand)})},
  429. messageSends: ["openAsTab"]}),
  430. smalltalk.HLOpenWorkspaceCommand);
  431. smalltalk.addMethod(
  432. "_key",
  433. smalltalk.method({
  434. selector: "key",
  435. fn: function (){
  436. var self=this;
  437. return smalltalk.withContext(function($ctx1) { return (87);
  438. }, function($ctx1) {$ctx1.fill(self,"key",{}, smalltalk.HLOpenWorkspaceCommand.klass)})},
  439. messageSends: []}),
  440. smalltalk.HLOpenWorkspaceCommand.klass);
  441. smalltalk.addMethod(
  442. "_label",
  443. smalltalk.method({
  444. selector: "label",
  445. fn: function (){
  446. var self=this;
  447. return smalltalk.withContext(function($ctx1) { return "Workspace";
  448. }, function($ctx1) {$ctx1.fill(self,"label",{}, smalltalk.HLOpenWorkspaceCommand.klass)})},
  449. messageSends: []}),
  450. smalltalk.HLOpenWorkspaceCommand.klass);
  451. smalltalk.addClass('HLViewCommand', smalltalk.HLCommand, [], 'Helios-Commands-Core');
  452. smalltalk.addMethod(
  453. "_label",
  454. smalltalk.method({
  455. selector: "label",
  456. fn: function (){
  457. var self=this;
  458. return smalltalk.withContext(function($ctx1) { return "View";
  459. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLViewCommand.klass)})},
  460. messageSends: []}),
  461. smalltalk.HLViewCommand.klass);