1
0

Kernel-Announcements.deploy.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  1. smalltalk.addPackage('Kernel-Announcements');
  2. smalltalk.addClass('AnnouncementSubscription', smalltalk.Object, ['valuable', 'announcementClass'], 'Kernel-Announcements');
  3. smalltalk.addMethod(
  4. smalltalk.method({
  5. selector: "announcementClass",
  6. fn: function (){
  7. var self=this;
  8. return smalltalk.withContext(function($ctx1) {
  9. var $1;
  10. $1=self["@announcementClass"];
  11. return $1;
  12. }, function($ctx1) {$ctx1.fill(self,"announcementClass",{},smalltalk.AnnouncementSubscription)})},
  13. messageSends: []}),
  14. smalltalk.AnnouncementSubscription);
  15. smalltalk.addMethod(
  16. smalltalk.method({
  17. selector: "announcementClass:",
  18. fn: function (aClass){
  19. var self=this;
  20. return smalltalk.withContext(function($ctx1) {
  21. self["@announcementClass"]=aClass;
  22. return self}, function($ctx1) {$ctx1.fill(self,"announcementClass:",{aClass:aClass},smalltalk.AnnouncementSubscription)})},
  23. messageSends: []}),
  24. smalltalk.AnnouncementSubscription);
  25. smalltalk.addMethod(
  26. smalltalk.method({
  27. selector: "block",
  28. fn: function (){
  29. var self=this;
  30. return smalltalk.withContext(function($ctx1) {
  31. var $1;
  32. _st(self)._deprecatedAPI();
  33. $1=_st(self)._valuable();
  34. return $1;
  35. }, function($ctx1) {$ctx1.fill(self,"block",{},smalltalk.AnnouncementSubscription)})},
  36. messageSends: ["deprecatedAPI", "valuable"]}),
  37. smalltalk.AnnouncementSubscription);
  38. smalltalk.addMethod(
  39. smalltalk.method({
  40. selector: "block:",
  41. fn: function (aValuable){
  42. var self=this;
  43. return smalltalk.withContext(function($ctx1) {
  44. _st(self)._deprecatedAPI();
  45. _st(self)._valuable_(aValuable);
  46. return self}, function($ctx1) {$ctx1.fill(self,"block:",{aValuable:aValuable},smalltalk.AnnouncementSubscription)})},
  47. messageSends: ["deprecatedAPI", "valuable:"]}),
  48. smalltalk.AnnouncementSubscription);
  49. smalltalk.addMethod(
  50. smalltalk.method({
  51. selector: "deliver:",
  52. fn: function (anAnnouncement){
  53. var self=this;
  54. return smalltalk.withContext(function($ctx1) {
  55. var $1;
  56. $1=_st(self)._handlesAnnouncement_(anAnnouncement);
  57. if(smalltalk.assert($1)){
  58. _st(_st(self)._valuable())._value_(anAnnouncement);
  59. };
  60. return self}, function($ctx1) {$ctx1.fill(self,"deliver:",{anAnnouncement:anAnnouncement},smalltalk.AnnouncementSubscription)})},
  61. messageSends: ["ifTrue:", "value:", "valuable", "handlesAnnouncement:"]}),
  62. smalltalk.AnnouncementSubscription);
  63. smalltalk.addMethod(
  64. smalltalk.method({
  65. selector: "handlesAnnouncement:",
  66. fn: function (anAnnouncement){
  67. var self=this;
  68. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  69. return smalltalk.withContext(function($ctx1) {
  70. var $2,$1;
  71. $2=_st(_st($Smalltalk())._current())._at_(_st(_st(self)._announcementClass())._name());
  72. if(($receiver = $2) == nil || $receiver == undefined){
  73. return false;
  74. } else {
  75. var class_;
  76. class_=$receiver;
  77. $1=_st(class_)._includesBehavior_(_st(_st($Smalltalk())._current())._at_(_st(_st(_st(anAnnouncement)._class())._theNonMetaClass())._name()));
  78. };
  79. return $1;
  80. }, function($ctx1) {$ctx1.fill(self,"handlesAnnouncement:",{anAnnouncement:anAnnouncement},smalltalk.AnnouncementSubscription)})},
  81. messageSends: ["ifNil:ifNotNil:", "includesBehavior:", "at:", "name", "theNonMetaClass", "class", "current", "announcementClass"]}),
  82. smalltalk.AnnouncementSubscription);
  83. smalltalk.addMethod(
  84. smalltalk.method({
  85. selector: "receiver",
  86. fn: function (){
  87. var self=this;
  88. return smalltalk.withContext(function($ctx1) {
  89. var $1;
  90. $1=_st(_st(self)._valuable())._receiver();
  91. return $1;
  92. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.AnnouncementSubscription)})},
  93. messageSends: ["receiver", "valuable"]}),
  94. smalltalk.AnnouncementSubscription);
  95. smalltalk.addMethod(
  96. smalltalk.method({
  97. selector: "valuable",
  98. fn: function (){
  99. var self=this;
  100. return smalltalk.withContext(function($ctx1) {
  101. var $1;
  102. $1=self["@valuable"];
  103. return $1;
  104. }, function($ctx1) {$ctx1.fill(self,"valuable",{},smalltalk.AnnouncementSubscription)})},
  105. messageSends: []}),
  106. smalltalk.AnnouncementSubscription);
  107. smalltalk.addMethod(
  108. smalltalk.method({
  109. selector: "valuable:",
  110. fn: function (aValuable){
  111. var self=this;
  112. return smalltalk.withContext(function($ctx1) {
  113. self["@valuable"]=aValuable;
  114. return self}, function($ctx1) {$ctx1.fill(self,"valuable:",{aValuable:aValuable},smalltalk.AnnouncementSubscription)})},
  115. messageSends: []}),
  116. smalltalk.AnnouncementSubscription);
  117. smalltalk.addClass('Announcer', smalltalk.Object, ['registry', 'subscriptions'], 'Kernel-Announcements');
  118. smalltalk.addMethod(
  119. smalltalk.method({
  120. selector: "announce:",
  121. fn: function (anAnnouncement){
  122. var self=this;
  123. return smalltalk.withContext(function($ctx1) {
  124. _st(self["@subscriptions"])._do_((function(each){
  125. return smalltalk.withContext(function($ctx2) {
  126. return _st(each)._deliver_(anAnnouncement);
  127. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  128. return self}, function($ctx1) {$ctx1.fill(self,"announce:",{anAnnouncement:anAnnouncement},smalltalk.Announcer)})},
  129. messageSends: ["do:", "deliver:"]}),
  130. smalltalk.Announcer);
  131. smalltalk.addMethod(
  132. smalltalk.method({
  133. selector: "initialize",
  134. fn: function (){
  135. var self=this;
  136. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  137. return smalltalk.withContext(function($ctx1) {
  138. smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  139. self["@subscriptions"]=_st($Array())._new();
  140. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Announcer)})},
  141. messageSends: ["initialize", "new"]}),
  142. smalltalk.Announcer);
  143. smalltalk.addMethod(
  144. smalltalk.method({
  145. selector: "on:do:",
  146. fn: function (aClass,aBlock){
  147. var self=this;
  148. function $AnnouncementSubscription(){return smalltalk.AnnouncementSubscription||(typeof AnnouncementSubscription=="undefined"?nil:AnnouncementSubscription)}
  149. return smalltalk.withContext(function($ctx1) {
  150. var $1,$2;
  151. $1=_st($AnnouncementSubscription())._new();
  152. _st($1)._valuable_(aBlock);
  153. _st($1)._announcementClass_(aClass);
  154. $2=_st($1)._yourself();
  155. _st(self["@subscriptions"])._add_($2);
  156. return self}, function($ctx1) {$ctx1.fill(self,"on:do:",{aClass:aClass,aBlock:aBlock},smalltalk.Announcer)})},
  157. messageSends: ["add:", "valuable:", "new", "announcementClass:", "yourself"]}),
  158. smalltalk.Announcer);
  159. smalltalk.addClass('SystemAnnouncer', smalltalk.Announcer, [], 'Kernel-Announcements');
  160. smalltalk.SystemAnnouncer.klass.iVarNames = ['current'];
  161. smalltalk.addMethod(
  162. smalltalk.method({
  163. selector: "current",
  164. fn: function (){
  165. var self=this;
  166. return smalltalk.withContext(function($ctx1) {
  167. var $2,$1;
  168. $2=self["@current"];
  169. if(($receiver = $2) == nil || $receiver == undefined){
  170. self["@current"]=smalltalk.Announcer.klass.fn.prototype._new.apply(_st(self), []);
  171. $1=self["@current"];
  172. } else {
  173. $1=$2;
  174. };
  175. return $1;
  176. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.SystemAnnouncer.klass)})},
  177. messageSends: ["ifNil:", "new"]}),
  178. smalltalk.SystemAnnouncer.klass);
  179. smalltalk.addMethod(
  180. smalltalk.method({
  181. selector: "new",
  182. fn: function (){
  183. var self=this;
  184. return smalltalk.withContext(function($ctx1) {
  185. _st(self)._shouldNotImplement();
  186. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.SystemAnnouncer.klass)})},
  187. messageSends: ["shouldNotImplement"]}),
  188. smalltalk.SystemAnnouncer.klass);
  189. smalltalk.addClass('SystemAnnouncement', smalltalk.Object, ['theClass'], 'Kernel-Announcements');
  190. smalltalk.addMethod(
  191. smalltalk.method({
  192. selector: "theClass",
  193. fn: function (){
  194. var self=this;
  195. return smalltalk.withContext(function($ctx1) {
  196. var $1;
  197. $1=self["@theClass"];
  198. return $1;
  199. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.SystemAnnouncement)})},
  200. messageSends: []}),
  201. smalltalk.SystemAnnouncement);
  202. smalltalk.addMethod(
  203. smalltalk.method({
  204. selector: "theClass:",
  205. fn: function (aClass){
  206. var self=this;
  207. return smalltalk.withContext(function($ctx1) {
  208. self["@theClass"]=aClass;
  209. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.SystemAnnouncement)})},
  210. messageSends: []}),
  211. smalltalk.SystemAnnouncement);
  212. smalltalk.addClass('ClassAnnouncement', smalltalk.SystemAnnouncement, ['theClass'], 'Kernel-Announcements');
  213. smalltalk.addMethod(
  214. smalltalk.method({
  215. selector: "theClass",
  216. fn: function (){
  217. var self=this;
  218. return smalltalk.withContext(function($ctx1) {
  219. var $1;
  220. $1=self["@theClass"];
  221. return $1;
  222. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassAnnouncement)})},
  223. messageSends: []}),
  224. smalltalk.ClassAnnouncement);
  225. smalltalk.addMethod(
  226. smalltalk.method({
  227. selector: "theClass:",
  228. fn: function (aClass){
  229. var self=this;
  230. return smalltalk.withContext(function($ctx1) {
  231. self["@theClass"]=aClass;
  232. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ClassAnnouncement)})},
  233. messageSends: []}),
  234. smalltalk.ClassAnnouncement);
  235. smalltalk.addClass('ClassAdded', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  236. smalltalk.addClass('ClassCommentChanged', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  237. smalltalk.addClass('ClassDefinitionChanged', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  238. smalltalk.addClass('ClassMigrated', smalltalk.ClassAnnouncement, ['oldClass'], 'Kernel-Announcements');
  239. smalltalk.addMethod(
  240. smalltalk.method({
  241. selector: "oldClass",
  242. fn: function (){
  243. var self=this;
  244. return smalltalk.withContext(function($ctx1) {
  245. var $1;
  246. $1=self["@oldClass"];
  247. return $1;
  248. }, function($ctx1) {$ctx1.fill(self,"oldClass",{},smalltalk.ClassMigrated)})},
  249. messageSends: []}),
  250. smalltalk.ClassMigrated);
  251. smalltalk.addMethod(
  252. smalltalk.method({
  253. selector: "oldClass:",
  254. fn: function (aClass){
  255. var self=this;
  256. return smalltalk.withContext(function($ctx1) {
  257. self["@oldClass"]=aClass;
  258. return self}, function($ctx1) {$ctx1.fill(self,"oldClass:",{aClass:aClass},smalltalk.ClassMigrated)})},
  259. messageSends: []}),
  260. smalltalk.ClassMigrated);
  261. smalltalk.addClass('ClassMoved', smalltalk.ClassAnnouncement, ['oldPackage'], 'Kernel-Announcements');
  262. smalltalk.addMethod(
  263. smalltalk.method({
  264. selector: "oldPackage",
  265. fn: function (){
  266. var self=this;
  267. return smalltalk.withContext(function($ctx1) {
  268. var $1;
  269. $1=self["@oldPackage"];
  270. return $1;
  271. }, function($ctx1) {$ctx1.fill(self,"oldPackage",{},smalltalk.ClassMoved)})},
  272. messageSends: []}),
  273. smalltalk.ClassMoved);
  274. smalltalk.addMethod(
  275. smalltalk.method({
  276. selector: "oldPackage:",
  277. fn: function (aPackage){
  278. var self=this;
  279. return smalltalk.withContext(function($ctx1) {
  280. self["@oldPackage"]=aPackage;
  281. return self}, function($ctx1) {$ctx1.fill(self,"oldPackage:",{aPackage:aPackage},smalltalk.ClassMoved)})},
  282. messageSends: []}),
  283. smalltalk.ClassMoved);
  284. smalltalk.addClass('ClassRemoved', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  285. smalltalk.addClass('ClassRenamed', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  286. smalltalk.addClass('MethodAnnouncement', smalltalk.SystemAnnouncement, ['method'], 'Kernel-Announcements');
  287. smalltalk.addMethod(
  288. smalltalk.method({
  289. selector: "method",
  290. fn: function (){
  291. var self=this;
  292. return smalltalk.withContext(function($ctx1) {
  293. var $1;
  294. $1=self["@method"];
  295. return $1;
  296. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.MethodAnnouncement)})},
  297. messageSends: []}),
  298. smalltalk.MethodAnnouncement);
  299. smalltalk.addMethod(
  300. smalltalk.method({
  301. selector: "method:",
  302. fn: function (aCompiledMethod){
  303. var self=this;
  304. return smalltalk.withContext(function($ctx1) {
  305. self["@method"]=aCompiledMethod;
  306. return self}, function($ctx1) {$ctx1.fill(self,"method:",{aCompiledMethod:aCompiledMethod},smalltalk.MethodAnnouncement)})},
  307. messageSends: []}),
  308. smalltalk.MethodAnnouncement);
  309. smalltalk.addClass('MethodAdded', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  310. smalltalk.addClass('MethodModified', smalltalk.MethodAnnouncement, ['oldMethod'], 'Kernel-Announcements');
  311. smalltalk.addMethod(
  312. smalltalk.method({
  313. selector: "oldMethod",
  314. fn: function (){
  315. var self=this;
  316. return smalltalk.withContext(function($ctx1) {
  317. var $1;
  318. $1=self["@oldMethod"];
  319. return $1;
  320. }, function($ctx1) {$ctx1.fill(self,"oldMethod",{},smalltalk.MethodModified)})},
  321. messageSends: []}),
  322. smalltalk.MethodModified);
  323. smalltalk.addMethod(
  324. smalltalk.method({
  325. selector: "oldMethod:",
  326. fn: function (aMethod){
  327. var self=this;
  328. return smalltalk.withContext(function($ctx1) {
  329. self["@oldMethod"]=aMethod;
  330. return self}, function($ctx1) {$ctx1.fill(self,"oldMethod:",{aMethod:aMethod},smalltalk.MethodModified)})},
  331. messageSends: []}),
  332. smalltalk.MethodModified);
  333. smalltalk.addClass('MethodMoved', smalltalk.MethodAnnouncement, ['oldProtocol'], 'Kernel-Announcements');
  334. smalltalk.addMethod(
  335. smalltalk.method({
  336. selector: "oldProtocol",
  337. fn: function (){
  338. var self=this;
  339. return smalltalk.withContext(function($ctx1) {
  340. var $1;
  341. $1=self["@oldProtocol"];
  342. return $1;
  343. }, function($ctx1) {$ctx1.fill(self,"oldProtocol",{},smalltalk.MethodMoved)})},
  344. messageSends: []}),
  345. smalltalk.MethodMoved);
  346. smalltalk.addMethod(
  347. smalltalk.method({
  348. selector: "oldProtocol:",
  349. fn: function (aString){
  350. var self=this;
  351. return smalltalk.withContext(function($ctx1) {
  352. self["@oldProtocol"]=aString;
  353. return self}, function($ctx1) {$ctx1.fill(self,"oldProtocol:",{aString:aString},smalltalk.MethodMoved)})},
  354. messageSends: []}),
  355. smalltalk.MethodMoved);
  356. smalltalk.addClass('MethodRemoved', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  357. smalltalk.addClass('PackageAnnouncement', smalltalk.SystemAnnouncement, ['package'], 'Kernel-Announcements');
  358. smalltalk.addMethod(
  359. smalltalk.method({
  360. selector: "package",
  361. fn: function (){
  362. var self=this;
  363. return smalltalk.withContext(function($ctx1) {
  364. var $1;
  365. $1=self["@package"];
  366. return $1;
  367. }, function($ctx1) {$ctx1.fill(self,"package",{},smalltalk.PackageAnnouncement)})},
  368. messageSends: []}),
  369. smalltalk.PackageAnnouncement);
  370. smalltalk.addMethod(
  371. smalltalk.method({
  372. selector: "package:",
  373. fn: function (aPackage){
  374. var self=this;
  375. return smalltalk.withContext(function($ctx1) {
  376. self["@package"]=aPackage;
  377. return self}, function($ctx1) {$ctx1.fill(self,"package:",{aPackage:aPackage},smalltalk.PackageAnnouncement)})},
  378. messageSends: []}),
  379. smalltalk.PackageAnnouncement);
  380. smalltalk.addClass('PackageAdded', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  381. smalltalk.addClass('PackageRemoved', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  382. smalltalk.addClass('ProtocolAnnouncement', smalltalk.SystemAnnouncement, ['theClass', 'protocol'], 'Kernel-Announcements');
  383. smalltalk.addMethod(
  384. smalltalk.method({
  385. selector: "protocol",
  386. fn: function (){
  387. var self=this;
  388. return smalltalk.withContext(function($ctx1) {
  389. var $1;
  390. $1=self["@protocol"];
  391. return $1;
  392. }, function($ctx1) {$ctx1.fill(self,"protocol",{},smalltalk.ProtocolAnnouncement)})},
  393. messageSends: []}),
  394. smalltalk.ProtocolAnnouncement);
  395. smalltalk.addMethod(
  396. smalltalk.method({
  397. selector: "protocol:",
  398. fn: function (aString){
  399. var self=this;
  400. return smalltalk.withContext(function($ctx1) {
  401. self["@protocol"]=aString;
  402. return self}, function($ctx1) {$ctx1.fill(self,"protocol:",{aString:aString},smalltalk.ProtocolAnnouncement)})},
  403. messageSends: []}),
  404. smalltalk.ProtocolAnnouncement);
  405. smalltalk.addMethod(
  406. smalltalk.method({
  407. selector: "theClass",
  408. fn: function (){
  409. var self=this;
  410. return smalltalk.withContext(function($ctx1) {
  411. var $1;
  412. $1=self["@theClass"];
  413. return $1;
  414. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ProtocolAnnouncement)})},
  415. messageSends: []}),
  416. smalltalk.ProtocolAnnouncement);
  417. smalltalk.addMethod(
  418. smalltalk.method({
  419. selector: "theClass:",
  420. fn: function (aClass){
  421. var self=this;
  422. return smalltalk.withContext(function($ctx1) {
  423. self["@theClass"]=aClass;
  424. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ProtocolAnnouncement)})},
  425. messageSends: []}),
  426. smalltalk.ProtocolAnnouncement);
  427. smalltalk.addClass('ProtocolAdded', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');
  428. smalltalk.addClass('ProtocolRemoved', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');