1
0

Helios-SUnit.js 100 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139
  1. define(["amber/boot", "require", "helios/Helios-Core"], function($boot,requirejs){"use strict";
  2. var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  3. var $pkg = $core.addPackage("Helios-SUnit");
  4. $pkg.innerEval = function (expr) { return eval(expr); };
  5. $pkg.transport = {"type":"amd","amdNamespace":"helios"};
  6. $core.addClass("HLMultiSelectToolListWidget", $globals.HLToolListWidget, [], "Helios-SUnit");
  7. //>>excludeStart("ide", pragmas.excludeIdeData);
  8. $globals.HLMultiSelectToolListWidget.comment="This is a list that handles multiple selection";
  9. //>>excludeEnd("ide");
  10. $core.addMethod(
  11. $core.method({
  12. selector: "activeItemCssClass",
  13. protocol: "accessing",
  14. fn: function (){
  15. var self=this,$self=this;
  16. return "selector";
  17. },
  18. //>>excludeStart("ide", pragmas.excludeIdeData);
  19. args: [],
  20. source: "activeItemCssClass\x0a\x09^'selector'",
  21. referencedClasses: [],
  22. //>>excludeEnd("ide");
  23. pragmas: [],
  24. messageSends: []
  25. }),
  26. $globals.HLMultiSelectToolListWidget);
  27. $core.addMethod(
  28. $core.method({
  29. selector: "isSelected:",
  30. protocol: "testing",
  31. fn: function (anObject){
  32. var self=this,$self=this;
  33. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  34. return $core.withContext(function($ctx1) {
  35. //>>excludeEnd("ctx");
  36. $self._subclassResponsibility();
  37. return self;
  38. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  39. }, function($ctx1) {$ctx1.fill(self,"isSelected:",{anObject:anObject})});
  40. //>>excludeEnd("ctx");
  41. },
  42. //>>excludeStart("ide", pragmas.excludeIdeData);
  43. args: ["anObject"],
  44. source: "isSelected: anObject\x0a\x09self subclassResponsibility",
  45. referencedClasses: [],
  46. //>>excludeEnd("ide");
  47. pragmas: [],
  48. messageSends: ["subclassResponsibility"]
  49. }),
  50. $globals.HLMultiSelectToolListWidget);
  51. $core.addMethod(
  52. $core.method({
  53. selector: "listCssClass",
  54. protocol: "accessing",
  55. fn: function (){
  56. var self=this,$self=this;
  57. return "nav nav-multiselect nav-pills nav-stacked";
  58. },
  59. //>>excludeStart("ide", pragmas.excludeIdeData);
  60. args: [],
  61. source: "listCssClass \x0a\x09^'nav nav-multiselect nav-pills nav-stacked'",
  62. referencedClasses: [],
  63. //>>excludeEnd("ide");
  64. pragmas: [],
  65. messageSends: []
  66. }),
  67. $globals.HLMultiSelectToolListWidget);
  68. $core.addMethod(
  69. $core.method({
  70. selector: "listCssClassForItem:",
  71. protocol: "accessing",
  72. fn: function (anObject){
  73. var self=this,$self=this;
  74. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  75. return $core.withContext(function($ctx1) {
  76. //>>excludeEnd("ctx");
  77. var $1,$3,$2;
  78. $1=(
  79. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  80. $ctx1.supercall = true,
  81. //>>excludeEnd("ctx");
  82. ($globals.HLMultiSelectToolListWidget.superclass||$boot.nilAsClass).fn.prototype._listCssClassForItem_.apply($self, [anObject]));
  83. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  84. $ctx1.supercall = false;
  85. //>>excludeEnd("ctx");;
  86. $3=$self._isSelected_(anObject);
  87. if($core.assert($3)){
  88. $2=" active";
  89. } else {
  90. $2="";
  91. }
  92. return $recv($1).__comma($2);
  93. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  94. }, function($ctx1) {$ctx1.fill(self,"listCssClassForItem:",{anObject:anObject})});
  95. //>>excludeEnd("ctx");
  96. },
  97. //>>excludeStart("ide", pragmas.excludeIdeData);
  98. args: ["anObject"],
  99. source: "listCssClassForItem: anObject\x0a\x09^(super listCssClassForItem: anObject), ((self isSelected: anObject)\x0a\x09\x09ifTrue: [' active']\x0a\x09\x09ifFalse: ['']).",
  100. referencedClasses: [],
  101. //>>excludeEnd("ide");
  102. pragmas: [],
  103. messageSends: [",", "listCssClassForItem:", "ifTrue:ifFalse:", "isSelected:"]
  104. }),
  105. $globals.HLMultiSelectToolListWidget);
  106. $core.addMethod(
  107. $core.method({
  108. selector: "reselectItem:",
  109. protocol: "rendering",
  110. fn: function (anObject){
  111. var self=this,$self=this;
  112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  113. return $core.withContext(function($ctx1) {
  114. //>>excludeEnd("ctx");
  115. var $receiver;
  116. if(($receiver = anObject) == null || $receiver.a$nil){
  117. return self;
  118. } else {
  119. anObject;
  120. }
  121. $self._toggleSelection_(anObject);
  122. return self;
  123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  124. }, function($ctx1) {$ctx1.fill(self,"reselectItem:",{anObject:anObject})});
  125. //>>excludeEnd("ctx");
  126. },
  127. //>>excludeStart("ide", pragmas.excludeIdeData);
  128. args: ["anObject"],
  129. source: "reselectItem: anObject\x0a\x09anObject ifNil: [^self].\x0a\x09self toggleSelection: anObject",
  130. referencedClasses: [],
  131. //>>excludeEnd("ide");
  132. pragmas: [],
  133. messageSends: ["ifNil:", "toggleSelection:"]
  134. }),
  135. $globals.HLMultiSelectToolListWidget);
  136. $core.addMethod(
  137. $core.method({
  138. selector: "select:",
  139. protocol: "actions",
  140. fn: function (anObject){
  141. var self=this,$self=this;
  142. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  143. return $core.withContext(function($ctx1) {
  144. //>>excludeEnd("ctx");
  145. $self._subclassResponsibility();
  146. return self;
  147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  148. }, function($ctx1) {$ctx1.fill(self,"select:",{anObject:anObject})});
  149. //>>excludeEnd("ctx");
  150. },
  151. //>>excludeStart("ide", pragmas.excludeIdeData);
  152. args: ["anObject"],
  153. source: "select: anObject\x0a\x09self subclassResponsibility",
  154. referencedClasses: [],
  155. //>>excludeEnd("ide");
  156. pragmas: [],
  157. messageSends: ["subclassResponsibility"]
  158. }),
  159. $globals.HLMultiSelectToolListWidget);
  160. $core.addMethod(
  161. $core.method({
  162. selector: "toggleListItem:",
  163. protocol: "actions",
  164. fn: function (aListItem){
  165. var self=this,$self=this;
  166. var item;
  167. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  168. return $core.withContext(function($ctx1) {
  169. //>>excludeEnd("ctx");
  170. var $1,$receiver;
  171. $1=$recv(aListItem)._get_((0));
  172. if(($receiver = $1) == null || $receiver.a$nil){
  173. return self;
  174. } else {
  175. $1;
  176. }
  177. item=$recv(aListItem)._data_("item");
  178. $self._toggleSelection_(item);
  179. return self;
  180. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  181. }, function($ctx1) {$ctx1.fill(self,"toggleListItem:",{aListItem:aListItem,item:item})});
  182. //>>excludeEnd("ctx");
  183. },
  184. //>>excludeStart("ide", pragmas.excludeIdeData);
  185. args: ["aListItem"],
  186. source: "toggleListItem: aListItem\x0a\x09| item |\x0a\x09\x0a\x09(aListItem get: 0) ifNil: [ ^ self ].\x0a\x09\x22Find item\x22\x0a\x09item := aListItem data: 'item'.\x0a\x09self toggleSelection: item",
  187. referencedClasses: [],
  188. //>>excludeEnd("ide");
  189. pragmas: [],
  190. messageSends: ["ifNil:", "get:", "data:", "toggleSelection:"]
  191. }),
  192. $globals.HLMultiSelectToolListWidget);
  193. $core.addMethod(
  194. $core.method({
  195. selector: "toggleSelection:",
  196. protocol: "actions",
  197. fn: function (anObject){
  198. var self=this,$self=this;
  199. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  200. return $core.withContext(function($ctx1) {
  201. //>>excludeEnd("ctx");
  202. var $1;
  203. $1=$self._isSelected_(anObject);
  204. if($core.assert($1)){
  205. $self._unselect_(anObject);
  206. } else {
  207. $self._select_(anObject);
  208. }
  209. return self;
  210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  211. }, function($ctx1) {$ctx1.fill(self,"toggleSelection:",{anObject:anObject})});
  212. //>>excludeEnd("ctx");
  213. },
  214. //>>excludeStart("ide", pragmas.excludeIdeData);
  215. args: ["anObject"],
  216. source: "toggleSelection: anObject\x0a\x09(self isSelected: anObject) \x0a\x09\x09ifTrue: [ self unselect: anObject ]\x0a\x09\x09ifFalse: [self select: anObject ]",
  217. referencedClasses: [],
  218. //>>excludeEnd("ide");
  219. pragmas: [],
  220. messageSends: ["ifTrue:ifFalse:", "isSelected:", "unselect:", "select:"]
  221. }),
  222. $globals.HLMultiSelectToolListWidget);
  223. $core.addMethod(
  224. $core.method({
  225. selector: "unselect:",
  226. protocol: "actions",
  227. fn: function (anObject){
  228. var self=this,$self=this;
  229. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  230. return $core.withContext(function($ctx1) {
  231. //>>excludeEnd("ctx");
  232. $self._subclassResponsibility();
  233. return self;
  234. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  235. }, function($ctx1) {$ctx1.fill(self,"unselect:",{anObject:anObject})});
  236. //>>excludeEnd("ctx");
  237. },
  238. //>>excludeStart("ide", pragmas.excludeIdeData);
  239. args: ["anObject"],
  240. source: "unselect: anObject\x0a\x09self subclassResponsibility",
  241. referencedClasses: [],
  242. //>>excludeEnd("ide");
  243. pragmas: [],
  244. messageSends: ["subclassResponsibility"]
  245. }),
  246. $globals.HLMultiSelectToolListWidget);
  247. $core.addClass("HLSUnitClassesListWidget", $globals.HLMultiSelectToolListWidget, [], "Helios-SUnit");
  248. //>>excludeStart("ide", pragmas.excludeIdeData);
  249. $globals.HLSUnitClassesListWidget.comment="I display a list of classes (subclasses of `TestCase`).";
  250. //>>excludeEnd("ide");
  251. $core.addMethod(
  252. $core.method({
  253. selector: "buttonsDivCssClass",
  254. protocol: "accessing",
  255. fn: function (){
  256. var self=this,$self=this;
  257. return "buttons_bar";
  258. },
  259. //>>excludeStart("ide", pragmas.excludeIdeData);
  260. args: [],
  261. source: "buttonsDivCssClass\x0a\x09^ 'buttons_bar'",
  262. referencedClasses: [],
  263. //>>excludeEnd("ide");
  264. pragmas: [],
  265. messageSends: []
  266. }),
  267. $globals.HLSUnitClassesListWidget);
  268. $core.addMethod(
  269. $core.method({
  270. selector: "cssClassForItem:",
  271. protocol: "accessing",
  272. fn: function (aClass){
  273. var self=this,$self=this;
  274. var nonMeta;
  275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  276. return $core.withContext(function($ctx1) {
  277. //>>excludeEnd("ctx");
  278. var $1;
  279. nonMeta=$recv(aClass)._theNonMetaClass();
  280. $1=$recv(nonMeta)._respondsTo_("classTag");
  281. if($core.assert($1)){
  282. return $recv(nonMeta)._classTag();
  283. } else {
  284. return $recv(nonMeta)._heliosClass();
  285. }
  286. return self;
  287. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  288. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{aClass:aClass,nonMeta:nonMeta})});
  289. //>>excludeEnd("ctx");
  290. },
  291. //>>excludeStart("ide", pragmas.excludeIdeData);
  292. args: ["aClass"],
  293. source: "cssClassForItem: aClass\x0a\x09| nonMeta |\x0a\x09nonMeta := aClass theNonMetaClass.\x0a\x09(nonMeta respondsTo: #classTag)\x0a\x09\x09ifTrue: [ ^ nonMeta classTag ]\x0a\x09\x09ifFalse: [ ^ nonMeta heliosClass ]",
  294. referencedClasses: [],
  295. //>>excludeEnd("ide");
  296. pragmas: [],
  297. messageSends: ["theNonMetaClass", "ifTrue:ifFalse:", "respondsTo:", "classTag", "heliosClass"]
  298. }),
  299. $globals.HLSUnitClassesListWidget);
  300. $core.addMethod(
  301. $core.method({
  302. selector: "initializeItems",
  303. protocol: "initialization",
  304. fn: function (){
  305. var self=this,$self=this;
  306. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  307. return $core.withContext(function($ctx1) {
  308. //>>excludeEnd("ctx");
  309. var $1;
  310. $self.items=$recv($self.model)._testClasses();
  311. $1=$self.items;
  312. return $1;
  313. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  314. }, function($ctx1) {$ctx1.fill(self,"initializeItems",{})});
  315. //>>excludeEnd("ctx");
  316. },
  317. //>>excludeStart("ide", pragmas.excludeIdeData);
  318. args: [],
  319. source: "initializeItems\x0a\x09^items := model testClasses",
  320. referencedClasses: [],
  321. //>>excludeEnd("ide");
  322. pragmas: [],
  323. messageSends: ["testClasses"]
  324. }),
  325. $globals.HLSUnitClassesListWidget);
  326. $core.addMethod(
  327. $core.method({
  328. selector: "isSelected:",
  329. protocol: "testing",
  330. fn: function (anObject){
  331. var self=this,$self=this;
  332. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  333. return $core.withContext(function($ctx1) {
  334. //>>excludeEnd("ctx");
  335. return $recv($recv($self.model)._selectedClasses())._includes_(anObject);
  336. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  337. }, function($ctx1) {$ctx1.fill(self,"isSelected:",{anObject:anObject})});
  338. //>>excludeEnd("ctx");
  339. },
  340. //>>excludeStart("ide", pragmas.excludeIdeData);
  341. args: ["anObject"],
  342. source: "isSelected: anObject\x0a\x09^model selectedClasses includes: anObject",
  343. referencedClasses: [],
  344. //>>excludeEnd("ide");
  345. pragmas: [],
  346. messageSends: ["includes:", "selectedClasses"]
  347. }),
  348. $globals.HLSUnitClassesListWidget);
  349. $core.addMethod(
  350. $core.method({
  351. selector: "items",
  352. protocol: "accessing",
  353. fn: function (){
  354. var self=this,$self=this;
  355. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  356. return $core.withContext(function($ctx1) {
  357. //>>excludeEnd("ctx");
  358. var $1,$receiver;
  359. $1=$self.items;
  360. if(($receiver = $1) == null || $receiver.a$nil){
  361. return $self._initializeItems();
  362. } else {
  363. return $1;
  364. }
  365. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  366. }, function($ctx1) {$ctx1.fill(self,"items",{})});
  367. //>>excludeEnd("ctx");
  368. },
  369. //>>excludeStart("ide", pragmas.excludeIdeData);
  370. args: [],
  371. source: "items\x0a\x09^ items ifNil: [ self initializeItems ]",
  372. referencedClasses: [],
  373. //>>excludeEnd("ide");
  374. pragmas: [],
  375. messageSends: ["ifNil:", "initializeItems"]
  376. }),
  377. $globals.HLSUnitClassesListWidget);
  378. $core.addMethod(
  379. $core.method({
  380. selector: "label",
  381. protocol: "accessing",
  382. fn: function (){
  383. var self=this,$self=this;
  384. return "Classes";
  385. },
  386. //>>excludeStart("ide", pragmas.excludeIdeData);
  387. args: [],
  388. source: "label\x0a\x09^ 'Classes'",
  389. referencedClasses: [],
  390. //>>excludeEnd("ide");
  391. pragmas: [],
  392. messageSends: []
  393. }),
  394. $globals.HLSUnitClassesListWidget);
  395. $core.addMethod(
  396. $core.method({
  397. selector: "observeModel",
  398. protocol: "actions",
  399. fn: function (){
  400. var self=this,$self=this;
  401. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  402. return $core.withContext(function($ctx1) {
  403. //>>excludeEnd("ctx");
  404. var $1;
  405. $1=$recv($self._model())._announcer();
  406. $recv($1)._on_send_to_($globals.HLPackageSelected,"onPackageSelected:",self);
  407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  408. $ctx1.sendIdx["on:send:to:"]=1;
  409. //>>excludeEnd("ctx");
  410. $recv($1)._on_send_to_($globals.HLPackageUnselected,"onPackageUnselected:",self);
  411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  412. $ctx1.sendIdx["on:send:to:"]=2;
  413. //>>excludeEnd("ctx");
  414. $recv($1)._on_send_to_($globals.HLClassSelected,"onClassSelected:",self);
  415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  416. $ctx1.sendIdx["on:send:to:"]=3;
  417. //>>excludeEnd("ctx");
  418. $recv($1)._on_send_to_($globals.HLClassUnselected,"onClassUnselected:",self);
  419. return self;
  420. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  421. }, function($ctx1) {$ctx1.fill(self,"observeModel",{})});
  422. //>>excludeEnd("ctx");
  423. },
  424. //>>excludeStart("ide", pragmas.excludeIdeData);
  425. args: [],
  426. source: "observeModel\x0a self model announcer \x0a\x09\x09on: HLPackageSelected\x0a\x09\x09send: #onPackageSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLPackageUnselected\x0a\x09\x09send: #onPackageUnselected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLClassSelected\x0a\x09\x09send: #onClassSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLClassUnselected\x0a\x09\x09send: #onClassUnselected:\x0a\x09\x09to: self.",
  427. referencedClasses: ["HLPackageSelected", "HLPackageUnselected", "HLClassSelected", "HLClassUnselected"],
  428. //>>excludeEnd("ide");
  429. pragmas: [],
  430. messageSends: ["on:send:to:", "announcer", "model"]
  431. }),
  432. $globals.HLSUnitClassesListWidget);
  433. $core.addMethod(
  434. $core.method({
  435. selector: "observeSystem",
  436. protocol: "actions",
  437. fn: function (){
  438. var self=this,$self=this;
  439. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  440. return $core.withContext(function($ctx1) {
  441. //>>excludeEnd("ctx");
  442. $recv($recv($self._model())._systemAnnouncer())._on_send_to_($globals.ClassAdded,"onClassAdded:",self);
  443. return self;
  444. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  445. }, function($ctx1) {$ctx1.fill(self,"observeSystem",{})});
  446. //>>excludeEnd("ctx");
  447. },
  448. //>>excludeStart("ide", pragmas.excludeIdeData);
  449. args: [],
  450. source: "observeSystem\x0a self model systemAnnouncer \x0a\x09\x09on: ClassAdded \x0a\x09\x09send: #onClassAdded:\x0a\x09\x09to: self.",
  451. referencedClasses: ["ClassAdded"],
  452. //>>excludeEnd("ide");
  453. pragmas: [],
  454. messageSends: ["on:send:to:", "systemAnnouncer", "model"]
  455. }),
  456. $globals.HLSUnitClassesListWidget);
  457. $core.addMethod(
  458. $core.method({
  459. selector: "onClassAdded:",
  460. protocol: "reactions",
  461. fn: function (anAnnouncement){
  462. var self=this,$self=this;
  463. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  464. return $core.withContext(function($ctx1) {
  465. //>>excludeEnd("ctx");
  466. var $1;
  467. $1=$recv($recv($self._model())._selectedPackages())._includes_($recv($recv(anAnnouncement)._theClass())._package());
  468. if($core.assert($1)){
  469. $self._initializeItems();
  470. $self._refresh();
  471. }
  472. return self;
  473. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  474. }, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{anAnnouncement:anAnnouncement})});
  475. //>>excludeEnd("ctx");
  476. },
  477. //>>excludeStart("ide", pragmas.excludeIdeData);
  478. args: ["anAnnouncement"],
  479. source: "onClassAdded: anAnnouncement\x09\x0a\x09(self model selectedPackages includes: anAnnouncement theClass package)\x0a\x09\x09ifTrue: [ \x0a\x09\x09\x09self \x0a\x09\x09\x09\x09initializeItems;\x0a\x09\x09\x09\x09refresh ]",
  480. referencedClasses: [],
  481. //>>excludeEnd("ide");
  482. pragmas: [],
  483. messageSends: ["ifTrue:", "includes:", "selectedPackages", "model", "package", "theClass", "initializeItems", "refresh"]
  484. }),
  485. $globals.HLSUnitClassesListWidget);
  486. $core.addMethod(
  487. $core.method({
  488. selector: "onClassSelected:",
  489. protocol: "reactions",
  490. fn: function (anAnnouncement){
  491. var self=this,$self=this;
  492. var listItem;
  493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  494. return $core.withContext(function($ctx1) {
  495. //>>excludeEnd("ctx");
  496. listItem=$self._findListItemFor_($recv(anAnnouncement)._item());
  497. $recv(listItem)._addClass_("active");
  498. return self;
  499. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  500. }, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement,listItem:listItem})});
  501. //>>excludeEnd("ctx");
  502. },
  503. //>>excludeStart("ide", pragmas.excludeIdeData);
  504. args: ["anAnnouncement"],
  505. source: "onClassSelected: anAnnouncement\x0a\x09| listItem |\x0a\x09listItem := self findListItemFor: anAnnouncement item.\x0a\x09listItem addClass: 'active'.",
  506. referencedClasses: [],
  507. //>>excludeEnd("ide");
  508. pragmas: [],
  509. messageSends: ["findListItemFor:", "item", "addClass:"]
  510. }),
  511. $globals.HLSUnitClassesListWidget);
  512. $core.addMethod(
  513. $core.method({
  514. selector: "onClassUnselected:",
  515. protocol: "reactions",
  516. fn: function (anAnnouncement){
  517. var self=this,$self=this;
  518. var listItem;
  519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  520. return $core.withContext(function($ctx1) {
  521. //>>excludeEnd("ctx");
  522. listItem=$self._findListItemFor_($recv(anAnnouncement)._item());
  523. $recv(listItem)._removeClass_("active");
  524. return self;
  525. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  526. }, function($ctx1) {$ctx1.fill(self,"onClassUnselected:",{anAnnouncement:anAnnouncement,listItem:listItem})});
  527. //>>excludeEnd("ctx");
  528. },
  529. //>>excludeStart("ide", pragmas.excludeIdeData);
  530. args: ["anAnnouncement"],
  531. source: "onClassUnselected: anAnnouncement\x0a\x09| listItem |\x0a\x09listItem := self findListItemFor: anAnnouncement item.\x0a\x09listItem removeClass: 'active'.",
  532. referencedClasses: [],
  533. //>>excludeEnd("ide");
  534. pragmas: [],
  535. messageSends: ["findListItemFor:", "item", "removeClass:"]
  536. }),
  537. $globals.HLSUnitClassesListWidget);
  538. $core.addMethod(
  539. $core.method({
  540. selector: "onPackageSelected:",
  541. protocol: "reactions",
  542. fn: function (anAnnouncement){
  543. var self=this,$self=this;
  544. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  545. return $core.withContext(function($ctx1) {
  546. //>>excludeEnd("ctx");
  547. $self._initializeItems();
  548. $self._refresh();
  549. return self;
  550. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  551. }, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{anAnnouncement:anAnnouncement})});
  552. //>>excludeEnd("ctx");
  553. },
  554. //>>excludeStart("ide", pragmas.excludeIdeData);
  555. args: ["anAnnouncement"],
  556. source: "onPackageSelected: anAnnouncement\x0a\x09self initializeItems;\x0a\x09\x09refresh",
  557. referencedClasses: [],
  558. //>>excludeEnd("ide");
  559. pragmas: [],
  560. messageSends: ["initializeItems", "refresh"]
  561. }),
  562. $globals.HLSUnitClassesListWidget);
  563. $core.addMethod(
  564. $core.method({
  565. selector: "onPackageUnselected:",
  566. protocol: "reactions",
  567. fn: function (anAnnouncement){
  568. var self=this,$self=this;
  569. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  570. return $core.withContext(function($ctx1) {
  571. //>>excludeEnd("ctx");
  572. $self._initializeItems();
  573. $self._refresh();
  574. return self;
  575. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  576. }, function($ctx1) {$ctx1.fill(self,"onPackageUnselected:",{anAnnouncement:anAnnouncement})});
  577. //>>excludeEnd("ctx");
  578. },
  579. //>>excludeStart("ide", pragmas.excludeIdeData);
  580. args: ["anAnnouncement"],
  581. source: "onPackageUnselected: anAnnouncement\x0a\x09self initializeItems;\x0a\x09\x09refresh",
  582. referencedClasses: [],
  583. //>>excludeEnd("ide");
  584. pragmas: [],
  585. messageSends: ["initializeItems", "refresh"]
  586. }),
  587. $globals.HLSUnitClassesListWidget);
  588. $core.addMethod(
  589. $core.method({
  590. selector: "renderButtonsOn:",
  591. protocol: "rendering",
  592. fn: function (html){
  593. var self=this,$self=this;
  594. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  595. return $core.withContext(function($ctx1) {
  596. //>>excludeEnd("ctx");
  597. var $1;
  598. $1=$recv(html)._button();
  599. $recv($1)._class_("button");
  600. $recv($1)._with_("Select all");
  601. $recv($1)._onClick_((function(){
  602. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  603. return $core.withContext(function($ctx2) {
  604. //>>excludeEnd("ctx");
  605. return $recv($self._model())._selectAllClasses();
  606. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  607. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  608. //>>excludeEnd("ctx");
  609. }));
  610. return self;
  611. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  612. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html})});
  613. //>>excludeEnd("ctx");
  614. },
  615. //>>excludeStart("ide", pragmas.excludeIdeData);
  616. args: ["html"],
  617. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09\x09class: 'button'; \x0a\x09\x09with: 'Select all';\x0a\x09\x09onClick: [ self model selectAllClasses ]",
  618. referencedClasses: [],
  619. //>>excludeEnd("ide");
  620. pragmas: [],
  621. messageSends: ["class:", "button", "with:", "onClick:", "selectAllClasses", "model"]
  622. }),
  623. $globals.HLSUnitClassesListWidget);
  624. $core.addMethod(
  625. $core.method({
  626. selector: "renderItemLabel:on:",
  627. protocol: "rendering",
  628. fn: function (aClass,html){
  629. var self=this,$self=this;
  630. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  631. return $core.withContext(function($ctx1) {
  632. //>>excludeEnd("ctx");
  633. $recv(html)._with_($recv(aClass)._name());
  634. return self;
  635. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  636. }, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aClass:aClass,html:html})});
  637. //>>excludeEnd("ctx");
  638. },
  639. //>>excludeStart("ide", pragmas.excludeIdeData);
  640. args: ["aClass", "html"],
  641. source: "renderItemLabel: aClass on: html\x0a\x09html with: aClass name",
  642. referencedClasses: [],
  643. //>>excludeEnd("ide");
  644. pragmas: [],
  645. messageSends: ["with:", "name"]
  646. }),
  647. $globals.HLSUnitClassesListWidget);
  648. $core.addMethod(
  649. $core.method({
  650. selector: "select:",
  651. protocol: "actions",
  652. fn: function (anObject){
  653. var self=this,$self=this;
  654. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  655. return $core.withContext(function($ctx1) {
  656. //>>excludeEnd("ctx");
  657. $recv($self.model)._selectClass_(anObject);
  658. return self;
  659. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  660. }, function($ctx1) {$ctx1.fill(self,"select:",{anObject:anObject})});
  661. //>>excludeEnd("ctx");
  662. },
  663. //>>excludeStart("ide", pragmas.excludeIdeData);
  664. args: ["anObject"],
  665. source: "select: anObject\x0a\x09model selectClass: anObject",
  666. referencedClasses: [],
  667. //>>excludeEnd("ide");
  668. pragmas: [],
  669. messageSends: ["selectClass:"]
  670. }),
  671. $globals.HLSUnitClassesListWidget);
  672. $core.addMethod(
  673. $core.method({
  674. selector: "unselect:",
  675. protocol: "actions",
  676. fn: function (anObject){
  677. var self=this,$self=this;
  678. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  679. return $core.withContext(function($ctx1) {
  680. //>>excludeEnd("ctx");
  681. $recv($self.model)._unselectClass_(anObject);
  682. return self;
  683. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  684. }, function($ctx1) {$ctx1.fill(self,"unselect:",{anObject:anObject})});
  685. //>>excludeEnd("ctx");
  686. },
  687. //>>excludeStart("ide", pragmas.excludeIdeData);
  688. args: ["anObject"],
  689. source: "unselect: anObject\x0a\x09model unselectClass: anObject",
  690. referencedClasses: [],
  691. //>>excludeEnd("ide");
  692. pragmas: [],
  693. messageSends: ["unselectClass:"]
  694. }),
  695. $globals.HLSUnitClassesListWidget);
  696. $core.addClass("HLSUnitPackagesListWidget", $globals.HLMultiSelectToolListWidget, [], "Helios-SUnit");
  697. //>>excludeStart("ide", pragmas.excludeIdeData);
  698. $globals.HLSUnitPackagesListWidget.comment="I display a list of packages for which unit tests are associated (packages containing subclasses of `TestCase`).";
  699. //>>excludeEnd("ide");
  700. $core.addMethod(
  701. $core.method({
  702. selector: "buttonsDivCssClass",
  703. protocol: "accessing",
  704. fn: function (){
  705. var self=this,$self=this;
  706. return "buttons_bar";
  707. },
  708. //>>excludeStart("ide", pragmas.excludeIdeData);
  709. args: [],
  710. source: "buttonsDivCssClass\x0a\x09^ 'buttons_bar'",
  711. referencedClasses: [],
  712. //>>excludeEnd("ide");
  713. pragmas: [],
  714. messageSends: []
  715. }),
  716. $globals.HLSUnitPackagesListWidget);
  717. $core.addMethod(
  718. $core.method({
  719. selector: "cssClassForItem:",
  720. protocol: "accessing",
  721. fn: function (anItem){
  722. var self=this,$self=this;
  723. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  724. return $core.withContext(function($ctx1) {
  725. //>>excludeEnd("ctx");
  726. var $1;
  727. $1=$recv(anItem)._isDirty();
  728. if($core.assert($1)){
  729. return "package_dirty";
  730. } else {
  731. return "package";
  732. }
  733. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  734. }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{anItem:anItem})});
  735. //>>excludeEnd("ctx");
  736. },
  737. //>>excludeStart("ide", pragmas.excludeIdeData);
  738. args: ["anItem"],
  739. source: "cssClassForItem: anItem\x09\x0a\x09^ anItem isDirty \x0a\x09\x09ifTrue: [ 'package_dirty' ]\x0a\x09\x09ifFalse: [ 'package' ]",
  740. referencedClasses: [],
  741. //>>excludeEnd("ide");
  742. pragmas: [],
  743. messageSends: ["ifTrue:ifFalse:", "isDirty"]
  744. }),
  745. $globals.HLSUnitPackagesListWidget);
  746. $core.addMethod(
  747. $core.method({
  748. selector: "initializeItems",
  749. protocol: "initialization",
  750. fn: function (){
  751. var self=this,$self=this;
  752. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  753. return $core.withContext(function($ctx1) {
  754. //>>excludeEnd("ctx");
  755. var $2,$1;
  756. $self.items=$recv($recv($self.model)._testPackages())._sort_((function(a,b){
  757. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  758. return $core.withContext(function($ctx2) {
  759. //>>excludeEnd("ctx");
  760. $2=$recv(a)._name();
  761. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  762. $ctx2.sendIdx["name"]=1;
  763. //>>excludeEnd("ctx");
  764. return $recv($2).__lt($recv(b)._name());
  765. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  766. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)});
  767. //>>excludeEnd("ctx");
  768. }));
  769. $1=$self.items;
  770. return $1;
  771. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  772. }, function($ctx1) {$ctx1.fill(self,"initializeItems",{})});
  773. //>>excludeEnd("ctx");
  774. },
  775. //>>excludeStart("ide", pragmas.excludeIdeData);
  776. args: [],
  777. source: "initializeItems\x0a\x09^items := model testPackages \x0a\x09\x09sort: [:a :b | a name < b name]",
  778. referencedClasses: [],
  779. //>>excludeEnd("ide");
  780. pragmas: [],
  781. messageSends: ["sort:", "testPackages", "<", "name"]
  782. }),
  783. $globals.HLSUnitPackagesListWidget);
  784. $core.addMethod(
  785. $core.method({
  786. selector: "isSelected:",
  787. protocol: "testing",
  788. fn: function (anObject){
  789. var self=this,$self=this;
  790. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  791. return $core.withContext(function($ctx1) {
  792. //>>excludeEnd("ctx");
  793. return $recv($recv($self.model)._selectedPackages())._includes_(anObject);
  794. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  795. }, function($ctx1) {$ctx1.fill(self,"isSelected:",{anObject:anObject})});
  796. //>>excludeEnd("ctx");
  797. },
  798. //>>excludeStart("ide", pragmas.excludeIdeData);
  799. args: ["anObject"],
  800. source: "isSelected: anObject\x0a\x09^model selectedPackages includes: anObject",
  801. referencedClasses: [],
  802. //>>excludeEnd("ide");
  803. pragmas: [],
  804. messageSends: ["includes:", "selectedPackages"]
  805. }),
  806. $globals.HLSUnitPackagesListWidget);
  807. $core.addMethod(
  808. $core.method({
  809. selector: "items",
  810. protocol: "accessing",
  811. fn: function (){
  812. var self=this,$self=this;
  813. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  814. return $core.withContext(function($ctx1) {
  815. //>>excludeEnd("ctx");
  816. var $1,$receiver;
  817. $1=$self.items;
  818. if(($receiver = $1) == null || $receiver.a$nil){
  819. return $self._initializeItems();
  820. } else {
  821. return $1;
  822. }
  823. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  824. }, function($ctx1) {$ctx1.fill(self,"items",{})});
  825. //>>excludeEnd("ctx");
  826. },
  827. //>>excludeStart("ide", pragmas.excludeIdeData);
  828. args: [],
  829. source: "items\x0a\x09^ items ifNil: [ self initializeItems ]",
  830. referencedClasses: [],
  831. //>>excludeEnd("ide");
  832. pragmas: [],
  833. messageSends: ["ifNil:", "initializeItems"]
  834. }),
  835. $globals.HLSUnitPackagesListWidget);
  836. $core.addMethod(
  837. $core.method({
  838. selector: "label",
  839. protocol: "accessing",
  840. fn: function (){
  841. var self=this,$self=this;
  842. return "Packages";
  843. },
  844. //>>excludeStart("ide", pragmas.excludeIdeData);
  845. args: [],
  846. source: "label\x0a\x09^ 'Packages'",
  847. referencedClasses: [],
  848. //>>excludeEnd("ide");
  849. pragmas: [],
  850. messageSends: []
  851. }),
  852. $globals.HLSUnitPackagesListWidget);
  853. $core.addMethod(
  854. $core.method({
  855. selector: "observeModel",
  856. protocol: "actions",
  857. fn: function (){
  858. var self=this,$self=this;
  859. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  860. return $core.withContext(function($ctx1) {
  861. //>>excludeEnd("ctx");
  862. var $1;
  863. $1=$recv($self._model())._announcer();
  864. $recv($1)._on_send_to_($globals.HLPackageSelected,"onPackageSelected:",self);
  865. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  866. $ctx1.sendIdx["on:send:to:"]=1;
  867. //>>excludeEnd("ctx");
  868. $recv($1)._on_send_to_($globals.HLPackageUnselected,"onPackageUnselected:",self);
  869. return self;
  870. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  871. }, function($ctx1) {$ctx1.fill(self,"observeModel",{})});
  872. //>>excludeEnd("ctx");
  873. },
  874. //>>excludeStart("ide", pragmas.excludeIdeData);
  875. args: [],
  876. source: "observeModel\x0a self model announcer \x0a\x09\x09on: HLPackageSelected\x0a\x09\x09send: #onPackageSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLPackageUnselected\x0a\x09\x09send: #onPackageUnselected:\x0a\x09\x09to: self",
  877. referencedClasses: ["HLPackageSelected", "HLPackageUnselected"],
  878. //>>excludeEnd("ide");
  879. pragmas: [],
  880. messageSends: ["on:send:to:", "announcer", "model"]
  881. }),
  882. $globals.HLSUnitPackagesListWidget);
  883. $core.addMethod(
  884. $core.method({
  885. selector: "observeSystem",
  886. protocol: "actions",
  887. fn: function (){
  888. var self=this,$self=this;
  889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  890. return $core.withContext(function($ctx1) {
  891. //>>excludeEnd("ctx");
  892. $recv($recv($self._model())._systemAnnouncer())._on_send_to_($globals.ClassAdded,"onClassAdded:",self);
  893. return self;
  894. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  895. }, function($ctx1) {$ctx1.fill(self,"observeSystem",{})});
  896. //>>excludeEnd("ctx");
  897. },
  898. //>>excludeStart("ide", pragmas.excludeIdeData);
  899. args: [],
  900. source: "observeSystem\x0a self model systemAnnouncer \x0a\x09\x09on: ClassAdded \x0a\x09\x09send: #onClassAdded:\x0a\x09\x09to: self.",
  901. referencedClasses: ["ClassAdded"],
  902. //>>excludeEnd("ide");
  903. pragmas: [],
  904. messageSends: ["on:send:to:", "systemAnnouncer", "model"]
  905. }),
  906. $globals.HLSUnitPackagesListWidget);
  907. $core.addMethod(
  908. $core.method({
  909. selector: "onClassAdded:",
  910. protocol: "reactions",
  911. fn: function (anAnnouncement){
  912. var self=this,$self=this;
  913. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  914. return $core.withContext(function($ctx1) {
  915. //>>excludeEnd("ctx");
  916. var $4,$6,$5,$3,$2,$1;
  917. $4=$self._items();
  918. $6=$recv(anAnnouncement)._theClass();
  919. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  920. $ctx1.sendIdx["theClass"]=1;
  921. //>>excludeEnd("ctx");
  922. $5=$recv($6)._package();
  923. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  924. $ctx1.sendIdx["package"]=1;
  925. //>>excludeEnd("ctx");
  926. $3=$recv($4)._includes_($5);
  927. $2=$recv($3)._not();
  928. $1=$recv($2)._and_((function(){
  929. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  930. return $core.withContext(function($ctx2) {
  931. //>>excludeEnd("ctx");
  932. return $recv($recv($recv(anAnnouncement)._theClass())._package())._isTestPackage();
  933. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  934. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  935. //>>excludeEnd("ctx");
  936. }));
  937. if($core.assert($1)){
  938. $self._initializeItems();
  939. $self._refresh();
  940. }
  941. return self;
  942. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  943. }, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{anAnnouncement:anAnnouncement})});
  944. //>>excludeEnd("ctx");
  945. },
  946. //>>excludeStart("ide", pragmas.excludeIdeData);
  947. args: ["anAnnouncement"],
  948. source: "onClassAdded: anAnnouncement\x0a\x09((self items includes: anAnnouncement theClass package) not and: [anAnnouncement theClass package isTestPackage])\x0a\x09\x09ifTrue: [ \x0a\x09\x09\x09self \x0a\x09\x09\x09\x09initializeItems;\x0a\x09\x09\x09\x09refresh ]",
  949. referencedClasses: [],
  950. //>>excludeEnd("ide");
  951. pragmas: [],
  952. messageSends: ["ifTrue:", "and:", "not", "includes:", "items", "package", "theClass", "isTestPackage", "initializeItems", "refresh"]
  953. }),
  954. $globals.HLSUnitPackagesListWidget);
  955. $core.addMethod(
  956. $core.method({
  957. selector: "onPackageSelected:",
  958. protocol: "reactions",
  959. fn: function (anAnnouncement){
  960. var self=this,$self=this;
  961. var listItem;
  962. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  963. return $core.withContext(function($ctx1) {
  964. //>>excludeEnd("ctx");
  965. listItem=$self._findListItemFor_($recv(anAnnouncement)._item());
  966. $recv(listItem)._addClass_("active");
  967. return self;
  968. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  969. }, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{anAnnouncement:anAnnouncement,listItem:listItem})});
  970. //>>excludeEnd("ctx");
  971. },
  972. //>>excludeStart("ide", pragmas.excludeIdeData);
  973. args: ["anAnnouncement"],
  974. source: "onPackageSelected: anAnnouncement\x0a\x09| listItem |\x0a\x09listItem := self findListItemFor: anAnnouncement item.\x0a\x09listItem addClass: 'active'.",
  975. referencedClasses: [],
  976. //>>excludeEnd("ide");
  977. pragmas: [],
  978. messageSends: ["findListItemFor:", "item", "addClass:"]
  979. }),
  980. $globals.HLSUnitPackagesListWidget);
  981. $core.addMethod(
  982. $core.method({
  983. selector: "onPackageUnselected:",
  984. protocol: "reactions",
  985. fn: function (anAnnouncement){
  986. var self=this,$self=this;
  987. var listItem;
  988. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  989. return $core.withContext(function($ctx1) {
  990. //>>excludeEnd("ctx");
  991. listItem=$self._findListItemFor_($recv(anAnnouncement)._item());
  992. $recv(listItem)._removeClass_("active");
  993. return self;
  994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  995. }, function($ctx1) {$ctx1.fill(self,"onPackageUnselected:",{anAnnouncement:anAnnouncement,listItem:listItem})});
  996. //>>excludeEnd("ctx");
  997. },
  998. //>>excludeStart("ide", pragmas.excludeIdeData);
  999. args: ["anAnnouncement"],
  1000. source: "onPackageUnselected: anAnnouncement\x0a\x09| listItem |\x0a\x09listItem := self findListItemFor: anAnnouncement item.\x0a\x09listItem removeClass: 'active'.",
  1001. referencedClasses: [],
  1002. //>>excludeEnd("ide");
  1003. pragmas: [],
  1004. messageSends: ["findListItemFor:", "item", "removeClass:"]
  1005. }),
  1006. $globals.HLSUnitPackagesListWidget);
  1007. $core.addMethod(
  1008. $core.method({
  1009. selector: "renderButtonsOn:",
  1010. protocol: "rendering",
  1011. fn: function (html){
  1012. var self=this,$self=this;
  1013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1014. return $core.withContext(function($ctx1) {
  1015. //>>excludeEnd("ctx");
  1016. var $1,$2,$3;
  1017. $1=$recv(html)._button();
  1018. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1019. $ctx1.sendIdx["button"]=1;
  1020. //>>excludeEnd("ctx");
  1021. $recv($1)._class_("button");
  1022. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1023. $ctx1.sendIdx["class:"]=1;
  1024. //>>excludeEnd("ctx");
  1025. $recv($1)._with_("Run Tests");
  1026. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1027. $ctx1.sendIdx["with:"]=1;
  1028. //>>excludeEnd("ctx");
  1029. $recv($1)._onClick_((function(){
  1030. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1031. return $core.withContext(function($ctx2) {
  1032. //>>excludeEnd("ctx");
  1033. $2=$self._model();
  1034. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1035. $ctx2.sendIdx["model"]=1;
  1036. //>>excludeEnd("ctx");
  1037. return $recv($2)._runTests();
  1038. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1039. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1040. //>>excludeEnd("ctx");
  1041. }));
  1042. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1043. $ctx1.sendIdx["onClick:"]=1;
  1044. //>>excludeEnd("ctx");
  1045. $3=$recv(html)._button();
  1046. $recv($3)._class_("button");
  1047. $recv($3)._with_("Select all");
  1048. $recv($3)._onClick_((function(){
  1049. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1050. return $core.withContext(function($ctx2) {
  1051. //>>excludeEnd("ctx");
  1052. return $recv($self._model())._selectAllPackages();
  1053. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1054. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1055. //>>excludeEnd("ctx");
  1056. }));
  1057. return self;
  1058. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1059. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html})});
  1060. //>>excludeEnd("ctx");
  1061. },
  1062. //>>excludeStart("ide", pragmas.excludeIdeData);
  1063. args: ["html"],
  1064. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09\x09class: 'button';\x0a\x09\x09with: 'Run Tests';\x0a\x09\x09onClick: [ self model runTests ].\x0a\x09html button\x0a\x09\x09class: 'button';\x0a\x09\x09with: 'Select all';\x0a\x09\x09onClick: [ self model selectAllPackages ]",
  1065. referencedClasses: [],
  1066. //>>excludeEnd("ide");
  1067. pragmas: [],
  1068. messageSends: ["class:", "button", "with:", "onClick:", "runTests", "model", "selectAllPackages"]
  1069. }),
  1070. $globals.HLSUnitPackagesListWidget);
  1071. $core.addMethod(
  1072. $core.method({
  1073. selector: "renderItemLabel:on:",
  1074. protocol: "rendering",
  1075. fn: function (aPackage,html){
  1076. var self=this,$self=this;
  1077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1078. return $core.withContext(function($ctx1) {
  1079. //>>excludeEnd("ctx");
  1080. $recv(html)._with_($recv(aPackage)._name());
  1081. return self;
  1082. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1083. }, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aPackage:aPackage,html:html})});
  1084. //>>excludeEnd("ctx");
  1085. },
  1086. //>>excludeStart("ide", pragmas.excludeIdeData);
  1087. args: ["aPackage", "html"],
  1088. source: "renderItemLabel: aPackage on: html\x0a\x09html with: aPackage name",
  1089. referencedClasses: [],
  1090. //>>excludeEnd("ide");
  1091. pragmas: [],
  1092. messageSends: ["with:", "name"]
  1093. }),
  1094. $globals.HLSUnitPackagesListWidget);
  1095. $core.addMethod(
  1096. $core.method({
  1097. selector: "select:",
  1098. protocol: "actions",
  1099. fn: function (anObject){
  1100. var self=this,$self=this;
  1101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1102. return $core.withContext(function($ctx1) {
  1103. //>>excludeEnd("ctx");
  1104. $recv($self.model)._selectPackage_(anObject);
  1105. return self;
  1106. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1107. }, function($ctx1) {$ctx1.fill(self,"select:",{anObject:anObject})});
  1108. //>>excludeEnd("ctx");
  1109. },
  1110. //>>excludeStart("ide", pragmas.excludeIdeData);
  1111. args: ["anObject"],
  1112. source: "select: anObject\x0a\x09model selectPackage: anObject",
  1113. referencedClasses: [],
  1114. //>>excludeEnd("ide");
  1115. pragmas: [],
  1116. messageSends: ["selectPackage:"]
  1117. }),
  1118. $globals.HLSUnitPackagesListWidget);
  1119. $core.addMethod(
  1120. $core.method({
  1121. selector: "unselect:",
  1122. protocol: "actions",
  1123. fn: function (anObject){
  1124. var self=this,$self=this;
  1125. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1126. return $core.withContext(function($ctx1) {
  1127. //>>excludeEnd("ctx");
  1128. $recv($self.model)._unselectPackage_(anObject);
  1129. return self;
  1130. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1131. }, function($ctx1) {$ctx1.fill(self,"unselect:",{anObject:anObject})});
  1132. //>>excludeEnd("ctx");
  1133. },
  1134. //>>excludeStart("ide", pragmas.excludeIdeData);
  1135. args: ["anObject"],
  1136. source: "unselect: anObject\x0a\x09model unselectPackage: anObject",
  1137. referencedClasses: [],
  1138. //>>excludeEnd("ide");
  1139. pragmas: [],
  1140. messageSends: ["unselectPackage:"]
  1141. }),
  1142. $globals.HLSUnitPackagesListWidget);
  1143. $core.addClass("HLSUnit", $globals.HLWidget, ["model", "packagesListWidget", "classesListWidget", "resultWidget", "failuresWidget", "errorsWidget"], "Helios-SUnit");
  1144. //>>excludeStart("ide", pragmas.excludeIdeData);
  1145. $globals.HLSUnit.comment="I am the main widget for running unit tests in Helios.\x0a\x0aI provide the ability to select set of tests to run per package, and a detailed result log with passed tests, failed tests and errors.";
  1146. //>>excludeEnd("ide");
  1147. $core.addMethod(
  1148. $core.method({
  1149. selector: "classesListWidget",
  1150. protocol: "widgets",
  1151. fn: function (){
  1152. var self=this,$self=this;
  1153. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1154. return $core.withContext(function($ctx1) {
  1155. //>>excludeEnd("ctx");
  1156. var $1,$receiver;
  1157. $1=$self.classesListWidget;
  1158. if(($receiver = $1) == null || $receiver.a$nil){
  1159. $self.classesListWidget=$recv($globals.HLSUnitClassesListWidget)._on_($self._model());
  1160. return $recv($self.classesListWidget)._next_($self._failuresWidget());
  1161. } else {
  1162. return $1;
  1163. }
  1164. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1165. }, function($ctx1) {$ctx1.fill(self,"classesListWidget",{})});
  1166. //>>excludeEnd("ctx");
  1167. },
  1168. //>>excludeStart("ide", pragmas.excludeIdeData);
  1169. args: [],
  1170. source: "classesListWidget\x0a\x09^ classesListWidget ifNil: [ \x0a\x09\x09classesListWidget := HLSUnitClassesListWidget on: self model.\x0a\x09\x09classesListWidget next: self failuresWidget ]",
  1171. referencedClasses: ["HLSUnitClassesListWidget"],
  1172. //>>excludeEnd("ide");
  1173. pragmas: [],
  1174. messageSends: ["ifNil:", "on:", "model", "next:", "failuresWidget"]
  1175. }),
  1176. $globals.HLSUnit);
  1177. $core.addMethod(
  1178. $core.method({
  1179. selector: "errorsWidget",
  1180. protocol: "widgets",
  1181. fn: function (){
  1182. var self=this,$self=this;
  1183. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1184. return $core.withContext(function($ctx1) {
  1185. //>>excludeEnd("ctx");
  1186. var $1,$receiver;
  1187. $1=$self.errorsWidget;
  1188. if(($receiver = $1) == null || $receiver.a$nil){
  1189. $self.errorsWidget=$recv($globals.HLSUnitErrorsListWidget)._on_($self._model());
  1190. return $self.errorsWidget;
  1191. } else {
  1192. return $1;
  1193. }
  1194. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1195. }, function($ctx1) {$ctx1.fill(self,"errorsWidget",{})});
  1196. //>>excludeEnd("ctx");
  1197. },
  1198. //>>excludeStart("ide", pragmas.excludeIdeData);
  1199. args: [],
  1200. source: "errorsWidget\x0a\x09^ errorsWidget ifNil: [errorsWidget := HLSUnitErrorsListWidget on: self model]",
  1201. referencedClasses: ["HLSUnitErrorsListWidget"],
  1202. //>>excludeEnd("ide");
  1203. pragmas: [],
  1204. messageSends: ["ifNil:", "on:", "model"]
  1205. }),
  1206. $globals.HLSUnit);
  1207. $core.addMethod(
  1208. $core.method({
  1209. selector: "failuresWidget",
  1210. protocol: "widgets",
  1211. fn: function (){
  1212. var self=this,$self=this;
  1213. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1214. return $core.withContext(function($ctx1) {
  1215. //>>excludeEnd("ctx");
  1216. var $1,$receiver;
  1217. $1=$self.failuresWidget;
  1218. if(($receiver = $1) == null || $receiver.a$nil){
  1219. $self.failuresWidget=$recv($globals.HLSUnitFailuresListWidget)._on_($self._model());
  1220. return $recv($self.failuresWidget)._next_($self._errorsWidget());
  1221. } else {
  1222. return $1;
  1223. }
  1224. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1225. }, function($ctx1) {$ctx1.fill(self,"failuresWidget",{})});
  1226. //>>excludeEnd("ctx");
  1227. },
  1228. //>>excludeStart("ide", pragmas.excludeIdeData);
  1229. args: [],
  1230. source: "failuresWidget\x0a\x09^ failuresWidget ifNil: [\x0a\x09\x09failuresWidget := HLSUnitFailuresListWidget on: self model.\x0a\x09\x09failuresWidget next: self errorsWidget]",
  1231. referencedClasses: ["HLSUnitFailuresListWidget"],
  1232. //>>excludeEnd("ide");
  1233. pragmas: [],
  1234. messageSends: ["ifNil:", "on:", "model", "next:", "errorsWidget"]
  1235. }),
  1236. $globals.HLSUnit);
  1237. $core.addMethod(
  1238. $core.method({
  1239. selector: "model",
  1240. protocol: "accessing",
  1241. fn: function (){
  1242. var self=this,$self=this;
  1243. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1244. return $core.withContext(function($ctx1) {
  1245. //>>excludeEnd("ctx");
  1246. var $1,$receiver;
  1247. $1=$self.model;
  1248. if(($receiver = $1) == null || $receiver.a$nil){
  1249. $self.model=$recv($globals.HLSUnitModel)._new();
  1250. return $self.model;
  1251. } else {
  1252. return $1;
  1253. }
  1254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1255. }, function($ctx1) {$ctx1.fill(self,"model",{})});
  1256. //>>excludeEnd("ctx");
  1257. },
  1258. //>>excludeStart("ide", pragmas.excludeIdeData);
  1259. args: [],
  1260. source: "model\x0a\x09^ model ifNil: [ model := HLSUnitModel new ]",
  1261. referencedClasses: ["HLSUnitModel"],
  1262. //>>excludeEnd("ide");
  1263. pragmas: [],
  1264. messageSends: ["ifNil:", "new"]
  1265. }),
  1266. $globals.HLSUnit);
  1267. $core.addMethod(
  1268. $core.method({
  1269. selector: "packagesListWidget",
  1270. protocol: "widgets",
  1271. fn: function (){
  1272. var self=this,$self=this;
  1273. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1274. return $core.withContext(function($ctx1) {
  1275. //>>excludeEnd("ctx");
  1276. var $1,$receiver;
  1277. $1=$self.packagesListWidget;
  1278. if(($receiver = $1) == null || $receiver.a$nil){
  1279. $self.packagesListWidget=$recv($globals.HLSUnitPackagesListWidget)._on_($self._model());
  1280. return $recv($self.packagesListWidget)._next_($self._classesListWidget());
  1281. } else {
  1282. return $1;
  1283. }
  1284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1285. }, function($ctx1) {$ctx1.fill(self,"packagesListWidget",{})});
  1286. //>>excludeEnd("ctx");
  1287. },
  1288. //>>excludeStart("ide", pragmas.excludeIdeData);
  1289. args: [],
  1290. source: "packagesListWidget\x0a\x09^ packagesListWidget ifNil: [ \x0a\x09\x09packagesListWidget := HLSUnitPackagesListWidget on: self model.\x0a\x09\x09packagesListWidget next: self classesListWidget]",
  1291. referencedClasses: ["HLSUnitPackagesListWidget"],
  1292. //>>excludeEnd("ide");
  1293. pragmas: [],
  1294. messageSends: ["ifNil:", "on:", "model", "next:", "classesListWidget"]
  1295. }),
  1296. $globals.HLSUnit);
  1297. $core.addMethod(
  1298. $core.method({
  1299. selector: "registerBindingsOn:",
  1300. protocol: "keybindings",
  1301. fn: function (aBindingGroup){
  1302. var self=this,$self=this;
  1303. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1304. return $core.withContext(function($ctx1) {
  1305. //>>excludeEnd("ctx");
  1306. $recv($globals.HLToolCommand)._registerConcreteClassesOn_for_(aBindingGroup,$self._model());
  1307. return self;
  1308. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1309. }, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup})});
  1310. //>>excludeEnd("ctx");
  1311. },
  1312. //>>excludeStart("ide", pragmas.excludeIdeData);
  1313. args: ["aBindingGroup"],
  1314. source: "registerBindingsOn: aBindingGroup\x0a\x09HLToolCommand \x0a\x09\x09registerConcreteClassesOn: aBindingGroup \x0a\x09\x09for: self model",
  1315. referencedClasses: ["HLToolCommand"],
  1316. //>>excludeEnd("ide");
  1317. pragmas: [],
  1318. messageSends: ["registerConcreteClassesOn:for:", "model"]
  1319. }),
  1320. $globals.HLSUnit);
  1321. $core.addMethod(
  1322. $core.method({
  1323. selector: "renderContentOn:",
  1324. protocol: "rendering",
  1325. fn: function (html){
  1326. var self=this,$self=this;
  1327. var resultSection;
  1328. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1329. return $core.withContext(function($ctx1) {
  1330. //>>excludeEnd("ctx");
  1331. var $4,$3,$5,$2,$1;
  1332. $4=$self._packagesListWidget();
  1333. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1334. $ctx1.sendIdx["packagesListWidget"]=1;
  1335. //>>excludeEnd("ctx");
  1336. $3=$recv($globals.HLVerticalSplitter)._with_with_($4,$self._classesListWidget());
  1337. resultSection=$self._resultSection();
  1338. $5=resultSection;
  1339. $2=$recv($globals.HLVerticalSplitter)._with_with_($3,$5);
  1340. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1341. $ctx1.sendIdx["with:with:"]=1;
  1342. //>>excludeEnd("ctx");
  1343. $1=$recv($globals.HLContainer)._with_($2);
  1344. $recv(html)._with_($1);
  1345. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1346. $ctx1.sendIdx["with:"]=1;
  1347. //>>excludeEnd("ctx");
  1348. $recv((function(){
  1349. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1350. return $core.withContext(function($ctx2) {
  1351. //>>excludeEnd("ctx");
  1352. return $recv(resultSection)._resize_((0));
  1353. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1354. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1355. //>>excludeEnd("ctx");
  1356. }))._valueWithTimeout_((100));
  1357. $recv($self._packagesListWidget())._focus();
  1358. return self;
  1359. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1360. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html,resultSection:resultSection})});
  1361. //>>excludeEnd("ctx");
  1362. },
  1363. //>>excludeStart("ide", pragmas.excludeIdeData);
  1364. args: ["html"],
  1365. source: "renderContentOn: html\x0a\x09| resultSection |\x0a\x09html with: (HLContainer with: (\x0a\x09\x09HLVerticalSplitter \x0a\x09\x09\x09with: (HLVerticalSplitter\x0a\x09\x09\x09\x09with: self packagesListWidget \x0a \x09\x09with: self classesListWidget)\x0a\x09\x09\x09with: (resultSection := self resultSection))).\x0a\x09\x0a\x09[resultSection resize: 0] valueWithTimeout: 100.\x0a\x09\x0a\x09self packagesListWidget focus",
  1366. referencedClasses: ["HLContainer", "HLVerticalSplitter"],
  1367. //>>excludeEnd("ide");
  1368. pragmas: [],
  1369. messageSends: ["with:", "with:with:", "packagesListWidget", "classesListWidget", "resultSection", "valueWithTimeout:", "resize:", "focus"]
  1370. }),
  1371. $globals.HLSUnit);
  1372. $core.addMethod(
  1373. $core.method({
  1374. selector: "resultSection",
  1375. protocol: "accessing",
  1376. fn: function (){
  1377. var self=this,$self=this;
  1378. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1379. return $core.withContext(function($ctx1) {
  1380. //>>excludeEnd("ctx");
  1381. var $1;
  1382. $1=$recv($globals.HLHorizontalSplitter)._with_with_($self._resultWidget(),$recv($globals.HLHorizontalSplitter)._with_with_($self._failuresWidget(),$self._errorsWidget()));
  1383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1384. $ctx1.sendIdx["with:with:"]=1;
  1385. //>>excludeEnd("ctx");
  1386. return $1;
  1387. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1388. }, function($ctx1) {$ctx1.fill(self,"resultSection",{})});
  1389. //>>excludeEnd("ctx");
  1390. },
  1391. //>>excludeStart("ide", pragmas.excludeIdeData);
  1392. args: [],
  1393. source: "resultSection\x0a\x09^HLHorizontalSplitter \x0a\x09\x09with: self resultWidget\x0a\x09\x09with: (HLHorizontalSplitter \x0a\x09\x09\x09with: self failuresWidget\x0a\x09\x09\x09with: self errorsWidget)",
  1394. referencedClasses: ["HLHorizontalSplitter"],
  1395. //>>excludeEnd("ide");
  1396. pragmas: [],
  1397. messageSends: ["with:with:", "resultWidget", "failuresWidget", "errorsWidget"]
  1398. }),
  1399. $globals.HLSUnit);
  1400. $core.addMethod(
  1401. $core.method({
  1402. selector: "resultWidget",
  1403. protocol: "widgets",
  1404. fn: function (){
  1405. var self=this,$self=this;
  1406. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1407. return $core.withContext(function($ctx1) {
  1408. //>>excludeEnd("ctx");
  1409. var $1,$2,$receiver;
  1410. $1=$self.resultWidget;
  1411. if(($receiver = $1) == null || $receiver.a$nil){
  1412. $2=$recv($globals.HLSUnitResults)._new();
  1413. $recv($2)._model_($self._model());
  1414. $self.resultWidget=$recv($2)._yourself();
  1415. return $self.resultWidget;
  1416. } else {
  1417. return $1;
  1418. }
  1419. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1420. }, function($ctx1) {$ctx1.fill(self,"resultWidget",{})});
  1421. //>>excludeEnd("ctx");
  1422. },
  1423. //>>excludeStart("ide", pragmas.excludeIdeData);
  1424. args: [],
  1425. source: "resultWidget\x0a\x09^ resultWidget ifNil: [\x0a\x09\x09resultWidget := HLSUnitResults new\x0a\x09\x09\x09model: self model;\x0a\x09\x09\x09yourself]",
  1426. referencedClasses: ["HLSUnitResults"],
  1427. //>>excludeEnd("ide");
  1428. pragmas: [],
  1429. messageSends: ["ifNil:", "model:", "new", "model", "yourself"]
  1430. }),
  1431. $globals.HLSUnit);
  1432. $core.addMethod(
  1433. $core.method({
  1434. selector: "unregister",
  1435. protocol: "actions",
  1436. fn: function (){
  1437. var self=this,$self=this;
  1438. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1439. return $core.withContext(function($ctx1) {
  1440. //>>excludeEnd("ctx");
  1441. (
  1442. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1443. $ctx1.supercall = true,
  1444. //>>excludeEnd("ctx");
  1445. ($globals.HLSUnit.superclass||$boot.nilAsClass).fn.prototype._unregister.apply($self, []));
  1446. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1447. $ctx1.supercall = false;
  1448. //>>excludeEnd("ctx");;
  1449. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1450. $ctx1.sendIdx["unregister"]=1;
  1451. //>>excludeEnd("ctx");
  1452. $recv([$self._packagesListWidget(),$self._classesListWidget(),$self._resultWidget(),$self._errorsWidget(),$self._failuresWidget()])._do_((function(each){
  1453. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1454. return $core.withContext(function($ctx2) {
  1455. //>>excludeEnd("ctx");
  1456. return $recv(each)._unregister();
  1457. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1458. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1459. //>>excludeEnd("ctx");
  1460. }));
  1461. return self;
  1462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1463. }, function($ctx1) {$ctx1.fill(self,"unregister",{})});
  1464. //>>excludeEnd("ctx");
  1465. },
  1466. //>>excludeStart("ide", pragmas.excludeIdeData);
  1467. args: [],
  1468. source: "unregister\x0a\x09super unregister.\x0a\x0a\x09{ \x0a\x09\x09self packagesListWidget.\x0a\x09\x09self classesListWidget.\x0a\x09\x09self resultWidget.\x0a\x09\x09self errorsWidget.\x0a\x09\x09self failuresWidget\x0a\x09} \x0a\x09\x09do: [ :each | each unregister ]",
  1469. referencedClasses: [],
  1470. //>>excludeEnd("ide");
  1471. pragmas: [],
  1472. messageSends: ["unregister", "do:", "packagesListWidget", "classesListWidget", "resultWidget", "errorsWidget", "failuresWidget"]
  1473. }),
  1474. $globals.HLSUnit);
  1475. $core.addMethod(
  1476. $core.method({
  1477. selector: "canBeOpenAsTab",
  1478. protocol: "testing",
  1479. fn: function (){
  1480. var self=this,$self=this;
  1481. return true;
  1482. },
  1483. //>>excludeStart("ide", pragmas.excludeIdeData);
  1484. args: [],
  1485. source: "canBeOpenAsTab\x0a\x09^ true",
  1486. referencedClasses: [],
  1487. //>>excludeEnd("ide");
  1488. pragmas: [],
  1489. messageSends: []
  1490. }),
  1491. $globals.HLSUnit.a$cls);
  1492. $core.addMethod(
  1493. $core.method({
  1494. selector: "tabClass",
  1495. protocol: "accessing",
  1496. fn: function (){
  1497. var self=this,$self=this;
  1498. return "sunit";
  1499. },
  1500. //>>excludeStart("ide", pragmas.excludeIdeData);
  1501. args: [],
  1502. source: "tabClass\x0a\x09^ 'sunit'",
  1503. referencedClasses: [],
  1504. //>>excludeEnd("ide");
  1505. pragmas: [],
  1506. messageSends: []
  1507. }),
  1508. $globals.HLSUnit.a$cls);
  1509. $core.addMethod(
  1510. $core.method({
  1511. selector: "tabLabel",
  1512. protocol: "accessing",
  1513. fn: function (){
  1514. var self=this,$self=this;
  1515. return "SUnit";
  1516. },
  1517. //>>excludeStart("ide", pragmas.excludeIdeData);
  1518. args: [],
  1519. source: "tabLabel\x0a\x09^ 'SUnit'",
  1520. referencedClasses: [],
  1521. //>>excludeEnd("ide");
  1522. pragmas: [],
  1523. messageSends: []
  1524. }),
  1525. $globals.HLSUnit.a$cls);
  1526. $core.addMethod(
  1527. $core.method({
  1528. selector: "tabPriority",
  1529. protocol: "accessing",
  1530. fn: function (){
  1531. var self=this,$self=this;
  1532. return (1000);
  1533. },
  1534. //>>excludeStart("ide", pragmas.excludeIdeData);
  1535. args: [],
  1536. source: "tabPriority\x0a\x09^ 1000",
  1537. referencedClasses: [],
  1538. //>>excludeEnd("ide");
  1539. pragmas: [],
  1540. messageSends: []
  1541. }),
  1542. $globals.HLSUnit.a$cls);
  1543. $core.addClass("HLSUnitModel", $globals.HLModel, ["selectedPackages", "selectedClasses", "testResult", "currentSuite"], "Helios-SUnit");
  1544. //>>excludeStart("ide", pragmas.excludeIdeData);
  1545. $globals.HLSUnitModel.comment="I am the model for running unit tests in Helios.\x0a\x0aI provide the ability to select set of tests to run per package, and a detailed result log with passed tests, failed tests and errors.";
  1546. //>>excludeEnd("ide");
  1547. $core.addMethod(
  1548. $core.method({
  1549. selector: "currentSuite",
  1550. protocol: "accessing",
  1551. fn: function (){
  1552. var self=this,$self=this;
  1553. return $self.currentSuite;
  1554. },
  1555. //>>excludeStart("ide", pragmas.excludeIdeData);
  1556. args: [],
  1557. source: "currentSuite\x0a\x09^currentSuite",
  1558. referencedClasses: [],
  1559. //>>excludeEnd("ide");
  1560. pragmas: [],
  1561. messageSends: []
  1562. }),
  1563. $globals.HLSUnitModel);
  1564. $core.addMethod(
  1565. $core.method({
  1566. selector: "invertSelectedClasses",
  1567. protocol: "actions",
  1568. fn: function (){
  1569. var self=this,$self=this;
  1570. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1571. return $core.withContext(function($ctx1) {
  1572. //>>excludeEnd("ctx");
  1573. var $1;
  1574. $recv($self._testClasses())._do_((function(each){
  1575. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1576. return $core.withContext(function($ctx2) {
  1577. //>>excludeEnd("ctx");
  1578. $1=$recv($self._unfilteredSelectedClasses())._includes_(each);
  1579. if($core.assert($1)){
  1580. return $self._unselectClass_(each);
  1581. } else {
  1582. return $self._selectClass_(each);
  1583. }
  1584. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1585. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1586. //>>excludeEnd("ctx");
  1587. }));
  1588. return self;
  1589. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1590. }, function($ctx1) {$ctx1.fill(self,"invertSelectedClasses",{})});
  1591. //>>excludeEnd("ctx");
  1592. },
  1593. //>>excludeStart("ide", pragmas.excludeIdeData);
  1594. args: [],
  1595. source: "invertSelectedClasses\x0a\x09self testClasses do: [:each | \x0a\x09\x09(self unfilteredSelectedClasses includes: each)\x0a\x09\x09\x09ifTrue: [ self unselectClass: each ]\x0a\x09\x09\x09ifFalse: [ self selectClass: each ]].",
  1596. referencedClasses: [],
  1597. //>>excludeEnd("ide");
  1598. pragmas: [],
  1599. messageSends: ["do:", "testClasses", "ifTrue:ifFalse:", "includes:", "unfilteredSelectedClasses", "unselectClass:", "selectClass:"]
  1600. }),
  1601. $globals.HLSUnitModel);
  1602. $core.addMethod(
  1603. $core.method({
  1604. selector: "invertSelectedPackages",
  1605. protocol: "actions",
  1606. fn: function (){
  1607. var self=this,$self=this;
  1608. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1609. return $core.withContext(function($ctx1) {
  1610. //>>excludeEnd("ctx");
  1611. var $1;
  1612. $recv($self._testPackages())._do_((function(each){
  1613. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1614. return $core.withContext(function($ctx2) {
  1615. //>>excludeEnd("ctx");
  1616. $1=$recv($self._selectedPackages())._includes_(each);
  1617. if($core.assert($1)){
  1618. return $self._unselectPackage_(each);
  1619. } else {
  1620. return $self._selectPackage_(each);
  1621. }
  1622. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1623. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1624. //>>excludeEnd("ctx");
  1625. }));
  1626. return self;
  1627. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1628. }, function($ctx1) {$ctx1.fill(self,"invertSelectedPackages",{})});
  1629. //>>excludeEnd("ctx");
  1630. },
  1631. //>>excludeStart("ide", pragmas.excludeIdeData);
  1632. args: [],
  1633. source: "invertSelectedPackages\x0a\x09self testPackages do: [:each | \x0a\x09\x09(self selectedPackages includes: each)\x0a\x09\x09\x09ifTrue: [ self unselectPackage: each ]\x0a\x09\x09\x09ifFalse: [ self selectPackage: each ]].",
  1634. referencedClasses: [],
  1635. //>>excludeEnd("ide");
  1636. pragmas: [],
  1637. messageSends: ["do:", "testPackages", "ifTrue:ifFalse:", "includes:", "selectedPackages", "unselectPackage:", "selectPackage:"]
  1638. }),
  1639. $globals.HLSUnitModel);
  1640. $core.addMethod(
  1641. $core.method({
  1642. selector: "onResultAnnouncement:",
  1643. protocol: "reacting",
  1644. fn: function (announcement){
  1645. var self=this,$self=this;
  1646. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1647. return $core.withContext(function($ctx1) {
  1648. //>>excludeEnd("ctx");
  1649. $recv($self._announcer())._announce_(announcement);
  1650. return self;
  1651. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1652. }, function($ctx1) {$ctx1.fill(self,"onResultAnnouncement:",{announcement:announcement})});
  1653. //>>excludeEnd("ctx");
  1654. },
  1655. //>>excludeStart("ide", pragmas.excludeIdeData);
  1656. args: ["announcement"],
  1657. source: "onResultAnnouncement: announcement\x0a\x09\x22Propogate announcement\x22\x0a\x09self announcer announce: announcement.",
  1658. referencedClasses: [],
  1659. //>>excludeEnd("ide");
  1660. pragmas: [],
  1661. messageSends: ["announce:", "announcer"]
  1662. }),
  1663. $globals.HLSUnitModel);
  1664. $core.addMethod(
  1665. $core.method({
  1666. selector: "runTests",
  1667. protocol: "actions",
  1668. fn: function (){
  1669. var self=this,$self=this;
  1670. var worker;
  1671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1672. return $core.withContext(function($ctx1) {
  1673. //>>excludeEnd("ctx");
  1674. worker=$recv($recv($self._environment())._classNamed_("TestSuiteRunner"))._on_($self._testCases());
  1675. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1676. $ctx1.sendIdx["on:"]=1;
  1677. //>>excludeEnd("ctx");
  1678. $self.testResult=$recv(worker)._result();
  1679. $recv($self._announcer())._announce_($recv($globals.HLRunTests)._on_(worker));
  1680. $self._subscribeToTestSuite_(worker);
  1681. $recv(worker)._run();
  1682. return self;
  1683. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1684. }, function($ctx1) {$ctx1.fill(self,"runTests",{worker:worker})});
  1685. //>>excludeEnd("ctx");
  1686. },
  1687. //>>excludeStart("ide", pragmas.excludeIdeData);
  1688. args: [],
  1689. source: "runTests\x0a\x09| worker |\x0a\x09worker := (self environment classNamed: #TestSuiteRunner) on: self testCases.\x0a\x09testResult := worker result.\x0a\x09self announcer announce: (HLRunTests on: worker).\x0a\x09self subscribeToTestSuite: worker.\x0a\x09worker run",
  1690. referencedClasses: ["HLRunTests"],
  1691. //>>excludeEnd("ide");
  1692. pragmas: [],
  1693. messageSends: ["on:", "classNamed:", "environment", "testCases", "result", "announce:", "announcer", "subscribeToTestSuite:", "run"]
  1694. }),
  1695. $globals.HLSUnitModel);
  1696. $core.addMethod(
  1697. $core.method({
  1698. selector: "selectAllClasses",
  1699. protocol: "actions",
  1700. fn: function (){
  1701. var self=this,$self=this;
  1702. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1703. return $core.withContext(function($ctx1) {
  1704. //>>excludeEnd("ctx");
  1705. $recv($self._testClasses())._do_((function(each){
  1706. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1707. return $core.withContext(function($ctx2) {
  1708. //>>excludeEnd("ctx");
  1709. return $self._selectClass_(each);
  1710. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1711. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1712. //>>excludeEnd("ctx");
  1713. }));
  1714. return self;
  1715. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1716. }, function($ctx1) {$ctx1.fill(self,"selectAllClasses",{})});
  1717. //>>excludeEnd("ctx");
  1718. },
  1719. //>>excludeStart("ide", pragmas.excludeIdeData);
  1720. args: [],
  1721. source: "selectAllClasses\x0a\x09self testClasses do: [:each | self selectClass: each].",
  1722. referencedClasses: [],
  1723. //>>excludeEnd("ide");
  1724. pragmas: [],
  1725. messageSends: ["do:", "testClasses", "selectClass:"]
  1726. }),
  1727. $globals.HLSUnitModel);
  1728. $core.addMethod(
  1729. $core.method({
  1730. selector: "selectAllPackages",
  1731. protocol: "actions",
  1732. fn: function (){
  1733. var self=this,$self=this;
  1734. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1735. return $core.withContext(function($ctx1) {
  1736. //>>excludeEnd("ctx");
  1737. $recv($self._testPackages())._do_((function(each){
  1738. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1739. return $core.withContext(function($ctx2) {
  1740. //>>excludeEnd("ctx");
  1741. return $self._selectPackage_(each);
  1742. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1743. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1744. //>>excludeEnd("ctx");
  1745. }));
  1746. return self;
  1747. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1748. }, function($ctx1) {$ctx1.fill(self,"selectAllPackages",{})});
  1749. //>>excludeEnd("ctx");
  1750. },
  1751. //>>excludeStart("ide", pragmas.excludeIdeData);
  1752. args: [],
  1753. source: "selectAllPackages\x0a\x09self testPackages do: [:each | self selectPackage: each].",
  1754. referencedClasses: [],
  1755. //>>excludeEnd("ide");
  1756. pragmas: [],
  1757. messageSends: ["do:", "testPackages", "selectPackage:"]
  1758. }),
  1759. $globals.HLSUnitModel);
  1760. $core.addMethod(
  1761. $core.method({
  1762. selector: "selectClass:",
  1763. protocol: "actions",
  1764. fn: function (aClass){
  1765. var self=this,$self=this;
  1766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1767. return $core.withContext(function($ctx1) {
  1768. //>>excludeEnd("ctx");
  1769. $recv($self._unfilteredSelectedClasses())._add_(aClass);
  1770. $recv($self._announcer())._announce_($recv($globals.HLClassSelected)._on_(aClass));
  1771. return self;
  1772. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1773. }, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass})});
  1774. //>>excludeEnd("ctx");
  1775. },
  1776. //>>excludeStart("ide", pragmas.excludeIdeData);
  1777. args: ["aClass"],
  1778. source: "selectClass: aClass\x0a\x09self unfilteredSelectedClasses add: aClass.\x0a\x09self announcer announce: (HLClassSelected on: aClass).",
  1779. referencedClasses: ["HLClassSelected"],
  1780. //>>excludeEnd("ide");
  1781. pragmas: [],
  1782. messageSends: ["add:", "unfilteredSelectedClasses", "announce:", "announcer", "on:"]
  1783. }),
  1784. $globals.HLSUnitModel);
  1785. $core.addMethod(
  1786. $core.method({
  1787. selector: "selectPackage:",
  1788. protocol: "actions",
  1789. fn: function (aPackage){
  1790. var self=this,$self=this;
  1791. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1792. return $core.withContext(function($ctx1) {
  1793. //>>excludeEnd("ctx");
  1794. $recv($self._selectedPackages())._add_(aPackage);
  1795. $recv($self._announcer())._announce_($recv($globals.HLPackageSelected)._on_(aPackage));
  1796. return self;
  1797. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1798. }, function($ctx1) {$ctx1.fill(self,"selectPackage:",{aPackage:aPackage})});
  1799. //>>excludeEnd("ctx");
  1800. },
  1801. //>>excludeStart("ide", pragmas.excludeIdeData);
  1802. args: ["aPackage"],
  1803. source: "selectPackage: aPackage\x0a\x09self selectedPackages add: aPackage.\x0a\x09self announcer announce: (HLPackageSelected on: aPackage).",
  1804. referencedClasses: ["HLPackageSelected"],
  1805. //>>excludeEnd("ide");
  1806. pragmas: [],
  1807. messageSends: ["add:", "selectedPackages", "announce:", "announcer", "on:"]
  1808. }),
  1809. $globals.HLSUnitModel);
  1810. $core.addMethod(
  1811. $core.method({
  1812. selector: "selectedClasses",
  1813. protocol: "accessing",
  1814. fn: function (){
  1815. var self=this,$self=this;
  1816. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1817. return $core.withContext(function($ctx1) {
  1818. //>>excludeEnd("ctx");
  1819. return $recv($self._unfilteredSelectedClasses())._select_((function(each){
  1820. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1821. return $core.withContext(function($ctx2) {
  1822. //>>excludeEnd("ctx");
  1823. return $recv($self._selectedPackages())._includes_($recv(each)._package());
  1824. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1825. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1826. //>>excludeEnd("ctx");
  1827. }));
  1828. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1829. }, function($ctx1) {$ctx1.fill(self,"selectedClasses",{})});
  1830. //>>excludeEnd("ctx");
  1831. },
  1832. //>>excludeStart("ide", pragmas.excludeIdeData);
  1833. args: [],
  1834. source: "selectedClasses\x0a\x09^ (self unfilteredSelectedClasses) select: [ :each |\x0a\x09\x09self selectedPackages includes: each package ]",
  1835. referencedClasses: [],
  1836. //>>excludeEnd("ide");
  1837. pragmas: [],
  1838. messageSends: ["select:", "unfilteredSelectedClasses", "includes:", "selectedPackages", "package"]
  1839. }),
  1840. $globals.HLSUnitModel);
  1841. $core.addMethod(
  1842. $core.method({
  1843. selector: "selectedPackages",
  1844. protocol: "accessing",
  1845. fn: function (){
  1846. var self=this,$self=this;
  1847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1848. return $core.withContext(function($ctx1) {
  1849. //>>excludeEnd("ctx");
  1850. var $1,$receiver;
  1851. $1=$self.selectedPackages;
  1852. if(($receiver = $1) == null || $receiver.a$nil){
  1853. $self.selectedPackages=$recv($globals.Set)._new();
  1854. return $self.selectedPackages;
  1855. } else {
  1856. return $1;
  1857. }
  1858. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1859. }, function($ctx1) {$ctx1.fill(self,"selectedPackages",{})});
  1860. //>>excludeEnd("ctx");
  1861. },
  1862. //>>excludeStart("ide", pragmas.excludeIdeData);
  1863. args: [],
  1864. source: "selectedPackages\x0a\x09^ selectedPackages ifNil: [ selectedPackages := Set new ]",
  1865. referencedClasses: ["Set"],
  1866. //>>excludeEnd("ide");
  1867. pragmas: [],
  1868. messageSends: ["ifNil:", "new"]
  1869. }),
  1870. $globals.HLSUnitModel);
  1871. $core.addMethod(
  1872. $core.method({
  1873. selector: "subscribeToTestSuite:",
  1874. protocol: "actions",
  1875. fn: function (aTestSuiteRunner){
  1876. var self=this,$self=this;
  1877. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1878. return $core.withContext(function($ctx1) {
  1879. //>>excludeEnd("ctx");
  1880. var $1,$2,$receiver;
  1881. $1=$self.currentSuite;
  1882. if(($receiver = $1) == null || $receiver.a$nil){
  1883. $1;
  1884. } else {
  1885. $2=$recv($self.currentSuite)._announcer();
  1886. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1887. $ctx1.sendIdx["announcer"]=1;
  1888. //>>excludeEnd("ctx");
  1889. $recv($2)._unsubscribe_(self);
  1890. }
  1891. $self.currentSuite=aTestSuiteRunner;
  1892. $recv($recv($self.currentSuite)._announcer())._on_send_to_($globals.ResultAnnouncement,"onResultAnnouncement:",self);
  1893. return self;
  1894. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1895. }, function($ctx1) {$ctx1.fill(self,"subscribeToTestSuite:",{aTestSuiteRunner:aTestSuiteRunner})});
  1896. //>>excludeEnd("ctx");
  1897. },
  1898. //>>excludeStart("ide", pragmas.excludeIdeData);
  1899. args: ["aTestSuiteRunner"],
  1900. source: "subscribeToTestSuite: aTestSuiteRunner\x0a\x09currentSuite ifNotNil: [ currentSuite announcer unsubscribe: self].\x0a\x09currentSuite := aTestSuiteRunner.\x0a\x09currentSuite announcer \x0a\x09\x09on: ResultAnnouncement\x0a\x09\x09send: #onResultAnnouncement:\x0a\x09\x09to: self",
  1901. referencedClasses: ["ResultAnnouncement"],
  1902. //>>excludeEnd("ide");
  1903. pragmas: [],
  1904. messageSends: ["ifNotNil:", "unsubscribe:", "announcer", "on:send:to:"]
  1905. }),
  1906. $globals.HLSUnitModel);
  1907. $core.addMethod(
  1908. $core.method({
  1909. selector: "testCases",
  1910. protocol: "accessing",
  1911. fn: function (){
  1912. var self=this,$self=this;
  1913. var testCases;
  1914. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1915. return $core.withContext(function($ctx1) {
  1916. //>>excludeEnd("ctx");
  1917. testCases=[];
  1918. $recv($self._selectedClasses())._do_((function(each){
  1919. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1920. return $core.withContext(function($ctx2) {
  1921. //>>excludeEnd("ctx");
  1922. return $recv(testCases)._addAll_($recv(each)._buildSuite());
  1923. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1924. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1925. //>>excludeEnd("ctx");
  1926. }));
  1927. return testCases;
  1928. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1929. }, function($ctx1) {$ctx1.fill(self,"testCases",{testCases:testCases})});
  1930. //>>excludeEnd("ctx");
  1931. },
  1932. //>>excludeStart("ide", pragmas.excludeIdeData);
  1933. args: [],
  1934. source: "testCases\x0a\x09| testCases |\x0a\x09testCases := #().\x0a\x09self selectedClasses\x0a\x09\x09do: [ :each | testCases addAll: each buildSuite ].\x0a\x09^ testCases",
  1935. referencedClasses: [],
  1936. //>>excludeEnd("ide");
  1937. pragmas: [],
  1938. messageSends: ["do:", "selectedClasses", "addAll:", "buildSuite"]
  1939. }),
  1940. $globals.HLSUnitModel);
  1941. $core.addMethod(
  1942. $core.method({
  1943. selector: "testClasses",
  1944. protocol: "accessing",
  1945. fn: function (){
  1946. var self=this,$self=this;
  1947. var stream;
  1948. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1949. return $core.withContext(function($ctx1) {
  1950. //>>excludeEnd("ctx");
  1951. stream=$recv($recv($globals.Array)._new())._writeStream();
  1952. $recv($self._selectedPackages())._do_((function(package_){
  1953. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1954. return $core.withContext(function($ctx2) {
  1955. //>>excludeEnd("ctx");
  1956. return $recv(stream)._nextPutAll_($recv($recv(package_)._classes())._select_((function(each){
  1957. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1958. return $core.withContext(function($ctx3) {
  1959. //>>excludeEnd("ctx");
  1960. return $recv(each)._isTestClass();
  1961. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1962. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  1963. //>>excludeEnd("ctx");
  1964. })));
  1965. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1966. }, function($ctx2) {$ctx2.fillBlock({package_:package_},$ctx1,1)});
  1967. //>>excludeEnd("ctx");
  1968. }));
  1969. return $recv(stream)._contents();
  1970. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1971. }, function($ctx1) {$ctx1.fill(self,"testClasses",{stream:stream})});
  1972. //>>excludeEnd("ctx");
  1973. },
  1974. //>>excludeStart("ide", pragmas.excludeIdeData);
  1975. args: [],
  1976. source: "testClasses\x0a\x09\x22Answer all concrete subclasses of TestCase in selected packages\x22\x0a\x09\x0a\x09| stream |\x0a\x09stream := Array new writeStream.\x0a\x09self selectedPackages do: [ :package |\x0a\x09\x09stream nextPutAll: (package classes select: [ :each |\x0a\x09\x09\x09each isTestClass ] ) ].\x0a\x09^ stream contents",
  1977. referencedClasses: ["Array"],
  1978. //>>excludeEnd("ide");
  1979. pragmas: [],
  1980. messageSends: ["writeStream", "new", "do:", "selectedPackages", "nextPutAll:", "select:", "classes", "isTestClass", "contents"]
  1981. }),
  1982. $globals.HLSUnitModel);
  1983. $core.addMethod(
  1984. $core.method({
  1985. selector: "testPackages",
  1986. protocol: "accessing",
  1987. fn: function (){
  1988. var self=this,$self=this;
  1989. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1990. return $core.withContext(function($ctx1) {
  1991. //>>excludeEnd("ctx");
  1992. return $recv($recv($self._environment())._packages())._select_((function(each){
  1993. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1994. return $core.withContext(function($ctx2) {
  1995. //>>excludeEnd("ctx");
  1996. return $recv(each)._isTestPackage();
  1997. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1998. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  1999. //>>excludeEnd("ctx");
  2000. }));
  2001. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2002. }, function($ctx1) {$ctx1.fill(self,"testPackages",{})});
  2003. //>>excludeEnd("ctx");
  2004. },
  2005. //>>excludeStart("ide", pragmas.excludeIdeData);
  2006. args: [],
  2007. source: "testPackages\x0a\x09\x22Answer all packages containing concrete subclasses of TestCase\x22\x0a\x09\x0a\x09^ self environment packages \x0a\x09\x09select: [ :each | each isTestPackage ]",
  2008. referencedClasses: [],
  2009. //>>excludeEnd("ide");
  2010. pragmas: [],
  2011. messageSends: ["select:", "packages", "environment", "isTestPackage"]
  2012. }),
  2013. $globals.HLSUnitModel);
  2014. $core.addMethod(
  2015. $core.method({
  2016. selector: "testResult",
  2017. protocol: "accessing",
  2018. fn: function (){
  2019. var self=this,$self=this;
  2020. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2021. return $core.withContext(function($ctx1) {
  2022. //>>excludeEnd("ctx");
  2023. var $1,$receiver;
  2024. $1=$self.testResult;
  2025. if(($receiver = $1) == null || $receiver.a$nil){
  2026. $self.testResult=$recv($globals.TestResult)._new();
  2027. return $self.testResult;
  2028. } else {
  2029. return $1;
  2030. }
  2031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2032. }, function($ctx1) {$ctx1.fill(self,"testResult",{})});
  2033. //>>excludeEnd("ctx");
  2034. },
  2035. //>>excludeStart("ide", pragmas.excludeIdeData);
  2036. args: [],
  2037. source: "testResult\x0a\x09^testResult ifNil: [testResult := TestResult new]",
  2038. referencedClasses: ["TestResult"],
  2039. //>>excludeEnd("ide");
  2040. pragmas: [],
  2041. messageSends: ["ifNil:", "new"]
  2042. }),
  2043. $globals.HLSUnitModel);
  2044. $core.addMethod(
  2045. $core.method({
  2046. selector: "unfilteredSelectedClasses",
  2047. protocol: "private",
  2048. fn: function (){
  2049. var self=this,$self=this;
  2050. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2051. return $core.withContext(function($ctx1) {
  2052. //>>excludeEnd("ctx");
  2053. var $1,$receiver;
  2054. $1=$self.selectedClasses;
  2055. if(($receiver = $1) == null || $receiver.a$nil){
  2056. $self.selectedClasses=$recv($globals.Set)._new();
  2057. return $self.selectedClasses;
  2058. } else {
  2059. return $1;
  2060. }
  2061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2062. }, function($ctx1) {$ctx1.fill(self,"unfilteredSelectedClasses",{})});
  2063. //>>excludeEnd("ctx");
  2064. },
  2065. //>>excludeStart("ide", pragmas.excludeIdeData);
  2066. args: [],
  2067. source: "unfilteredSelectedClasses\x0a\x09^ (selectedClasses ifNil: [ selectedClasses := Set new ])",
  2068. referencedClasses: ["Set"],
  2069. //>>excludeEnd("ide");
  2070. pragmas: [],
  2071. messageSends: ["ifNil:", "new"]
  2072. }),
  2073. $globals.HLSUnitModel);
  2074. $core.addMethod(
  2075. $core.method({
  2076. selector: "unselectClass:",
  2077. protocol: "actions",
  2078. fn: function (aClass){
  2079. var self=this,$self=this;
  2080. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2081. return $core.withContext(function($ctx1) {
  2082. //>>excludeEnd("ctx");
  2083. var $early={};
  2084. try {
  2085. $recv($self._unfilteredSelectedClasses())._remove_ifAbsent_(aClass,(function(){
  2086. throw $early=[self];
  2087. }));
  2088. $recv($self._announcer())._announce_($recv($globals.HLClassUnselected)._on_(aClass));
  2089. return self;
  2090. }
  2091. catch(e) {if(e===$early)return e[0]; throw e}
  2092. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2093. }, function($ctx1) {$ctx1.fill(self,"unselectClass:",{aClass:aClass})});
  2094. //>>excludeEnd("ctx");
  2095. },
  2096. //>>excludeStart("ide", pragmas.excludeIdeData);
  2097. args: ["aClass"],
  2098. source: "unselectClass: aClass\x0a\x09self unfilteredSelectedClasses remove: aClass ifAbsent: [^self].\x0a\x09self announcer announce: (HLClassUnselected on: aClass).",
  2099. referencedClasses: ["HLClassUnselected"],
  2100. //>>excludeEnd("ide");
  2101. pragmas: [],
  2102. messageSends: ["remove:ifAbsent:", "unfilteredSelectedClasses", "announce:", "announcer", "on:"]
  2103. }),
  2104. $globals.HLSUnitModel);
  2105. $core.addMethod(
  2106. $core.method({
  2107. selector: "unselectPackage:",
  2108. protocol: "actions",
  2109. fn: function (aPackage){
  2110. var self=this,$self=this;
  2111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2112. return $core.withContext(function($ctx1) {
  2113. //>>excludeEnd("ctx");
  2114. var $early={};
  2115. try {
  2116. $recv($self._selectedPackages())._remove_ifAbsent_(aPackage,(function(){
  2117. throw $early=[self];
  2118. }));
  2119. $recv($self._announcer())._announce_($recv($globals.HLPackageUnselected)._on_(aPackage));
  2120. return self;
  2121. }
  2122. catch(e) {if(e===$early)return e[0]; throw e}
  2123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2124. }, function($ctx1) {$ctx1.fill(self,"unselectPackage:",{aPackage:aPackage})});
  2125. //>>excludeEnd("ctx");
  2126. },
  2127. //>>excludeStart("ide", pragmas.excludeIdeData);
  2128. args: ["aPackage"],
  2129. source: "unselectPackage: aPackage\x0a\x09self selectedPackages remove: aPackage ifAbsent: [^self].\x0a\x09self announcer announce: (HLPackageUnselected on: aPackage).",
  2130. referencedClasses: ["HLPackageUnselected"],
  2131. //>>excludeEnd("ide");
  2132. pragmas: [],
  2133. messageSends: ["remove:ifAbsent:", "selectedPackages", "announce:", "announcer", "on:"]
  2134. }),
  2135. $globals.HLSUnitModel);
  2136. $core.addClass("HLSUnitResultListWidget", $globals.HLToolListWidget, [], "Helios-SUnit");
  2137. //>>excludeStart("ide", pragmas.excludeIdeData);
  2138. $globals.HLSUnitResultListWidget.comment="I group the lists that display test results";
  2139. //>>excludeEnd("ide");
  2140. $core.addMethod(
  2141. $core.method({
  2142. selector: "observeModel",
  2143. protocol: "initialization",
  2144. fn: function (){
  2145. var self=this,$self=this;
  2146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2147. return $core.withContext(function($ctx1) {
  2148. //>>excludeEnd("ctx");
  2149. $recv($recv($self._model())._announcer())._on_send_to_($globals.ResultAnnouncement,"onResultAnnouncement:",self);
  2150. return self;
  2151. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2152. }, function($ctx1) {$ctx1.fill(self,"observeModel",{})});
  2153. //>>excludeEnd("ctx");
  2154. },
  2155. //>>excludeStart("ide", pragmas.excludeIdeData);
  2156. args: [],
  2157. source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: ResultAnnouncement\x0a\x09\x09send: #onResultAnnouncement:\x0a\x09\x09to: self",
  2158. referencedClasses: ["ResultAnnouncement"],
  2159. //>>excludeEnd("ide");
  2160. pragmas: [],
  2161. messageSends: ["on:send:to:", "announcer", "model"]
  2162. }),
  2163. $globals.HLSUnitResultListWidget);
  2164. $core.addMethod(
  2165. $core.method({
  2166. selector: "onResultAnnouncement:",
  2167. protocol: "reacting",
  2168. fn: function (announcement){
  2169. var self=this,$self=this;
  2170. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2171. return $core.withContext(function($ctx1) {
  2172. //>>excludeEnd("ctx");
  2173. $self._refresh();
  2174. return self;
  2175. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2176. }, function($ctx1) {$ctx1.fill(self,"onResultAnnouncement:",{announcement:announcement})});
  2177. //>>excludeEnd("ctx");
  2178. },
  2179. //>>excludeStart("ide", pragmas.excludeIdeData);
  2180. args: ["announcement"],
  2181. source: "onResultAnnouncement: announcement\x0a\x09self refresh.",
  2182. referencedClasses: [],
  2183. //>>excludeEnd("ide");
  2184. pragmas: [],
  2185. messageSends: ["refresh"]
  2186. }),
  2187. $globals.HLSUnitResultListWidget);
  2188. $core.addMethod(
  2189. $core.method({
  2190. selector: "performFailure:",
  2191. protocol: "actions",
  2192. fn: function (aTestCase){
  2193. var self=this,$self=this;
  2194. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2195. return $core.withContext(function($ctx1) {
  2196. //>>excludeEnd("ctx");
  2197. $recv(aTestCase)._runCase();
  2198. return self;
  2199. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2200. }, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase})});
  2201. //>>excludeEnd("ctx");
  2202. },
  2203. //>>excludeStart("ide", pragmas.excludeIdeData);
  2204. args: ["aTestCase"],
  2205. source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
  2206. referencedClasses: [],
  2207. //>>excludeEnd("ide");
  2208. pragmas: [],
  2209. messageSends: ["runCase"]
  2210. }),
  2211. $globals.HLSUnitResultListWidget);
  2212. $core.addMethod(
  2213. $core.method({
  2214. selector: "renderItemLabel:on:",
  2215. protocol: "rendering",
  2216. fn: function (anObject,html){
  2217. var self=this,$self=this;
  2218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2219. return $core.withContext(function($ctx1) {
  2220. //>>excludeEnd("ctx");
  2221. var $1;
  2222. $1=$recv($recv($recv($recv(anObject)._class())._name()).__comma(" >> ")).__comma($recv(anObject)._selector());
  2223. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2224. $ctx1.sendIdx[","]=1;
  2225. //>>excludeEnd("ctx");
  2226. $recv(html)._with_($1);
  2227. return self;
  2228. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2229. }, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{anObject:anObject,html:html})});
  2230. //>>excludeEnd("ctx");
  2231. },
  2232. //>>excludeStart("ide", pragmas.excludeIdeData);
  2233. args: ["anObject", "html"],
  2234. source: "renderItemLabel: anObject on: html\x0a\x09html with: anObject class name, ' >> ', anObject selector",
  2235. referencedClasses: [],
  2236. //>>excludeEnd("ide");
  2237. pragmas: [],
  2238. messageSends: ["with:", ",", "name", "class", "selector"]
  2239. }),
  2240. $globals.HLSUnitResultListWidget);
  2241. $core.addMethod(
  2242. $core.method({
  2243. selector: "reselectItem:",
  2244. protocol: "rendering",
  2245. fn: function (anObject){
  2246. var self=this,$self=this;
  2247. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2248. return $core.withContext(function($ctx1) {
  2249. //>>excludeEnd("ctx");
  2250. $self._performFailure_(anObject);
  2251. return self;
  2252. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2253. }, function($ctx1) {$ctx1.fill(self,"reselectItem:",{anObject:anObject})});
  2254. //>>excludeEnd("ctx");
  2255. },
  2256. //>>excludeStart("ide", pragmas.excludeIdeData);
  2257. args: ["anObject"],
  2258. source: "reselectItem: anObject\x0a\x09self performFailure: anObject",
  2259. referencedClasses: [],
  2260. //>>excludeEnd("ide");
  2261. pragmas: [],
  2262. messageSends: ["performFailure:"]
  2263. }),
  2264. $globals.HLSUnitResultListWidget);
  2265. $core.addClass("HLSUnitErrorsListWidget", $globals.HLSUnitResultListWidget, [], "Helios-SUnit");
  2266. //>>excludeStart("ide", pragmas.excludeIdeData);
  2267. $globals.HLSUnitErrorsListWidget.comment="I display a list of tests that have errors";
  2268. //>>excludeEnd("ide");
  2269. $core.addMethod(
  2270. $core.method({
  2271. selector: "items",
  2272. protocol: "accessing",
  2273. fn: function (){
  2274. var self=this,$self=this;
  2275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2276. return $core.withContext(function($ctx1) {
  2277. //>>excludeEnd("ctx");
  2278. return $recv($recv($self._model())._testResult())._errors();
  2279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2280. }, function($ctx1) {$ctx1.fill(self,"items",{})});
  2281. //>>excludeEnd("ctx");
  2282. },
  2283. //>>excludeStart("ide", pragmas.excludeIdeData);
  2284. args: [],
  2285. source: "items\x0a\x09^self model testResult errors",
  2286. referencedClasses: [],
  2287. //>>excludeEnd("ide");
  2288. pragmas: [],
  2289. messageSends: ["errors", "testResult", "model"]
  2290. }),
  2291. $globals.HLSUnitErrorsListWidget);
  2292. $core.addMethod(
  2293. $core.method({
  2294. selector: "label",
  2295. protocol: "accessing",
  2296. fn: function (){
  2297. var self=this,$self=this;
  2298. return "Errors";
  2299. },
  2300. //>>excludeStart("ide", pragmas.excludeIdeData);
  2301. args: [],
  2302. source: "label\x0a\x09^'Errors'",
  2303. referencedClasses: [],
  2304. //>>excludeEnd("ide");
  2305. pragmas: [],
  2306. messageSends: []
  2307. }),
  2308. $globals.HLSUnitErrorsListWidget);
  2309. $core.addClass("HLSUnitFailuresListWidget", $globals.HLSUnitResultListWidget, [], "Helios-SUnit");
  2310. //>>excludeStart("ide", pragmas.excludeIdeData);
  2311. $globals.HLSUnitFailuresListWidget.comment="I display a list of tests that have failures";
  2312. //>>excludeEnd("ide");
  2313. $core.addMethod(
  2314. $core.method({
  2315. selector: "items",
  2316. protocol: "accessing",
  2317. fn: function (){
  2318. var self=this,$self=this;
  2319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2320. return $core.withContext(function($ctx1) {
  2321. //>>excludeEnd("ctx");
  2322. return $recv($recv($self._model())._testResult())._failures();
  2323. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2324. }, function($ctx1) {$ctx1.fill(self,"items",{})});
  2325. //>>excludeEnd("ctx");
  2326. },
  2327. //>>excludeStart("ide", pragmas.excludeIdeData);
  2328. args: [],
  2329. source: "items\x0a\x09^self model testResult failures",
  2330. referencedClasses: [],
  2331. //>>excludeEnd("ide");
  2332. pragmas: [],
  2333. messageSends: ["failures", "testResult", "model"]
  2334. }),
  2335. $globals.HLSUnitFailuresListWidget);
  2336. $core.addMethod(
  2337. $core.method({
  2338. selector: "label",
  2339. protocol: "accessing",
  2340. fn: function (){
  2341. var self=this,$self=this;
  2342. return "Failures";
  2343. },
  2344. //>>excludeStart("ide", pragmas.excludeIdeData);
  2345. args: [],
  2346. source: "label\x0a\x09^'Failures'",
  2347. referencedClasses: [],
  2348. //>>excludeEnd("ide");
  2349. pragmas: [],
  2350. messageSends: []
  2351. }),
  2352. $globals.HLSUnitFailuresListWidget);
  2353. $core.addClass("HLSUnitResultStatus", $globals.HLWidget, ["model"], "Helios-SUnit");
  2354. //>>excludeStart("ide", pragmas.excludeIdeData);
  2355. $globals.HLSUnitResultStatus.comment="I display the status of the previous test run\x0a\x0a1. How many tests where run.\x0a* How many tests passed.\x0a* How many tests failed.\x0a* How many tests resulted in an error.";
  2356. //>>excludeEnd("ide");
  2357. $core.addMethod(
  2358. $core.method({
  2359. selector: "model",
  2360. protocol: "accessing",
  2361. fn: function (){
  2362. var self=this,$self=this;
  2363. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2364. return $core.withContext(function($ctx1) {
  2365. //>>excludeEnd("ctx");
  2366. var $1,$receiver;
  2367. $1=$self.model;
  2368. if(($receiver = $1) == null || $receiver.a$nil){
  2369. $self.model=$recv($globals.TestResult)._new();
  2370. return $self.model;
  2371. } else {
  2372. return $1;
  2373. }
  2374. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2375. }, function($ctx1) {$ctx1.fill(self,"model",{})});
  2376. //>>excludeEnd("ctx");
  2377. },
  2378. //>>excludeStart("ide", pragmas.excludeIdeData);
  2379. args: [],
  2380. source: "model\x0a\x09^ model ifNil: [model := TestResult new]",
  2381. referencedClasses: ["TestResult"],
  2382. //>>excludeEnd("ide");
  2383. pragmas: [],
  2384. messageSends: ["ifNil:", "new"]
  2385. }),
  2386. $globals.HLSUnitResultStatus);
  2387. $core.addMethod(
  2388. $core.method({
  2389. selector: "model:",
  2390. protocol: "accessing",
  2391. fn: function (anObject){
  2392. var self=this,$self=this;
  2393. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2394. return $core.withContext(function($ctx1) {
  2395. //>>excludeEnd("ctx");
  2396. $self.model=anObject;
  2397. $self._observeModel();
  2398. return self;
  2399. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2400. }, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject})});
  2401. //>>excludeEnd("ctx");
  2402. },
  2403. //>>excludeStart("ide", pragmas.excludeIdeData);
  2404. args: ["anObject"],
  2405. source: "model: anObject\x0a\x09model := anObject.\x0a\x09self observeModel.",
  2406. referencedClasses: [],
  2407. //>>excludeEnd("ide");
  2408. pragmas: [],
  2409. messageSends: ["observeModel"]
  2410. }),
  2411. $globals.HLSUnitResultStatus);
  2412. $core.addMethod(
  2413. $core.method({
  2414. selector: "observeModel",
  2415. protocol: "actions",
  2416. fn: function (){
  2417. var self=this,$self=this;
  2418. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2419. return $core.withContext(function($ctx1) {
  2420. //>>excludeEnd("ctx");
  2421. $recv($recv($self._model())._announcer())._on_send_to_($globals.ResultAnnouncement,"onResultAnnouncement:",self);
  2422. return self;
  2423. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2424. }, function($ctx1) {$ctx1.fill(self,"observeModel",{})});
  2425. //>>excludeEnd("ctx");
  2426. },
  2427. //>>excludeStart("ide", pragmas.excludeIdeData);
  2428. args: [],
  2429. source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: ResultAnnouncement\x0a\x09\x09send: #onResultAnnouncement:\x0a\x09\x09to: self",
  2430. referencedClasses: ["ResultAnnouncement"],
  2431. //>>excludeEnd("ide");
  2432. pragmas: [],
  2433. messageSends: ["on:send:to:", "announcer", "model"]
  2434. }),
  2435. $globals.HLSUnitResultStatus);
  2436. $core.addMethod(
  2437. $core.method({
  2438. selector: "onResultAnnouncement:",
  2439. protocol: "reacting",
  2440. fn: function (announcement){
  2441. var self=this,$self=this;
  2442. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2443. return $core.withContext(function($ctx1) {
  2444. //>>excludeEnd("ctx");
  2445. $self._refresh();
  2446. return self;
  2447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2448. }, function($ctx1) {$ctx1.fill(self,"onResultAnnouncement:",{announcement:announcement})});
  2449. //>>excludeEnd("ctx");
  2450. },
  2451. //>>excludeStart("ide", pragmas.excludeIdeData);
  2452. args: ["announcement"],
  2453. source: "onResultAnnouncement: announcement\x0a\x09self refresh.",
  2454. referencedClasses: [],
  2455. //>>excludeEnd("ide");
  2456. pragmas: [],
  2457. messageSends: ["refresh"]
  2458. }),
  2459. $globals.HLSUnitResultStatus);
  2460. $core.addMethod(
  2461. $core.method({
  2462. selector: "printErrors",
  2463. protocol: "printing",
  2464. fn: function (){
  2465. var self=this,$self=this;
  2466. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2467. return $core.withContext(function($ctx1) {
  2468. //>>excludeEnd("ctx");
  2469. return $recv($recv($recv($recv($self._result())._errors())._size())._asString()).__comma(" errors, ");
  2470. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2471. }, function($ctx1) {$ctx1.fill(self,"printErrors",{})});
  2472. //>>excludeEnd("ctx");
  2473. },
  2474. //>>excludeStart("ide", pragmas.excludeIdeData);
  2475. args: [],
  2476. source: "printErrors\x0a\x09^ self result errors size asString , ' errors, '",
  2477. referencedClasses: [],
  2478. //>>excludeEnd("ide");
  2479. pragmas: [],
  2480. messageSends: [",", "asString", "size", "errors", "result"]
  2481. }),
  2482. $globals.HLSUnitResultStatus);
  2483. $core.addMethod(
  2484. $core.method({
  2485. selector: "printFailures",
  2486. protocol: "printing",
  2487. fn: function (){
  2488. var self=this,$self=this;
  2489. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2490. return $core.withContext(function($ctx1) {
  2491. //>>excludeEnd("ctx");
  2492. return $recv($recv($recv($recv($self._result())._failures())._size())._asString()).__comma(" failures");
  2493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2494. }, function($ctx1) {$ctx1.fill(self,"printFailures",{})});
  2495. //>>excludeEnd("ctx");
  2496. },
  2497. //>>excludeStart("ide", pragmas.excludeIdeData);
  2498. args: [],
  2499. source: "printFailures\x0a\x09^ self result failures size asString, ' failures'",
  2500. referencedClasses: [],
  2501. //>>excludeEnd("ide");
  2502. pragmas: [],
  2503. messageSends: [",", "asString", "size", "failures", "result"]
  2504. }),
  2505. $globals.HLSUnitResultStatus);
  2506. $core.addMethod(
  2507. $core.method({
  2508. selector: "printPasses",
  2509. protocol: "printing",
  2510. fn: function (){
  2511. var self=this,$self=this;
  2512. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2513. return $core.withContext(function($ctx1) {
  2514. //>>excludeEnd("ctx");
  2515. var $5,$4,$8,$7,$6,$3,$2,$1;
  2516. $5=$self._result();
  2517. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2518. $ctx1.sendIdx["result"]=1;
  2519. //>>excludeEnd("ctx");
  2520. $4=$recv($5)._runs();
  2521. $8=$self._result();
  2522. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2523. $ctx1.sendIdx["result"]=2;
  2524. //>>excludeEnd("ctx");
  2525. $7=$recv($8)._errors();
  2526. $6=$recv($7)._size();
  2527. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2528. $ctx1.sendIdx["size"]=1;
  2529. //>>excludeEnd("ctx");
  2530. $3=$recv($4).__minus($6);
  2531. $2=$recv($3).__minus($recv($recv($self._result())._failures())._size());
  2532. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2533. $ctx1.sendIdx["-"]=1;
  2534. //>>excludeEnd("ctx");
  2535. $1=$recv($2)._asString();
  2536. return $recv($1).__comma(" passes, ");
  2537. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2538. }, function($ctx1) {$ctx1.fill(self,"printPasses",{})});
  2539. //>>excludeEnd("ctx");
  2540. },
  2541. //>>excludeStart("ide", pragmas.excludeIdeData);
  2542. args: [],
  2543. source: "printPasses\x0a\x09^ (self result runs - self result errors size - self result failures size) asString , ' passes, '",
  2544. referencedClasses: [],
  2545. //>>excludeEnd("ide");
  2546. pragmas: [],
  2547. messageSends: [",", "asString", "-", "runs", "result", "size", "errors", "failures"]
  2548. }),
  2549. $globals.HLSUnitResultStatus);
  2550. $core.addMethod(
  2551. $core.method({
  2552. selector: "printTotal",
  2553. protocol: "printing",
  2554. fn: function (){
  2555. var self=this,$self=this;
  2556. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2557. return $core.withContext(function($ctx1) {
  2558. //>>excludeEnd("ctx");
  2559. return $recv($recv($recv($self._result())._total())._asString()).__comma(" runs, ");
  2560. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2561. }, function($ctx1) {$ctx1.fill(self,"printTotal",{})});
  2562. //>>excludeEnd("ctx");
  2563. },
  2564. //>>excludeStart("ide", pragmas.excludeIdeData);
  2565. args: [],
  2566. source: "printTotal\x0a\x09^ self result total asString, ' runs, '",
  2567. referencedClasses: [],
  2568. //>>excludeEnd("ide");
  2569. pragmas: [],
  2570. messageSends: [",", "asString", "total", "result"]
  2571. }),
  2572. $globals.HLSUnitResultStatus);
  2573. $core.addMethod(
  2574. $core.method({
  2575. selector: "renderContentOn:",
  2576. protocol: "rendering",
  2577. fn: function (html){
  2578. var self=this,$self=this;
  2579. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2580. return $core.withContext(function($ctx1) {
  2581. //>>excludeEnd("ctx");
  2582. var $1;
  2583. $1=$recv(html)._div();
  2584. $recv($1)._class_($self._statusCssClass());
  2585. $recv($1)._with_((function(){
  2586. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2587. return $core.withContext(function($ctx2) {
  2588. //>>excludeEnd("ctx");
  2589. return $recv($recv(html)._span())._with_($self._statusInfo());
  2590. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2591. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2592. //>>excludeEnd("ctx");
  2593. }));
  2594. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2595. $ctx1.sendIdx["with:"]=1;
  2596. //>>excludeEnd("ctx");
  2597. return self;
  2598. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2599. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html})});
  2600. //>>excludeEnd("ctx");
  2601. },
  2602. //>>excludeStart("ide", pragmas.excludeIdeData);
  2603. args: ["html"],
  2604. source: "renderContentOn: html\x0a\x09html div\x0a\x09\x09class: self statusCssClass;\x0a\x09\x09with: [ html span with: self statusInfo ]",
  2605. referencedClasses: [],
  2606. //>>excludeEnd("ide");
  2607. pragmas: [],
  2608. messageSends: ["class:", "div", "statusCssClass", "with:", "span", "statusInfo"]
  2609. }),
  2610. $globals.HLSUnitResultStatus);
  2611. $core.addMethod(
  2612. $core.method({
  2613. selector: "result",
  2614. protocol: "accessing",
  2615. fn: function (){
  2616. var self=this,$self=this;
  2617. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2618. return $core.withContext(function($ctx1) {
  2619. //>>excludeEnd("ctx");
  2620. return $recv($self._model())._testResult();
  2621. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2622. }, function($ctx1) {$ctx1.fill(self,"result",{})});
  2623. //>>excludeEnd("ctx");
  2624. },
  2625. //>>excludeStart("ide", pragmas.excludeIdeData);
  2626. args: [],
  2627. source: "result\x0a\x09^ self model testResult",
  2628. referencedClasses: [],
  2629. //>>excludeEnd("ide");
  2630. pragmas: [],
  2631. messageSends: ["testResult", "model"]
  2632. }),
  2633. $globals.HLSUnitResultStatus);
  2634. $core.addMethod(
  2635. $core.method({
  2636. selector: "statusCssClass",
  2637. protocol: "accessing",
  2638. fn: function (){
  2639. var self=this,$self=this;
  2640. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2641. return $core.withContext(function($ctx1) {
  2642. //>>excludeEnd("ctx");
  2643. return "sunit status ".__comma($recv($self._result())._status());
  2644. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2645. }, function($ctx1) {$ctx1.fill(self,"statusCssClass",{})});
  2646. //>>excludeEnd("ctx");
  2647. },
  2648. //>>excludeStart("ide", pragmas.excludeIdeData);
  2649. args: [],
  2650. source: "statusCssClass\x0a\x09^'sunit status ', self result status",
  2651. referencedClasses: [],
  2652. //>>excludeEnd("ide");
  2653. pragmas: [],
  2654. messageSends: [",", "status", "result"]
  2655. }),
  2656. $globals.HLSUnitResultStatus);
  2657. $core.addMethod(
  2658. $core.method({
  2659. selector: "statusInfo",
  2660. protocol: "accessing",
  2661. fn: function (){
  2662. var self=this,$self=this;
  2663. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2664. return $core.withContext(function($ctx1) {
  2665. //>>excludeEnd("ctx");
  2666. var $2,$1;
  2667. $2=$recv($recv($self._printTotal()).__comma($self._printPasses())).__comma($self._printErrors());
  2668. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2669. $ctx1.sendIdx[","]=2;
  2670. //>>excludeEnd("ctx");
  2671. $1=$recv($2).__comma($self._printFailures());
  2672. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2673. $ctx1.sendIdx[","]=1;
  2674. //>>excludeEnd("ctx");
  2675. return $1;
  2676. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2677. }, function($ctx1) {$ctx1.fill(self,"statusInfo",{})});
  2678. //>>excludeEnd("ctx");
  2679. },
  2680. //>>excludeStart("ide", pragmas.excludeIdeData);
  2681. args: [],
  2682. source: "statusInfo\x0a\x09^ self printTotal, self printPasses, self printErrors, self printFailures",
  2683. referencedClasses: [],
  2684. //>>excludeEnd("ide");
  2685. pragmas: [],
  2686. messageSends: [",", "printTotal", "printPasses", "printErrors", "printFailures"]
  2687. }),
  2688. $globals.HLSUnitResultStatus);
  2689. $core.addMethod(
  2690. $core.method({
  2691. selector: "unregister",
  2692. protocol: "actions",
  2693. fn: function (){
  2694. var self=this,$self=this;
  2695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2696. return $core.withContext(function($ctx1) {
  2697. //>>excludeEnd("ctx");
  2698. (
  2699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2700. $ctx1.supercall = true,
  2701. //>>excludeEnd("ctx");
  2702. ($globals.HLSUnitResultStatus.superclass||$boot.nilAsClass).fn.prototype._unregister.apply($self, []));
  2703. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2704. $ctx1.supercall = false;
  2705. //>>excludeEnd("ctx");;
  2706. $recv($recv($self._model())._announcer())._unsubscribe_(self);
  2707. return self;
  2708. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2709. }, function($ctx1) {$ctx1.fill(self,"unregister",{})});
  2710. //>>excludeEnd("ctx");
  2711. },
  2712. //>>excludeStart("ide", pragmas.excludeIdeData);
  2713. args: [],
  2714. source: "unregister\x0a\x09super unregister.\x0a\x09self model announcer unsubscribe: self.",
  2715. referencedClasses: [],
  2716. //>>excludeEnd("ide");
  2717. pragmas: [],
  2718. messageSends: ["unregister", "unsubscribe:", "announcer", "model"]
  2719. }),
  2720. $globals.HLSUnitResultStatus);
  2721. $core.addClass("HLSUnitResults", $globals.HLWidget, ["model", "progressBarWidget", "resultStatusWidget"], "Helios-SUnit");
  2722. //>>excludeStart("ide", pragmas.excludeIdeData);
  2723. $globals.HLSUnitResults.comment="I am the widget that displays the test results for a previous test run in Helios.\x0a\x0aI display.\x0a\x0a1. The status of the tests.\x0a* Progress of the currently running test suite.";
  2724. //>>excludeEnd("ide");
  2725. $core.addMethod(
  2726. $core.method({
  2727. selector: "model",
  2728. protocol: "accessing",
  2729. fn: function (){
  2730. var self=this,$self=this;
  2731. return $self.model;
  2732. },
  2733. //>>excludeStart("ide", pragmas.excludeIdeData);
  2734. args: [],
  2735. source: "model\x0a\x09^model",
  2736. referencedClasses: [],
  2737. //>>excludeEnd("ide");
  2738. pragmas: [],
  2739. messageSends: []
  2740. }),
  2741. $globals.HLSUnitResults);
  2742. $core.addMethod(
  2743. $core.method({
  2744. selector: "model:",
  2745. protocol: "accessing",
  2746. fn: function (anObject){
  2747. var self=this,$self=this;
  2748. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2749. return $core.withContext(function($ctx1) {
  2750. //>>excludeEnd("ctx");
  2751. $self.model=anObject;
  2752. $self._observeModel();
  2753. return self;
  2754. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2755. }, function($ctx1) {$ctx1.fill(self,"model:",{anObject:anObject})});
  2756. //>>excludeEnd("ctx");
  2757. },
  2758. //>>excludeStart("ide", pragmas.excludeIdeData);
  2759. args: ["anObject"],
  2760. source: "model: anObject\x0a\x09model := anObject.\x0a\x09self observeModel",
  2761. referencedClasses: [],
  2762. //>>excludeEnd("ide");
  2763. pragmas: [],
  2764. messageSends: ["observeModel"]
  2765. }),
  2766. $globals.HLSUnitResults);
  2767. $core.addMethod(
  2768. $core.method({
  2769. selector: "observeModel",
  2770. protocol: "initialization",
  2771. fn: function (){
  2772. var self=this,$self=this;
  2773. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2774. return $core.withContext(function($ctx1) {
  2775. //>>excludeEnd("ctx");
  2776. var $1;
  2777. $1=$recv($self._model())._announcer();
  2778. $recv($1)._on_send_to_($globals.HLRunTests,"onRunTests:",self);
  2779. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2780. $ctx1.sendIdx["on:send:to:"]=1;
  2781. //>>excludeEnd("ctx");
  2782. $recv($1)._on_send_to_($globals.ResultAnnouncement,"onResultAnnouncement:",self);
  2783. return self;
  2784. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2785. }, function($ctx1) {$ctx1.fill(self,"observeModel",{})});
  2786. //>>excludeEnd("ctx");
  2787. },
  2788. //>>excludeStart("ide", pragmas.excludeIdeData);
  2789. args: [],
  2790. source: "observeModel\x0a self model announcer \x0a\x09\x09on: HLRunTests\x0a\x09\x09send: #onRunTests:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: ResultAnnouncement\x0a\x09\x09send: #onResultAnnouncement:\x0a\x09\x09to: self",
  2791. referencedClasses: ["HLRunTests", "ResultAnnouncement"],
  2792. //>>excludeEnd("ide");
  2793. pragmas: [],
  2794. messageSends: ["on:send:to:", "announcer", "model"]
  2795. }),
  2796. $globals.HLSUnitResults);
  2797. $core.addMethod(
  2798. $core.method({
  2799. selector: "onResultAnnouncement:",
  2800. protocol: "reacting",
  2801. fn: function (announcement){
  2802. var self=this,$self=this;
  2803. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2804. return $core.withContext(function($ctx1) {
  2805. //>>excludeEnd("ctx");
  2806. var $1,$7,$6,$5,$4,$3,$2;
  2807. $recv((function(){
  2808. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2809. return $core.withContext(function($ctx2) {
  2810. //>>excludeEnd("ctx");
  2811. $1=$self._progressBarWidget();
  2812. $7=$self._model();
  2813. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2814. $ctx2.sendIdx["model"]=1;
  2815. //>>excludeEnd("ctx");
  2816. $6=$recv($7)._testResult();
  2817. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2818. $ctx2.sendIdx["testResult"]=1;
  2819. //>>excludeEnd("ctx");
  2820. $5=$recv($6)._runs();
  2821. $4=$recv($5).__slash($recv($recv($self._model())._testResult())._total());
  2822. $3=$recv($4).__star((100));
  2823. $2=$recv($3)._rounded();
  2824. return $recv($1)._updateProgress_($2);
  2825. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2826. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2827. //>>excludeEnd("ctx");
  2828. }))._fork();
  2829. return self;
  2830. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2831. }, function($ctx1) {$ctx1.fill(self,"onResultAnnouncement:",{announcement:announcement})});
  2832. //>>excludeEnd("ctx");
  2833. },
  2834. //>>excludeStart("ide", pragmas.excludeIdeData);
  2835. args: ["announcement"],
  2836. source: "onResultAnnouncement: announcement\x0a\x09[self progressBarWidget \x0a\x09\x09updateProgress: (self model testResult runs / self model testResult total * 100) rounded] fork",
  2837. referencedClasses: [],
  2838. //>>excludeEnd("ide");
  2839. pragmas: [],
  2840. messageSends: ["fork", "updateProgress:", "progressBarWidget", "rounded", "*", "/", "runs", "testResult", "model", "total"]
  2841. }),
  2842. $globals.HLSUnitResults);
  2843. $core.addMethod(
  2844. $core.method({
  2845. selector: "onRunTests:",
  2846. protocol: "reacting",
  2847. fn: function (announcement){
  2848. var self=this,$self=this;
  2849. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2850. return $core.withContext(function($ctx1) {
  2851. //>>excludeEnd("ctx");
  2852. var $1;
  2853. $1=$self._progressBarWidget();
  2854. $recv($1)._updateProgress_((0));
  2855. $recv($1)._refresh();
  2856. return self;
  2857. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2858. }, function($ctx1) {$ctx1.fill(self,"onRunTests:",{announcement:announcement})});
  2859. //>>excludeEnd("ctx");
  2860. },
  2861. //>>excludeStart("ide", pragmas.excludeIdeData);
  2862. args: ["announcement"],
  2863. source: "onRunTests: announcement\x0a\x09self progressBarWidget updateProgress: 0;\x0a\x09\x09refresh.",
  2864. referencedClasses: [],
  2865. //>>excludeEnd("ide");
  2866. pragmas: [],
  2867. messageSends: ["updateProgress:", "progressBarWidget", "refresh"]
  2868. }),
  2869. $globals.HLSUnitResults);
  2870. $core.addMethod(
  2871. $core.method({
  2872. selector: "progressBarWidget",
  2873. protocol: "accessing",
  2874. fn: function (){
  2875. var self=this,$self=this;
  2876. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2877. return $core.withContext(function($ctx1) {
  2878. //>>excludeEnd("ctx");
  2879. var $1,$2,$receiver;
  2880. $1=$self.progressBarWidget;
  2881. if(($receiver = $1) == null || $receiver.a$nil){
  2882. $2=$recv($globals.HLProgressBarWidget)._new();
  2883. $recv($2)._label_("");
  2884. $self.progressBarWidget=$recv($2)._yourself();
  2885. return $self.progressBarWidget;
  2886. } else {
  2887. return $1;
  2888. }
  2889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2890. }, function($ctx1) {$ctx1.fill(self,"progressBarWidget",{})});
  2891. //>>excludeEnd("ctx");
  2892. },
  2893. //>>excludeStart("ide", pragmas.excludeIdeData);
  2894. args: [],
  2895. source: "progressBarWidget\x0a\x09^progressBarWidget ifNil: [progressBarWidget := HLProgressBarWidget new\x0a\x09\x09label: '';\x0a\x09\x09yourself]",
  2896. referencedClasses: ["HLProgressBarWidget"],
  2897. //>>excludeEnd("ide");
  2898. pragmas: [],
  2899. messageSends: ["ifNil:", "label:", "new", "yourself"]
  2900. }),
  2901. $globals.HLSUnitResults);
  2902. $core.addMethod(
  2903. $core.method({
  2904. selector: "renderContentOn:",
  2905. protocol: "rendering",
  2906. fn: function (html){
  2907. var self=this,$self=this;
  2908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2909. return $core.withContext(function($ctx1) {
  2910. //>>excludeEnd("ctx");
  2911. $recv(html)._with_($self._resultStatusWidget());
  2912. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2913. $ctx1.sendIdx["with:"]=1;
  2914. //>>excludeEnd("ctx");
  2915. $recv(html)._with_($self._progressBarWidget());
  2916. return self;
  2917. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2918. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html})});
  2919. //>>excludeEnd("ctx");
  2920. },
  2921. //>>excludeStart("ide", pragmas.excludeIdeData);
  2922. args: ["html"],
  2923. source: "renderContentOn: html\x0a\x09html with: self resultStatusWidget;\x0a\x09\x09with: self progressBarWidget",
  2924. referencedClasses: [],
  2925. //>>excludeEnd("ide");
  2926. pragmas: [],
  2927. messageSends: ["with:", "resultStatusWidget", "progressBarWidget"]
  2928. }),
  2929. $globals.HLSUnitResults);
  2930. $core.addMethod(
  2931. $core.method({
  2932. selector: "resultStatusWidget",
  2933. protocol: "accessing",
  2934. fn: function (){
  2935. var self=this,$self=this;
  2936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2937. return $core.withContext(function($ctx1) {
  2938. //>>excludeEnd("ctx");
  2939. var $1,$2,$receiver;
  2940. $1=$self.resultStatusWidget;
  2941. if(($receiver = $1) == null || $receiver.a$nil){
  2942. $2=$recv($globals.HLSUnitResultStatus)._new();
  2943. $recv($2)._model_($self._model());
  2944. $self.resultStatusWidget=$recv($2)._yourself();
  2945. return $self.resultStatusWidget;
  2946. } else {
  2947. return $1;
  2948. }
  2949. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2950. }, function($ctx1) {$ctx1.fill(self,"resultStatusWidget",{})});
  2951. //>>excludeEnd("ctx");
  2952. },
  2953. //>>excludeStart("ide", pragmas.excludeIdeData);
  2954. args: [],
  2955. source: "resultStatusWidget\x0a\x09^resultStatusWidget ifNil: [resultStatusWidget := HLSUnitResultStatus new\x0a\x09\x09model: self model;\x0a\x09\x09yourself]",
  2956. referencedClasses: ["HLSUnitResultStatus"],
  2957. //>>excludeEnd("ide");
  2958. pragmas: [],
  2959. messageSends: ["ifNil:", "model:", "new", "model", "yourself"]
  2960. }),
  2961. $globals.HLSUnitResults);
  2962. $core.addMethod(
  2963. $core.method({
  2964. selector: "unregister",
  2965. protocol: "actions",
  2966. fn: function (){
  2967. var self=this,$self=this;
  2968. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2969. return $core.withContext(function($ctx1) {
  2970. //>>excludeEnd("ctx");
  2971. (
  2972. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2973. $ctx1.supercall = true,
  2974. //>>excludeEnd("ctx");
  2975. ($globals.HLSUnitResults.superclass||$boot.nilAsClass).fn.prototype._unregister.apply($self, []));
  2976. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2977. $ctx1.supercall = false;
  2978. //>>excludeEnd("ctx");;
  2979. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2980. $ctx1.sendIdx["unregister"]=1;
  2981. //>>excludeEnd("ctx");
  2982. $recv($recv($self._model())._announcer())._unsubscribe_(self);
  2983. $recv($self._resultStatusWidget())._unregister();
  2984. return self;
  2985. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2986. }, function($ctx1) {$ctx1.fill(self,"unregister",{})});
  2987. //>>excludeEnd("ctx");
  2988. },
  2989. //>>excludeStart("ide", pragmas.excludeIdeData);
  2990. args: [],
  2991. source: "unregister\x0a\x09super unregister.\x0a\x09self model announcer unsubscribe: self.\x0a\x09self resultStatusWidget unregister.",
  2992. referencedClasses: [],
  2993. //>>excludeEnd("ide");
  2994. pragmas: [],
  2995. messageSends: ["unregister", "unsubscribe:", "announcer", "model", "resultStatusWidget"]
  2996. }),
  2997. $globals.HLSUnitResults);
  2998. });