2
0

Kernel-Announcements.deploy.js 14 KB

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