1
0

Kernel-Announcements.deploy.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  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. return smalltalk.withContext(function($ctx1) {
  67. 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. smalltalk.method({
  76. selector: "announce:",
  77. fn: function (anAnnouncement){
  78. var self=this;
  79. return smalltalk.withContext(function($ctx1) {
  80. _st(self["@subscriptions"])._do_((function(each){
  81. return smalltalk.withContext(function($ctx2) {
  82. return _st(each)._deliver_(anAnnouncement);
  83. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  84. return self}, function($ctx1) {$ctx1.fill(self,"announce:",{anAnnouncement:anAnnouncement},smalltalk.Announcer)})},
  85. messageSends: ["do:", "deliver:"]}),
  86. smalltalk.Announcer);
  87. smalltalk.addMethod(
  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) {
  94. smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  95. self["@subscriptions"]=_st($Array())._new();
  96. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Announcer)})},
  97. messageSends: ["initialize", "new"]}),
  98. smalltalk.Announcer);
  99. smalltalk.addMethod(
  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) {
  106. var $1,$2;
  107. $1=_st($AnnouncementSubscription())._new();
  108. _st($1)._block_(aBlock);
  109. _st($1)._announcementClass_(aClass);
  110. $2=_st($1)._yourself();
  111. _st(self["@subscriptions"])._add_($2);
  112. return self}, function($ctx1) {$ctx1.fill(self,"on:do:",{aClass:aClass,aBlock:aBlock},smalltalk.Announcer)})},
  113. messageSends: ["add:", "block:", "new", "announcementClass:", "yourself"]}),
  114. smalltalk.Announcer);
  115. smalltalk.addClass('SystemAnnouncer', smalltalk.Announcer, [], 'Kernel-Announcements');
  116. smalltalk.SystemAnnouncer.klass.iVarNames = ['current'];
  117. smalltalk.addMethod(
  118. smalltalk.method({
  119. selector: "current",
  120. fn: function (){
  121. var self=this;
  122. return smalltalk.withContext(function($ctx1) {
  123. var $2,$1;
  124. $2=self["@current"];
  125. if(($receiver = $2) == nil || $receiver == undefined){
  126. self["@current"]=smalltalk.Announcer.klass.fn.prototype._new.apply(_st(self), []);
  127. $1=self["@current"];
  128. } else {
  129. $1=$2;
  130. };
  131. return $1;
  132. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.SystemAnnouncer.klass)})},
  133. messageSends: ["ifNil:", "new"]}),
  134. smalltalk.SystemAnnouncer.klass);
  135. smalltalk.addMethod(
  136. smalltalk.method({
  137. selector: "new",
  138. fn: function (){
  139. var self=this;
  140. return smalltalk.withContext(function($ctx1) {
  141. _st(self)._shouldNotImplement();
  142. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.SystemAnnouncer.klass)})},
  143. messageSends: ["shouldNotImplement"]}),
  144. smalltalk.SystemAnnouncer.klass);
  145. smalltalk.addClass('SystemAnnouncement', smalltalk.Object, ['theClass'], 'Kernel-Announcements');
  146. smalltalk.addMethod(
  147. smalltalk.method({
  148. selector: "theClass",
  149. fn: function (){
  150. var self=this;
  151. return smalltalk.withContext(function($ctx1) {
  152. var $1;
  153. $1=self["@theClass"];
  154. return $1;
  155. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.SystemAnnouncement)})},
  156. messageSends: []}),
  157. smalltalk.SystemAnnouncement);
  158. smalltalk.addMethod(
  159. smalltalk.method({
  160. selector: "theClass:",
  161. fn: function (aClass){
  162. var self=this;
  163. return smalltalk.withContext(function($ctx1) {
  164. self["@theClass"]=aClass;
  165. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.SystemAnnouncement)})},
  166. messageSends: []}),
  167. smalltalk.SystemAnnouncement);
  168. smalltalk.addClass('ClassAnnouncement', smalltalk.SystemAnnouncement, ['theClass'], 'Kernel-Announcements');
  169. smalltalk.addMethod(
  170. smalltalk.method({
  171. selector: "theClass",
  172. fn: function (){
  173. var self=this;
  174. return smalltalk.withContext(function($ctx1) {
  175. var $1;
  176. $1=self["@theClass"];
  177. return $1;
  178. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassAnnouncement)})},
  179. messageSends: []}),
  180. smalltalk.ClassAnnouncement);
  181. smalltalk.addMethod(
  182. smalltalk.method({
  183. selector: "theClass:",
  184. fn: function (aClass){
  185. var self=this;
  186. return smalltalk.withContext(function($ctx1) {
  187. self["@theClass"]=aClass;
  188. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ClassAnnouncement)})},
  189. messageSends: []}),
  190. smalltalk.ClassAnnouncement);
  191. smalltalk.addClass('ClassAdded', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  192. smalltalk.addClass('ClassCommentChanged', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  193. smalltalk.addClass('ClassDefinitionChanged', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  194. smalltalk.addClass('ClassMoved', smalltalk.ClassAnnouncement, ['oldPackage'], 'Kernel-Announcements');
  195. smalltalk.addMethod(
  196. smalltalk.method({
  197. selector: "oldPackage",
  198. fn: function (){
  199. var self=this;
  200. return smalltalk.withContext(function($ctx1) {
  201. var $1;
  202. $1=self["@oldPackage"];
  203. return $1;
  204. }, function($ctx1) {$ctx1.fill(self,"oldPackage",{},smalltalk.ClassMoved)})},
  205. messageSends: []}),
  206. smalltalk.ClassMoved);
  207. smalltalk.addMethod(
  208. smalltalk.method({
  209. selector: "oldPackage:",
  210. fn: function (aPackage){
  211. var self=this;
  212. return smalltalk.withContext(function($ctx1) {
  213. self["@oldPackage"]=aPackage;
  214. return self}, function($ctx1) {$ctx1.fill(self,"oldPackage:",{aPackage:aPackage},smalltalk.ClassMoved)})},
  215. messageSends: []}),
  216. smalltalk.ClassMoved);
  217. smalltalk.addClass('ClassRemoved', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  218. smalltalk.addClass('ClassRenamed', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  219. smalltalk.addClass('MethodAnnouncement', smalltalk.SystemAnnouncement, ['method'], 'Kernel-Announcements');
  220. smalltalk.addMethod(
  221. smalltalk.method({
  222. selector: "method",
  223. fn: function (){
  224. var self=this;
  225. return smalltalk.withContext(function($ctx1) {
  226. var $1;
  227. $1=self["@method"];
  228. return $1;
  229. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.MethodAnnouncement)})},
  230. messageSends: []}),
  231. smalltalk.MethodAnnouncement);
  232. smalltalk.addMethod(
  233. smalltalk.method({
  234. selector: "method:",
  235. fn: function (aCompiledMethod){
  236. var self=this;
  237. return smalltalk.withContext(function($ctx1) {
  238. self["@method"]=aCompiledMethod;
  239. return self}, function($ctx1) {$ctx1.fill(self,"method:",{aCompiledMethod:aCompiledMethod},smalltalk.MethodAnnouncement)})},
  240. messageSends: []}),
  241. smalltalk.MethodAnnouncement);
  242. smalltalk.addClass('MethodAdded', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  243. smalltalk.addClass('MethodModified', smalltalk.MethodAnnouncement, ['oldMethod'], 'Kernel-Announcements');
  244. smalltalk.addMethod(
  245. smalltalk.method({
  246. selector: "oldMethod",
  247. fn: function (){
  248. var self=this;
  249. return smalltalk.withContext(function($ctx1) {
  250. var $1;
  251. $1=self["@oldMethod"];
  252. return $1;
  253. }, function($ctx1) {$ctx1.fill(self,"oldMethod",{},smalltalk.MethodModified)})},
  254. messageSends: []}),
  255. smalltalk.MethodModified);
  256. smalltalk.addMethod(
  257. smalltalk.method({
  258. selector: "oldMethod:",
  259. fn: function (aMethod){
  260. var self=this;
  261. return smalltalk.withContext(function($ctx1) {
  262. self["@oldMethod"]=aMethod;
  263. return self}, function($ctx1) {$ctx1.fill(self,"oldMethod:",{aMethod:aMethod},smalltalk.MethodModified)})},
  264. messageSends: []}),
  265. smalltalk.MethodModified);
  266. smalltalk.addClass('MethodMoved', smalltalk.MethodAnnouncement, ['oldProtocol'], 'Kernel-Announcements');
  267. smalltalk.addMethod(
  268. smalltalk.method({
  269. selector: "oldProtocol",
  270. fn: function (){
  271. var self=this;
  272. return smalltalk.withContext(function($ctx1) {
  273. var $1;
  274. $1=self["@oldProtocol"];
  275. return $1;
  276. }, function($ctx1) {$ctx1.fill(self,"oldProtocol",{},smalltalk.MethodMoved)})},
  277. messageSends: []}),
  278. smalltalk.MethodMoved);
  279. smalltalk.addMethod(
  280. smalltalk.method({
  281. selector: "oldProtocol:",
  282. fn: function (aString){
  283. var self=this;
  284. return smalltalk.withContext(function($ctx1) {
  285. self["@oldProtocol"]=aString;
  286. return self}, function($ctx1) {$ctx1.fill(self,"oldProtocol:",{aString:aString},smalltalk.MethodMoved)})},
  287. messageSends: []}),
  288. smalltalk.MethodMoved);
  289. smalltalk.addClass('MethodRemoved', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  290. smalltalk.addClass('PackageAnnouncement', smalltalk.SystemAnnouncement, ['package'], 'Kernel-Announcements');
  291. smalltalk.addMethod(
  292. smalltalk.method({
  293. selector: "package",
  294. fn: function (){
  295. var self=this;
  296. return smalltalk.withContext(function($ctx1) {
  297. var $1;
  298. $1=self["@package"];
  299. return $1;
  300. }, function($ctx1) {$ctx1.fill(self,"package",{},smalltalk.PackageAnnouncement)})},
  301. messageSends: []}),
  302. smalltalk.PackageAnnouncement);
  303. smalltalk.addMethod(
  304. smalltalk.method({
  305. selector: "package:",
  306. fn: function (aPackage){
  307. var self=this;
  308. return smalltalk.withContext(function($ctx1) {
  309. self["@package"]=aPackage;
  310. return self}, function($ctx1) {$ctx1.fill(self,"package:",{aPackage:aPackage},smalltalk.PackageAnnouncement)})},
  311. messageSends: []}),
  312. smalltalk.PackageAnnouncement);
  313. smalltalk.addClass('PackageAdded', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  314. smalltalk.addClass('PackageRemoved', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  315. smalltalk.addClass('ProtocolAnnouncement', smalltalk.SystemAnnouncement, ['theClass', 'protocol'], 'Kernel-Announcements');
  316. smalltalk.addMethod(
  317. smalltalk.method({
  318. selector: "protocol",
  319. fn: function (){
  320. var self=this;
  321. return smalltalk.withContext(function($ctx1) {
  322. var $1;
  323. $1=self["@protocol"];
  324. return $1;
  325. }, function($ctx1) {$ctx1.fill(self,"protocol",{},smalltalk.ProtocolAnnouncement)})},
  326. messageSends: []}),
  327. smalltalk.ProtocolAnnouncement);
  328. smalltalk.addMethod(
  329. smalltalk.method({
  330. selector: "protocol:",
  331. fn: function (aString){
  332. var self=this;
  333. return smalltalk.withContext(function($ctx1) {
  334. self["@protocol"]=aString;
  335. return self}, function($ctx1) {$ctx1.fill(self,"protocol:",{aString:aString},smalltalk.ProtocolAnnouncement)})},
  336. messageSends: []}),
  337. smalltalk.ProtocolAnnouncement);
  338. smalltalk.addMethod(
  339. smalltalk.method({
  340. selector: "theClass",
  341. fn: function (){
  342. var self=this;
  343. return smalltalk.withContext(function($ctx1) {
  344. var $1;
  345. $1=self["@theClass"];
  346. return $1;
  347. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ProtocolAnnouncement)})},
  348. messageSends: []}),
  349. smalltalk.ProtocolAnnouncement);
  350. smalltalk.addMethod(
  351. smalltalk.method({
  352. selector: "theClass:",
  353. fn: function (aClass){
  354. var self=this;
  355. return smalltalk.withContext(function($ctx1) {
  356. self["@theClass"]=aClass;
  357. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ProtocolAnnouncement)})},
  358. messageSends: []}),
  359. smalltalk.ProtocolAnnouncement);
  360. smalltalk.addClass('ProtocolAdded', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');
  361. smalltalk.addClass('ProtocolRemoved', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');