2
0

Kernel-Announcements.deploy.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. smalltalk.addPackage('Kernel-Announcements');
  2. smalltalk.addClass('AnnouncementSubscription', smalltalk.Object, ['block', 'announcementClass'], 'Kernel-Announcements');
  3. smalltalk.addMethod(
  4. "_announcementClass",
  5. smalltalk.method({
  6. selector: "announcementClass",
  7. fn: function (){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) { 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. "_announcementClass_",
  17. smalltalk.method({
  18. selector: "announcementClass:",
  19. fn: function (aClass){
  20. var self=this;
  21. return smalltalk.withContext(function($ctx1) { 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. "_block",
  27. smalltalk.method({
  28. selector: "block",
  29. fn: function (){
  30. var self=this;
  31. return smalltalk.withContext(function($ctx1) { 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. "_block_",
  39. smalltalk.method({
  40. selector: "block:",
  41. fn: function (aBlock){
  42. var self=this;
  43. return smalltalk.withContext(function($ctx1) { 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. "_deliver_",
  49. smalltalk.method({
  50. selector: "deliver:",
  51. fn: function (anAnnouncement){
  52. var self=this;
  53. return smalltalk.withContext(function($ctx1) { 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. "_handlesAnnouncement_",
  63. smalltalk.method({
  64. selector: "handlesAnnouncement:",
  65. fn: function (anAnnouncement){
  66. var self=this;
  67. return smalltalk.withContext(function($ctx1) { var $1;
  68. $1=_st(anAnnouncement)._isKindOf_(_st(self)._announcementClass());
  69. return $1;
  70. }, function($ctx1) {$ctx1.fill(self,"handlesAnnouncement:",{anAnnouncement:anAnnouncement}, smalltalk.AnnouncementSubscription)})},
  71. messageSends: ["isKindOf:", "announcementClass"]}),
  72. smalltalk.AnnouncementSubscription);
  73. smalltalk.addClass('Announcer', smalltalk.Object, ['registry', 'subscriptions'], 'Kernel-Announcements');
  74. smalltalk.addMethod(
  75. "_announce_",
  76. smalltalk.method({
  77. selector: "announce:",
  78. fn: function (anAnnouncement){
  79. var self=this;
  80. return smalltalk.withContext(function($ctx1) { _st(self["@subscriptions"])._do_((function(each){
  81. return smalltalk.withContext(function($ctx2) { return _st(each)._deliver_(anAnnouncement);
  82. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  83. return self}, function($ctx1) {$ctx1.fill(self,"announce:",{anAnnouncement:anAnnouncement}, smalltalk.Announcer)})},
  84. messageSends: ["do:", "deliver:"]}),
  85. smalltalk.Announcer);
  86. smalltalk.addMethod(
  87. "_initialize",
  88. smalltalk.method({
  89. selector: "initialize",
  90. fn: function (){
  91. var self=this;
  92. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  93. self["@subscriptions"]=_st((smalltalk.Array || Array))._new();
  94. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.Announcer)})},
  95. messageSends: ["initialize", "new"]}),
  96. smalltalk.Announcer);
  97. smalltalk.addMethod(
  98. "_on_do_",
  99. smalltalk.method({
  100. selector: "on:do:",
  101. fn: function (aClass,aBlock){
  102. var self=this;
  103. return smalltalk.withContext(function($ctx1) { var $1,$2;
  104. $1=_st((smalltalk.AnnouncementSubscription || AnnouncementSubscription))._new();
  105. _st($1)._block_(aBlock);
  106. _st($1)._announcementClass_(aClass);
  107. $2=_st($1)._yourself();
  108. _st(self["@subscriptions"])._add_($2);
  109. return self}, function($ctx1) {$ctx1.fill(self,"on:do:",{aClass:aClass,aBlock:aBlock}, smalltalk.Announcer)})},
  110. messageSends: ["add:", "block:", "new", "announcementClass:", "yourself"]}),
  111. smalltalk.Announcer);
  112. smalltalk.addClass('SystemAnnouncer', smalltalk.Announcer, [], 'Kernel-Announcements');
  113. smalltalk.SystemAnnouncer.klass.iVarNames = ['current'];
  114. smalltalk.addMethod(
  115. "_current",
  116. smalltalk.method({
  117. selector: "current",
  118. fn: function (){
  119. var self=this;
  120. return smalltalk.withContext(function($ctx1) { var $2,$1;
  121. $2=self["@current"];
  122. if(($receiver = $2) == nil || $receiver == undefined){
  123. self["@current"]=smalltalk.Announcer.klass.fn.prototype._new.apply(_st(self), []);
  124. $1=self["@current"];
  125. } else {
  126. $1=$2;
  127. };
  128. return $1;
  129. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.SystemAnnouncer.klass)})},
  130. messageSends: ["ifNil:", "new"]}),
  131. smalltalk.SystemAnnouncer.klass);
  132. smalltalk.addMethod(
  133. "_new",
  134. smalltalk.method({
  135. selector: "new",
  136. fn: function (){
  137. var self=this;
  138. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  139. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.SystemAnnouncer.klass)})},
  140. messageSends: ["shouldNotImplement"]}),
  141. smalltalk.SystemAnnouncer.klass);
  142. smalltalk.addClass('SystemAnnouncement', smalltalk.Object, ['theClass'], 'Kernel-Announcements');
  143. smalltalk.addMethod(
  144. "_theClass",
  145. smalltalk.method({
  146. selector: "theClass",
  147. fn: function (){
  148. var self=this;
  149. return smalltalk.withContext(function($ctx1) { var $1;
  150. $1=self["@theClass"];
  151. return $1;
  152. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.SystemAnnouncement)})},
  153. messageSends: []}),
  154. smalltalk.SystemAnnouncement);
  155. smalltalk.addMethod(
  156. "_theClass_",
  157. smalltalk.method({
  158. selector: "theClass:",
  159. fn: function (aClass){
  160. var self=this;
  161. return smalltalk.withContext(function($ctx1) { self["@theClass"]=aClass;
  162. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.SystemAnnouncement)})},
  163. messageSends: []}),
  164. smalltalk.SystemAnnouncement);
  165. smalltalk.addClass('ClassAnnouncement', smalltalk.SystemAnnouncement, ['theClass'], 'Kernel-Announcements');
  166. smalltalk.addMethod(
  167. "_theClass",
  168. smalltalk.method({
  169. selector: "theClass",
  170. fn: function (){
  171. var self=this;
  172. return smalltalk.withContext(function($ctx1) { var $1;
  173. $1=self["@theClass"];
  174. return $1;
  175. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.ClassAnnouncement)})},
  176. messageSends: []}),
  177. smalltalk.ClassAnnouncement);
  178. smalltalk.addMethod(
  179. "_theClass_",
  180. smalltalk.method({
  181. selector: "theClass:",
  182. fn: function (aClass){
  183. var self=this;
  184. return smalltalk.withContext(function($ctx1) { self["@theClass"]=aClass;
  185. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.ClassAnnouncement)})},
  186. messageSends: []}),
  187. smalltalk.ClassAnnouncement);
  188. smalltalk.addClass('ClassAdded', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  189. smalltalk.addClass('ClassCommentChanged', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  190. smalltalk.addClass('ClassDefinitionChanged', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  191. smalltalk.addClass('ClassRemoved', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  192. smalltalk.addClass('ClassRenamed', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  193. smalltalk.addClass('MethodAnnouncement', smalltalk.SystemAnnouncement, ['method'], 'Kernel-Announcements');
  194. smalltalk.addMethod(
  195. "_method",
  196. smalltalk.method({
  197. selector: "method",
  198. fn: function (){
  199. var self=this;
  200. return smalltalk.withContext(function($ctx1) { var $1;
  201. $1=self["@method"];
  202. return $1;
  203. }, function($ctx1) {$ctx1.fill(self,"method",{}, smalltalk.MethodAnnouncement)})},
  204. messageSends: []}),
  205. smalltalk.MethodAnnouncement);
  206. smalltalk.addMethod(
  207. "_method_",
  208. smalltalk.method({
  209. selector: "method:",
  210. fn: function (aCompiledMethod){
  211. var self=this;
  212. return smalltalk.withContext(function($ctx1) { self["@method"]=aCompiledMethod;
  213. return self}, function($ctx1) {$ctx1.fill(self,"method:",{aCompiledMethod:aCompiledMethod}, smalltalk.MethodAnnouncement)})},
  214. messageSends: []}),
  215. smalltalk.MethodAnnouncement);
  216. smalltalk.addClass('MethodAdded', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  217. smalltalk.addClass('MethodModified', smalltalk.MethodAnnouncement, ['oldMethod'], 'Kernel-Announcements');
  218. smalltalk.addMethod(
  219. "_oldMethod",
  220. smalltalk.method({
  221. selector: "oldMethod",
  222. fn: function (){
  223. var self=this;
  224. return smalltalk.withContext(function($ctx1) { var $1;
  225. $1=self["@oldMethod"];
  226. return $1;
  227. }, function($ctx1) {$ctx1.fill(self,"oldMethod",{}, smalltalk.MethodModified)})},
  228. messageSends: []}),
  229. smalltalk.MethodModified);
  230. smalltalk.addMethod(
  231. "_oldMethod_",
  232. smalltalk.method({
  233. selector: "oldMethod:",
  234. fn: function (aMethod){
  235. var self=this;
  236. return smalltalk.withContext(function($ctx1) { self["@oldMethod"]=aMethod;
  237. return self}, function($ctx1) {$ctx1.fill(self,"oldMethod:",{aMethod:aMethod}, smalltalk.MethodModified)})},
  238. messageSends: []}),
  239. smalltalk.MethodModified);
  240. smalltalk.addClass('MethodRemoved', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  241. smalltalk.addClass('PackageAnnouncement', smalltalk.SystemAnnouncement, ['package'], 'Kernel-Announcements');
  242. smalltalk.addMethod(
  243. "_package",
  244. smalltalk.method({
  245. selector: "package",
  246. fn: function (){
  247. var self=this;
  248. return smalltalk.withContext(function($ctx1) { var $1;
  249. $1=self["@package"];
  250. return $1;
  251. }, function($ctx1) {$ctx1.fill(self,"package",{}, smalltalk.PackageAnnouncement)})},
  252. messageSends: []}),
  253. smalltalk.PackageAnnouncement);
  254. smalltalk.addMethod(
  255. "_package_",
  256. smalltalk.method({
  257. selector: "package:",
  258. fn: function (aPackage){
  259. var self=this;
  260. return smalltalk.withContext(function($ctx1) { self["@package"]=aPackage;
  261. return self}, function($ctx1) {$ctx1.fill(self,"package:",{aPackage:aPackage}, smalltalk.PackageAnnouncement)})},
  262. messageSends: []}),
  263. smalltalk.PackageAnnouncement);
  264. smalltalk.addClass('PackageAdded', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  265. smalltalk.addClass('PackageRemoved', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  266. smalltalk.addClass('ProtocolAnnouncement', smalltalk.SystemAnnouncement, ['theClass', 'protocol'], 'Kernel-Announcements');
  267. smalltalk.addMethod(
  268. "_protocol",
  269. smalltalk.method({
  270. selector: "protocol",
  271. fn: function (){
  272. var self=this;
  273. return smalltalk.withContext(function($ctx1) { var $1;
  274. $1=self["@protocol"];
  275. return $1;
  276. }, function($ctx1) {$ctx1.fill(self,"protocol",{}, smalltalk.ProtocolAnnouncement)})},
  277. messageSends: []}),
  278. smalltalk.ProtocolAnnouncement);
  279. smalltalk.addMethod(
  280. "_protocol_",
  281. smalltalk.method({
  282. selector: "protocol:",
  283. fn: function (aString){
  284. var self=this;
  285. return smalltalk.withContext(function($ctx1) { self["@protocol"]=aString;
  286. return self}, function($ctx1) {$ctx1.fill(self,"protocol:",{aString:aString}, smalltalk.ProtocolAnnouncement)})},
  287. messageSends: []}),
  288. smalltalk.ProtocolAnnouncement);
  289. smalltalk.addMethod(
  290. "_theClass",
  291. smalltalk.method({
  292. selector: "theClass",
  293. fn: function (){
  294. var self=this;
  295. return smalltalk.withContext(function($ctx1) { var $1;
  296. $1=self["@theClass"];
  297. return $1;
  298. }, function($ctx1) {$ctx1.fill(self,"theClass",{}, smalltalk.ProtocolAnnouncement)})},
  299. messageSends: []}),
  300. smalltalk.ProtocolAnnouncement);
  301. smalltalk.addMethod(
  302. "_theClass_",
  303. smalltalk.method({
  304. selector: "theClass:",
  305. fn: function (aClass){
  306. var self=this;
  307. return smalltalk.withContext(function($ctx1) { self["@theClass"]=aClass;
  308. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass}, smalltalk.ProtocolAnnouncement)})},
  309. messageSends: []}),
  310. smalltalk.ProtocolAnnouncement);
  311. smalltalk.addClass('ProtocolAdded', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');
  312. smalltalk.addClass('ProtocolRemoved', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');