1
0

Helios-SUnit.js 102 KB

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