Kernel-Announcements.deploy.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  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('ClassMoved', smalltalk.ClassAnnouncement, ['oldPackage'], 'Kernel-Announcements');
  203. smalltalk.addMethod(
  204. smalltalk.method({
  205. selector: "oldPackage",
  206. fn: function (){
  207. var self=this;
  208. return smalltalk.withContext(function($ctx1) {
  209. var $1;
  210. $1=self["@oldPackage"];
  211. return $1;
  212. }, function($ctx1) {$ctx1.fill(self,"oldPackage",{},smalltalk.ClassMoved)})},
  213. messageSends: []}),
  214. smalltalk.ClassMoved);
  215. smalltalk.addMethod(
  216. smalltalk.method({
  217. selector: "oldPackage:",
  218. fn: function (aPackage){
  219. var self=this;
  220. return smalltalk.withContext(function($ctx1) {
  221. self["@oldPackage"]=aPackage;
  222. return self}, function($ctx1) {$ctx1.fill(self,"oldPackage:",{aPackage:aPackage},smalltalk.ClassMoved)})},
  223. messageSends: []}),
  224. smalltalk.ClassMoved);
  225. smalltalk.addClass('ClassRemoved', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  226. smalltalk.addClass('ClassRenamed', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  227. smalltalk.addClass('MethodAnnouncement', smalltalk.SystemAnnouncement, ['method'], 'Kernel-Announcements');
  228. smalltalk.addMethod(
  229. smalltalk.method({
  230. selector: "method",
  231. fn: function (){
  232. var self=this;
  233. return smalltalk.withContext(function($ctx1) {
  234. var $1;
  235. $1=self["@method"];
  236. return $1;
  237. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.MethodAnnouncement)})},
  238. messageSends: []}),
  239. smalltalk.MethodAnnouncement);
  240. smalltalk.addMethod(
  241. smalltalk.method({
  242. selector: "method:",
  243. fn: function (aCompiledMethod){
  244. var self=this;
  245. return smalltalk.withContext(function($ctx1) {
  246. self["@method"]=aCompiledMethod;
  247. return self}, function($ctx1) {$ctx1.fill(self,"method:",{aCompiledMethod:aCompiledMethod},smalltalk.MethodAnnouncement)})},
  248. messageSends: []}),
  249. smalltalk.MethodAnnouncement);
  250. smalltalk.addClass('MethodAdded', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  251. smalltalk.addClass('MethodModified', smalltalk.MethodAnnouncement, ['oldMethod'], 'Kernel-Announcements');
  252. smalltalk.addMethod(
  253. smalltalk.method({
  254. selector: "oldMethod",
  255. fn: function (){
  256. var self=this;
  257. return smalltalk.withContext(function($ctx1) {
  258. var $1;
  259. $1=self["@oldMethod"];
  260. return $1;
  261. }, function($ctx1) {$ctx1.fill(self,"oldMethod",{},smalltalk.MethodModified)})},
  262. messageSends: []}),
  263. smalltalk.MethodModified);
  264. smalltalk.addMethod(
  265. smalltalk.method({
  266. selector: "oldMethod:",
  267. fn: function (aMethod){
  268. var self=this;
  269. return smalltalk.withContext(function($ctx1) {
  270. self["@oldMethod"]=aMethod;
  271. return self}, function($ctx1) {$ctx1.fill(self,"oldMethod:",{aMethod:aMethod},smalltalk.MethodModified)})},
  272. messageSends: []}),
  273. smalltalk.MethodModified);
  274. smalltalk.addClass('MethodMoved', smalltalk.MethodAnnouncement, ['oldProtocol'], 'Kernel-Announcements');
  275. smalltalk.addMethod(
  276. smalltalk.method({
  277. selector: "oldProtocol",
  278. fn: function (){
  279. var self=this;
  280. return smalltalk.withContext(function($ctx1) {
  281. var $1;
  282. $1=self["@oldProtocol"];
  283. return $1;
  284. }, function($ctx1) {$ctx1.fill(self,"oldProtocol",{},smalltalk.MethodMoved)})},
  285. messageSends: []}),
  286. smalltalk.MethodMoved);
  287. smalltalk.addMethod(
  288. smalltalk.method({
  289. selector: "oldProtocol:",
  290. fn: function (aString){
  291. var self=this;
  292. return smalltalk.withContext(function($ctx1) {
  293. self["@oldProtocol"]=aString;
  294. return self}, function($ctx1) {$ctx1.fill(self,"oldProtocol:",{aString:aString},smalltalk.MethodMoved)})},
  295. messageSends: []}),
  296. smalltalk.MethodMoved);
  297. smalltalk.addClass('MethodRemoved', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  298. smalltalk.addClass('PackageAnnouncement', smalltalk.SystemAnnouncement, ['package'], 'Kernel-Announcements');
  299. smalltalk.addMethod(
  300. smalltalk.method({
  301. selector: "package",
  302. fn: function (){
  303. var self=this;
  304. return smalltalk.withContext(function($ctx1) {
  305. var $1;
  306. $1=self["@package"];
  307. return $1;
  308. }, function($ctx1) {$ctx1.fill(self,"package",{},smalltalk.PackageAnnouncement)})},
  309. messageSends: []}),
  310. smalltalk.PackageAnnouncement);
  311. smalltalk.addMethod(
  312. smalltalk.method({
  313. selector: "package:",
  314. fn: function (aPackage){
  315. var self=this;
  316. return smalltalk.withContext(function($ctx1) {
  317. self["@package"]=aPackage;
  318. return self}, function($ctx1) {$ctx1.fill(self,"package:",{aPackage:aPackage},smalltalk.PackageAnnouncement)})},
  319. messageSends: []}),
  320. smalltalk.PackageAnnouncement);
  321. smalltalk.addClass('PackageAdded', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  322. smalltalk.addClass('PackageRemoved', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  323. smalltalk.addClass('ProtocolAnnouncement', smalltalk.SystemAnnouncement, ['theClass', 'protocol'], 'Kernel-Announcements');
  324. smalltalk.addMethod(
  325. smalltalk.method({
  326. selector: "protocol",
  327. fn: function (){
  328. var self=this;
  329. return smalltalk.withContext(function($ctx1) {
  330. var $1;
  331. $1=self["@protocol"];
  332. return $1;
  333. }, function($ctx1) {$ctx1.fill(self,"protocol",{},smalltalk.ProtocolAnnouncement)})},
  334. messageSends: []}),
  335. smalltalk.ProtocolAnnouncement);
  336. smalltalk.addMethod(
  337. smalltalk.method({
  338. selector: "protocol:",
  339. fn: function (aString){
  340. var self=this;
  341. return smalltalk.withContext(function($ctx1) {
  342. self["@protocol"]=aString;
  343. return self}, function($ctx1) {$ctx1.fill(self,"protocol:",{aString:aString},smalltalk.ProtocolAnnouncement)})},
  344. messageSends: []}),
  345. smalltalk.ProtocolAnnouncement);
  346. smalltalk.addMethod(
  347. smalltalk.method({
  348. selector: "theClass",
  349. fn: function (){
  350. var self=this;
  351. return smalltalk.withContext(function($ctx1) {
  352. var $1;
  353. $1=self["@theClass"];
  354. return $1;
  355. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ProtocolAnnouncement)})},
  356. messageSends: []}),
  357. smalltalk.ProtocolAnnouncement);
  358. smalltalk.addMethod(
  359. smalltalk.method({
  360. selector: "theClass:",
  361. fn: function (aClass){
  362. var self=this;
  363. return smalltalk.withContext(function($ctx1) {
  364. self["@theClass"]=aClass;
  365. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ProtocolAnnouncement)})},
  366. messageSends: []}),
  367. smalltalk.ProtocolAnnouncement);
  368. smalltalk.addClass('ProtocolAdded', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');
  369. smalltalk.addClass('ProtocolRemoved', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');