Kernel-Announcements.deploy.js 12 KB

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