Kernel-Announcements.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633
  1. smalltalk.addPackage('Kernel-Announcements');
  2. smalltalk.addClass('AnnouncementSubscription', smalltalk.Object, ['block', 'announcementClass'], 'Kernel-Announcements');
  3. smalltalk.AnnouncementSubscription.comment="The subscription is a single entry in a subscription registry of an `Announcer`.\x0aSeveral subscriptions by the same object is possible."
  4. smalltalk.addMethod(
  5. smalltalk.method({
  6. selector: "announcementClass",
  7. category: 'accessing',
  8. fn: function (){
  9. var self=this;
  10. return smalltalk.withContext(function($ctx1) {
  11. var $1;
  12. $1=self["@announcementClass"];
  13. return $1;
  14. }, function($ctx1) {$ctx1.fill(self,"announcementClass",{},smalltalk.AnnouncementSubscription)})},
  15. args: [],
  16. source: "announcementClass\x0a\x09^ announcementClass",
  17. messageSends: [],
  18. referencedClasses: []
  19. }),
  20. smalltalk.AnnouncementSubscription);
  21. smalltalk.addMethod(
  22. smalltalk.method({
  23. selector: "announcementClass:",
  24. category: 'accessing',
  25. fn: function (aClass){
  26. var self=this;
  27. return smalltalk.withContext(function($ctx1) {
  28. self["@announcementClass"]=aClass;
  29. return self}, function($ctx1) {$ctx1.fill(self,"announcementClass:",{aClass:aClass},smalltalk.AnnouncementSubscription)})},
  30. args: ["aClass"],
  31. source: "announcementClass: aClass\x0a\x09announcementClass := aClass",
  32. messageSends: [],
  33. referencedClasses: []
  34. }),
  35. smalltalk.AnnouncementSubscription);
  36. smalltalk.addMethod(
  37. smalltalk.method({
  38. selector: "block",
  39. category: 'accessing',
  40. fn: function (){
  41. var self=this;
  42. return smalltalk.withContext(function($ctx1) {
  43. var $1;
  44. $1=self["@block"];
  45. return $1;
  46. }, function($ctx1) {$ctx1.fill(self,"block",{},smalltalk.AnnouncementSubscription)})},
  47. args: [],
  48. source: "block\x0a\x09^block",
  49. messageSends: [],
  50. referencedClasses: []
  51. }),
  52. smalltalk.AnnouncementSubscription);
  53. smalltalk.addMethod(
  54. smalltalk.method({
  55. selector: "block:",
  56. category: 'accessing',
  57. fn: function (aBlock){
  58. var self=this;
  59. return smalltalk.withContext(function($ctx1) {
  60. self["@block"]=aBlock;
  61. return self}, function($ctx1) {$ctx1.fill(self,"block:",{aBlock:aBlock},smalltalk.AnnouncementSubscription)})},
  62. args: ["aBlock"],
  63. source: "block: aBlock\x0a\x09block := aBlock",
  64. messageSends: [],
  65. referencedClasses: []
  66. }),
  67. smalltalk.AnnouncementSubscription);
  68. smalltalk.addMethod(
  69. smalltalk.method({
  70. selector: "deliver:",
  71. category: 'announcing',
  72. fn: function (anAnnouncement){
  73. var self=this;
  74. return smalltalk.withContext(function($ctx1) {
  75. var $1;
  76. $1=_st(self)._handlesAnnouncement_(anAnnouncement);
  77. if(smalltalk.assert($1)){
  78. _st(_st(self)._block())._value_(anAnnouncement);
  79. };
  80. return self}, function($ctx1) {$ctx1.fill(self,"deliver:",{anAnnouncement:anAnnouncement},smalltalk.AnnouncementSubscription)})},
  81. args: ["anAnnouncement"],
  82. source: "deliver: anAnnouncement\x0a\x09(self handlesAnnouncement: anAnnouncement)\x0a\x09\x09ifTrue: [self block value: anAnnouncement]",
  83. messageSends: ["ifTrue:", "value:", "block", "handlesAnnouncement:"],
  84. referencedClasses: []
  85. }),
  86. smalltalk.AnnouncementSubscription);
  87. smalltalk.addMethod(
  88. smalltalk.method({
  89. selector: "handlesAnnouncement:",
  90. category: 'announcing',
  91. fn: function (anAnnouncement){
  92. var self=this;
  93. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  94. return smalltalk.withContext(function($ctx1) {
  95. var $2,$1;
  96. $2=_st(_st($Smalltalk())._current())._at_(_st(_st(self)._announcementClass())._name());
  97. if(($receiver = $2) == nil || $receiver == undefined){
  98. return false;
  99. } else {
  100. var class_;
  101. class_=$receiver;
  102. $1=_st(class_)._includesBehavior_(_st(_st($Smalltalk())._current())._at_(_st(_st(_st(anAnnouncement)._class())._theNonMetaClass())._name()));
  103. };
  104. return $1;
  105. }, function($ctx1) {$ctx1.fill(self,"handlesAnnouncement:",{anAnnouncement:anAnnouncement},smalltalk.AnnouncementSubscription)})},
  106. args: ["anAnnouncement"],
  107. source: "handlesAnnouncement: anAnnouncement\x0a\x09\x22anAnnouncement might be announced from within another Amber environment\x22\x0a\x09\x0a\x09^ (Smalltalk current at: self announcementClass name)\x0a\x09\x09ifNil: [ ^ false ]\x0a\x09\x09ifNotNil: [ :class |\x0a\x09\x09class includesBehavior: (Smalltalk current at: anAnnouncement class theNonMetaClass name) ]",
  108. messageSends: ["ifNil:ifNotNil:", "includesBehavior:", "at:", "name", "theNonMetaClass", "class", "current", "announcementClass"],
  109. referencedClasses: ["Smalltalk"]
  110. }),
  111. smalltalk.AnnouncementSubscription);
  112. smalltalk.addClass('Announcer', smalltalk.Object, ['registry', 'subscriptions'], 'Kernel-Announcements');
  113. smalltalk.Announcer.comment="The code is based on the announcements as [described by Vassili Bykov](http://www.cincomsmalltalk.com/userblogs/vbykov/blogView?searchCategory=Announcements%20Framework).\x0aThe Announcer holds annoncement subscriptions (`AnnouncementSubscription`) in a private registry.\x0a\x0aUse `#on:do:` to register subscriptions."
  114. smalltalk.addMethod(
  115. smalltalk.method({
  116. selector: "announce:",
  117. category: 'announcing',
  118. fn: function (anAnnouncement){
  119. var self=this;
  120. return smalltalk.withContext(function($ctx1) {
  121. _st(self["@subscriptions"])._do_((function(each){
  122. return smalltalk.withContext(function($ctx2) {
  123. return _st(each)._deliver_(anAnnouncement);
  124. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  125. return self}, function($ctx1) {$ctx1.fill(self,"announce:",{anAnnouncement:anAnnouncement},smalltalk.Announcer)})},
  126. args: ["anAnnouncement"],
  127. source: "announce: anAnnouncement\x0a\x09subscriptions do: [:each |\x0a\x09\x09each deliver: anAnnouncement]",
  128. messageSends: ["do:", "deliver:"],
  129. referencedClasses: []
  130. }),
  131. smalltalk.Announcer);
  132. smalltalk.addMethod(
  133. smalltalk.method({
  134. selector: "initialize",
  135. category: 'initialization',
  136. fn: function (){
  137. var self=this;
  138. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  139. return smalltalk.withContext(function($ctx1) {
  140. smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  141. self["@subscriptions"]=_st($Array())._new();
  142. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Announcer)})},
  143. args: [],
  144. source: "initialize\x0a\x09super initialize.\x0a\x09subscriptions := Array new",
  145. messageSends: ["initialize", "new"],
  146. referencedClasses: ["Array"]
  147. }),
  148. smalltalk.Announcer);
  149. smalltalk.addMethod(
  150. smalltalk.method({
  151. selector: "on:do:",
  152. category: 'subscribing',
  153. fn: function (aClass,aBlock){
  154. var self=this;
  155. function $AnnouncementSubscription(){return smalltalk.AnnouncementSubscription||(typeof AnnouncementSubscription=="undefined"?nil:AnnouncementSubscription)}
  156. return smalltalk.withContext(function($ctx1) {
  157. var $1,$2;
  158. $1=_st($AnnouncementSubscription())._new();
  159. _st($1)._block_(aBlock);
  160. _st($1)._announcementClass_(aClass);
  161. $2=_st($1)._yourself();
  162. _st(self["@subscriptions"])._add_($2);
  163. return self}, function($ctx1) {$ctx1.fill(self,"on:do:",{aClass:aClass,aBlock:aBlock},smalltalk.Announcer)})},
  164. args: ["aClass", "aBlock"],
  165. source: "on: aClass do: aBlock\x0a\x09subscriptions add: (AnnouncementSubscription new\x0a\x09\x09block: aBlock;\x0a\x09\x09announcementClass: aClass;\x0a\x09\x09yourself)",
  166. messageSends: ["add:", "block:", "new", "announcementClass:", "yourself"],
  167. referencedClasses: ["AnnouncementSubscription"]
  168. }),
  169. smalltalk.Announcer);
  170. smalltalk.addClass('SystemAnnouncer', smalltalk.Announcer, [], 'Kernel-Announcements');
  171. smalltalk.SystemAnnouncer.comment="My unique instance #current is the global announcer handling all Amber system-related announces"
  172. smalltalk.SystemAnnouncer.klass.iVarNames = ['current'];
  173. smalltalk.addMethod(
  174. smalltalk.method({
  175. selector: "current",
  176. category: 'accessing',
  177. fn: function (){
  178. var self=this;
  179. return smalltalk.withContext(function($ctx1) {
  180. var $2,$1;
  181. $2=self["@current"];
  182. if(($receiver = $2) == nil || $receiver == undefined){
  183. self["@current"]=smalltalk.Announcer.klass.fn.prototype._new.apply(_st(self), []);
  184. $1=self["@current"];
  185. } else {
  186. $1=$2;
  187. };
  188. return $1;
  189. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.SystemAnnouncer.klass)})},
  190. args: [],
  191. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  192. messageSends: ["ifNil:", "new"],
  193. referencedClasses: []
  194. }),
  195. smalltalk.SystemAnnouncer.klass);
  196. smalltalk.addMethod(
  197. smalltalk.method({
  198. selector: "new",
  199. category: 'instance creation',
  200. fn: function (){
  201. var self=this;
  202. return smalltalk.withContext(function($ctx1) {
  203. _st(self)._shouldNotImplement();
  204. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.SystemAnnouncer.klass)})},
  205. args: [],
  206. source: "new\x0a\x09self shouldNotImplement",
  207. messageSends: ["shouldNotImplement"],
  208. referencedClasses: []
  209. }),
  210. smalltalk.SystemAnnouncer.klass);
  211. smalltalk.addClass('SystemAnnouncement', smalltalk.Object, ['theClass'], 'Kernel-Announcements');
  212. smalltalk.SystemAnnouncement.comment="I am the superclass of all system announcements"
  213. smalltalk.addMethod(
  214. smalltalk.method({
  215. selector: "theClass",
  216. category: 'accessing',
  217. fn: function (){
  218. var self=this;
  219. return smalltalk.withContext(function($ctx1) {
  220. var $1;
  221. $1=self["@theClass"];
  222. return $1;
  223. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.SystemAnnouncement)})},
  224. args: [],
  225. source: "theClass\x0a\x09^ theClass",
  226. messageSends: [],
  227. referencedClasses: []
  228. }),
  229. smalltalk.SystemAnnouncement);
  230. smalltalk.addMethod(
  231. smalltalk.method({
  232. selector: "theClass:",
  233. category: 'accessing',
  234. fn: function (aClass){
  235. var self=this;
  236. return smalltalk.withContext(function($ctx1) {
  237. self["@theClass"]=aClass;
  238. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.SystemAnnouncement)})},
  239. args: ["aClass"],
  240. source: "theClass: aClass\x0a\x09theClass := aClass",
  241. messageSends: [],
  242. referencedClasses: []
  243. }),
  244. smalltalk.SystemAnnouncement);
  245. smalltalk.addClass('ClassAnnouncement', smalltalk.SystemAnnouncement, ['theClass'], 'Kernel-Announcements');
  246. smalltalk.addMethod(
  247. smalltalk.method({
  248. selector: "theClass",
  249. category: 'accessing',
  250. fn: function (){
  251. var self=this;
  252. return smalltalk.withContext(function($ctx1) {
  253. var $1;
  254. $1=self["@theClass"];
  255. return $1;
  256. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassAnnouncement)})},
  257. args: [],
  258. source: "theClass\x0a\x09^ theClass",
  259. messageSends: [],
  260. referencedClasses: []
  261. }),
  262. smalltalk.ClassAnnouncement);
  263. smalltalk.addMethod(
  264. smalltalk.method({
  265. selector: "theClass:",
  266. category: 'accessing',
  267. fn: function (aClass){
  268. var self=this;
  269. return smalltalk.withContext(function($ctx1) {
  270. self["@theClass"]=aClass;
  271. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ClassAnnouncement)})},
  272. args: ["aClass"],
  273. source: "theClass: aClass\x0a\x09theClass := aClass",
  274. messageSends: [],
  275. referencedClasses: []
  276. }),
  277. smalltalk.ClassAnnouncement);
  278. smalltalk.addClass('ClassAdded', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  279. smalltalk.ClassAdded.comment="I am emitted when a class is added to the system.\x0aSee ClassBuilder >> #addSubclassOf:... methods"
  280. smalltalk.addClass('ClassCommentChanged', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  281. smalltalk.ClassCommentChanged.comment="I am emitted when the comment of a class changes. (Behavior >> #comment)"
  282. smalltalk.addClass('ClassDefinitionChanged', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  283. smalltalk.ClassDefinitionChanged.comment="I am emitted when the defintion of a class changes.\x0aSee ClassBuilder >> #class:instanceVariableNames:"
  284. smalltalk.addClass('ClassMigrated', smalltalk.ClassAnnouncement, ['oldClass'], 'Kernel-Announcements');
  285. smalltalk.addMethod(
  286. smalltalk.method({
  287. selector: "oldClass",
  288. category: 'accessing',
  289. fn: function (){
  290. var self=this;
  291. return smalltalk.withContext(function($ctx1) {
  292. var $1;
  293. $1=self["@oldClass"];
  294. return $1;
  295. }, function($ctx1) {$ctx1.fill(self,"oldClass",{},smalltalk.ClassMigrated)})},
  296. args: [],
  297. source: "oldClass\x0a\x09^ oldClass",
  298. messageSends: [],
  299. referencedClasses: []
  300. }),
  301. smalltalk.ClassMigrated);
  302. smalltalk.addMethod(
  303. smalltalk.method({
  304. selector: "oldClass:",
  305. category: 'accessing',
  306. fn: function (aClass){
  307. var self=this;
  308. return smalltalk.withContext(function($ctx1) {
  309. self["@oldClass"]=aClass;
  310. return self}, function($ctx1) {$ctx1.fill(self,"oldClass:",{aClass:aClass},smalltalk.ClassMigrated)})},
  311. args: ["aClass"],
  312. source: "oldClass: aClass\x0a\x09oldClass := aClass",
  313. messageSends: [],
  314. referencedClasses: []
  315. }),
  316. smalltalk.ClassMigrated);
  317. smalltalk.addClass('ClassMoved', smalltalk.ClassAnnouncement, ['oldPackage'], 'Kernel-Announcements');
  318. smalltalk.addMethod(
  319. smalltalk.method({
  320. selector: "oldPackage",
  321. category: 'accessing',
  322. fn: function (){
  323. var self=this;
  324. return smalltalk.withContext(function($ctx1) {
  325. var $1;
  326. $1=self["@oldPackage"];
  327. return $1;
  328. }, function($ctx1) {$ctx1.fill(self,"oldPackage",{},smalltalk.ClassMoved)})},
  329. args: [],
  330. source: "oldPackage\x0a\x09^ oldPackage",
  331. messageSends: [],
  332. referencedClasses: []
  333. }),
  334. smalltalk.ClassMoved);
  335. smalltalk.addMethod(
  336. smalltalk.method({
  337. selector: "oldPackage:",
  338. category: 'accessing',
  339. fn: function (aPackage){
  340. var self=this;
  341. return smalltalk.withContext(function($ctx1) {
  342. self["@oldPackage"]=aPackage;
  343. return self}, function($ctx1) {$ctx1.fill(self,"oldPackage:",{aPackage:aPackage},smalltalk.ClassMoved)})},
  344. args: ["aPackage"],
  345. source: "oldPackage: aPackage\x0a\x09oldPackage := aPackage",
  346. messageSends: [],
  347. referencedClasses: []
  348. }),
  349. smalltalk.ClassMoved);
  350. smalltalk.addClass('ClassRemoved', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  351. smalltalk.ClassRemoved.comment="I am emitted when a class is removed.\x0aSee Smalltalk >> #removeClass:"
  352. smalltalk.addClass('ClassRenamed', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  353. smalltalk.ClassRenamed.comment="I am emitted when a class is renamed.\x0aSee ClassBuilder >> #renameClass:to:"
  354. smalltalk.addClass('MethodAnnouncement', smalltalk.SystemAnnouncement, ['method'], 'Kernel-Announcements');
  355. smalltalk.addMethod(
  356. smalltalk.method({
  357. selector: "method",
  358. category: 'accessing',
  359. fn: function (){
  360. var self=this;
  361. return smalltalk.withContext(function($ctx1) {
  362. var $1;
  363. $1=self["@method"];
  364. return $1;
  365. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.MethodAnnouncement)})},
  366. args: [],
  367. source: "method\x0a\x09^ method",
  368. messageSends: [],
  369. referencedClasses: []
  370. }),
  371. smalltalk.MethodAnnouncement);
  372. smalltalk.addMethod(
  373. smalltalk.method({
  374. selector: "method:",
  375. category: 'accessing',
  376. fn: function (aCompiledMethod){
  377. var self=this;
  378. return smalltalk.withContext(function($ctx1) {
  379. self["@method"]=aCompiledMethod;
  380. return self}, function($ctx1) {$ctx1.fill(self,"method:",{aCompiledMethod:aCompiledMethod},smalltalk.MethodAnnouncement)})},
  381. args: ["aCompiledMethod"],
  382. source: "method: aCompiledMethod\x0a\x09method := aCompiledMethod",
  383. messageSends: [],
  384. referencedClasses: []
  385. }),
  386. smalltalk.MethodAnnouncement);
  387. smalltalk.addClass('MethodAdded', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  388. smalltalk.addClass('MethodModified', smalltalk.MethodAnnouncement, ['oldMethod'], 'Kernel-Announcements');
  389. smalltalk.addMethod(
  390. smalltalk.method({
  391. selector: "oldMethod",
  392. category: 'accessing',
  393. fn: function (){
  394. var self=this;
  395. return smalltalk.withContext(function($ctx1) {
  396. var $1;
  397. $1=self["@oldMethod"];
  398. return $1;
  399. }, function($ctx1) {$ctx1.fill(self,"oldMethod",{},smalltalk.MethodModified)})},
  400. args: [],
  401. source: "oldMethod\x0a\x09^ oldMethod",
  402. messageSends: [],
  403. referencedClasses: []
  404. }),
  405. smalltalk.MethodModified);
  406. smalltalk.addMethod(
  407. smalltalk.method({
  408. selector: "oldMethod:",
  409. category: 'accessing',
  410. fn: function (aMethod){
  411. var self=this;
  412. return smalltalk.withContext(function($ctx1) {
  413. self["@oldMethod"]=aMethod;
  414. return self}, function($ctx1) {$ctx1.fill(self,"oldMethod:",{aMethod:aMethod},smalltalk.MethodModified)})},
  415. args: ["aMethod"],
  416. source: "oldMethod: aMethod\x0a\x09oldMethod := aMethod",
  417. messageSends: [],
  418. referencedClasses: []
  419. }),
  420. smalltalk.MethodModified);
  421. smalltalk.addClass('MethodMoved', smalltalk.MethodAnnouncement, ['oldProtocol'], 'Kernel-Announcements');
  422. smalltalk.addMethod(
  423. smalltalk.method({
  424. selector: "oldProtocol",
  425. category: 'accessing',
  426. fn: function (){
  427. var self=this;
  428. return smalltalk.withContext(function($ctx1) {
  429. var $1;
  430. $1=self["@oldProtocol"];
  431. return $1;
  432. }, function($ctx1) {$ctx1.fill(self,"oldProtocol",{},smalltalk.MethodMoved)})},
  433. args: [],
  434. source: "oldProtocol\x0a\x09^ oldProtocol",
  435. messageSends: [],
  436. referencedClasses: []
  437. }),
  438. smalltalk.MethodMoved);
  439. smalltalk.addMethod(
  440. smalltalk.method({
  441. selector: "oldProtocol:",
  442. category: 'accessing',
  443. fn: function (aString){
  444. var self=this;
  445. return smalltalk.withContext(function($ctx1) {
  446. self["@oldProtocol"]=aString;
  447. return self}, function($ctx1) {$ctx1.fill(self,"oldProtocol:",{aString:aString},smalltalk.MethodMoved)})},
  448. args: ["aString"],
  449. source: "oldProtocol: aString\x0a\x09oldProtocol := aString",
  450. messageSends: [],
  451. referencedClasses: []
  452. }),
  453. smalltalk.MethodMoved);
  454. smalltalk.addClass('MethodRemoved', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  455. smalltalk.addClass('PackageAnnouncement', smalltalk.SystemAnnouncement, ['package'], 'Kernel-Announcements');
  456. smalltalk.addMethod(
  457. smalltalk.method({
  458. selector: "package",
  459. category: 'accessing',
  460. fn: function (){
  461. var self=this;
  462. return smalltalk.withContext(function($ctx1) {
  463. var $1;
  464. $1=self["@package"];
  465. return $1;
  466. }, function($ctx1) {$ctx1.fill(self,"package",{},smalltalk.PackageAnnouncement)})},
  467. args: [],
  468. source: "package\x0a\x09^ package",
  469. messageSends: [],
  470. referencedClasses: []
  471. }),
  472. smalltalk.PackageAnnouncement);
  473. smalltalk.addMethod(
  474. smalltalk.method({
  475. selector: "package:",
  476. category: 'accessing',
  477. fn: function (aPackage){
  478. var self=this;
  479. return smalltalk.withContext(function($ctx1) {
  480. self["@package"]=aPackage;
  481. return self}, function($ctx1) {$ctx1.fill(self,"package:",{aPackage:aPackage},smalltalk.PackageAnnouncement)})},
  482. args: ["aPackage"],
  483. source: "package: aPackage\x0a\x09package := aPackage",
  484. messageSends: [],
  485. referencedClasses: []
  486. }),
  487. smalltalk.PackageAnnouncement);
  488. smalltalk.addClass('PackageAdded', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  489. smalltalk.addClass('PackageRemoved', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  490. smalltalk.addClass('ProtocolAnnouncement', smalltalk.SystemAnnouncement, ['theClass', 'protocol'], 'Kernel-Announcements');
  491. smalltalk.addMethod(
  492. smalltalk.method({
  493. selector: "protocol",
  494. category: 'accessing',
  495. fn: function (){
  496. var self=this;
  497. return smalltalk.withContext(function($ctx1) {
  498. var $1;
  499. $1=self["@protocol"];
  500. return $1;
  501. }, function($ctx1) {$ctx1.fill(self,"protocol",{},smalltalk.ProtocolAnnouncement)})},
  502. args: [],
  503. source: "protocol\x0a\x09^ protocol",
  504. messageSends: [],
  505. referencedClasses: []
  506. }),
  507. smalltalk.ProtocolAnnouncement);
  508. smalltalk.addMethod(
  509. smalltalk.method({
  510. selector: "protocol:",
  511. category: 'accessing',
  512. fn: function (aString){
  513. var self=this;
  514. return smalltalk.withContext(function($ctx1) {
  515. self["@protocol"]=aString;
  516. return self}, function($ctx1) {$ctx1.fill(self,"protocol:",{aString:aString},smalltalk.ProtocolAnnouncement)})},
  517. args: ["aString"],
  518. source: "protocol: aString\x0a\x09protocol := aString",
  519. messageSends: [],
  520. referencedClasses: []
  521. }),
  522. smalltalk.ProtocolAnnouncement);
  523. smalltalk.addMethod(
  524. smalltalk.method({
  525. selector: "theClass",
  526. category: 'accessing',
  527. fn: function (){
  528. var self=this;
  529. return smalltalk.withContext(function($ctx1) {
  530. var $1;
  531. $1=self["@theClass"];
  532. return $1;
  533. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ProtocolAnnouncement)})},
  534. args: [],
  535. source: "theClass\x0a\x09^ theClass",
  536. messageSends: [],
  537. referencedClasses: []
  538. }),
  539. smalltalk.ProtocolAnnouncement);
  540. smalltalk.addMethod(
  541. smalltalk.method({
  542. selector: "theClass:",
  543. category: 'accessing',
  544. fn: function (aClass){
  545. var self=this;
  546. return smalltalk.withContext(function($ctx1) {
  547. self["@theClass"]=aClass;
  548. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ProtocolAnnouncement)})},
  549. args: ["aClass"],
  550. source: "theClass: aClass\x0a\x09theClass := aClass",
  551. messageSends: [],
  552. referencedClasses: []
  553. }),
  554. smalltalk.ProtocolAnnouncement);
  555. smalltalk.addClass('ProtocolAdded', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');
  556. smalltalk.addClass('ProtocolRemoved', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');