Helios-Inspector.js 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442
  1. define("amber_core/Helios-Inspector", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_vm/globals", "amber_core/Helios-Core"], function(smalltalk,nil,_st, globals){
  2. smalltalk.addPackage('Helios-Inspector');
  3. smalltalk.packages["Helios-Inspector"].transport = {"type":"amd","amdNamespace":"amber_core"};
  4. smalltalk.addClass('HLInspectorDisplayWidget', globals.HLNavigationListWidget, ['inspector'], 'Helios-Inspector');
  5. smalltalk.addMethod(
  6. smalltalk.method({
  7. selector: "inspector",
  8. protocol: 'accessing',
  9. fn: function (){
  10. var self=this;
  11. var $1;
  12. $1=self["@inspector"];
  13. return $1;
  14. },
  15. args: [],
  16. source: "inspector\x0a\x09^ inspector",
  17. messageSends: [],
  18. referencedClasses: []
  19. }),
  20. globals.HLInspectorDisplayWidget);
  21. smalltalk.addMethod(
  22. smalltalk.method({
  23. selector: "inspector:",
  24. protocol: 'accessing',
  25. fn: function (anInspector){
  26. var self=this;
  27. self["@inspector"]=anInspector;
  28. return self},
  29. args: ["anInspector"],
  30. source: "inspector: anInspector\x0a\x09inspector := anInspector",
  31. messageSends: [],
  32. referencedClasses: []
  33. }),
  34. globals.HLInspectorDisplayWidget);
  35. smalltalk.addMethod(
  36. smalltalk.method({
  37. selector: "model",
  38. protocol: 'accessing',
  39. fn: function (){
  40. var self=this;
  41. return smalltalk.withContext(function($ctx1) {
  42. var $1;
  43. $1=_st(self._inspector())._model();
  44. return $1;
  45. }, function($ctx1) {$ctx1.fill(self,"model",{},globals.HLInspectorDisplayWidget)})},
  46. args: [],
  47. source: "model\x0a\x0a\x09^ self inspector model",
  48. messageSends: ["model", "inspector"],
  49. referencedClasses: []
  50. }),
  51. globals.HLInspectorDisplayWidget);
  52. smalltalk.addMethod(
  53. smalltalk.method({
  54. selector: "renderContentOn:",
  55. protocol: 'rendering',
  56. fn: function (html){
  57. var self=this;
  58. return smalltalk.withContext(function($ctx1) {
  59. _st(_st(html)._div())._with_(self._selectionDisplayString());
  60. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLInspectorDisplayWidget)})},
  61. args: ["html"],
  62. source: "renderContentOn: html\x0a\x09\x0a html div with: self selectionDisplayString",
  63. messageSends: ["with:", "div", "selectionDisplayString"],
  64. referencedClasses: []
  65. }),
  66. globals.HLInspectorDisplayWidget);
  67. smalltalk.addMethod(
  68. smalltalk.method({
  69. selector: "selectionDisplayString",
  70. protocol: 'rendering',
  71. fn: function (){
  72. var self=this;
  73. var selection;
  74. return smalltalk.withContext(function($ctx1) {
  75. var $1,$5,$4,$3,$2;
  76. $1=self._model();
  77. $ctx1.sendIdx["model"]=1;
  78. selection=_st($1)._selection();
  79. $5=self._model();
  80. $ctx1.sendIdx["model"]=2;
  81. $4=_st($5)._variables();
  82. $3=_st($4)._includesKey_(selection);
  83. if(smalltalk.assert($3)){
  84. $2=_st(_st(self._model())._instVarObjectAt_(selection))._printString();
  85. } else {
  86. $2="";
  87. };
  88. return $2;
  89. }, function($ctx1) {$ctx1.fill(self,"selectionDisplayString",{selection:selection},globals.HLInspectorDisplayWidget)})},
  90. args: [],
  91. source: "selectionDisplayString\x0a\x09|selection|\x0a\x09selection := self model selection.\x0a ^ (self model variables includesKey: selection)\x0a \x09ifTrue:[ (self model instVarObjectAt: selection) printString ]\x0a \x09ifFalse:[ '' ]",
  92. messageSends: ["selection", "model", "ifTrue:ifFalse:", "includesKey:", "variables", "printString", "instVarObjectAt:"],
  93. referencedClasses: []
  94. }),
  95. globals.HLInspectorDisplayWidget);
  96. smalltalk.addClass('HLInspectorModel', globals.HLModel, ['inspectee', 'code', 'variables', 'label', 'selection'], 'Helios-Inspector');
  97. globals.HLInspectorModel.comment="I am the model of the Helios inspector `HLInspectorWidget`.\x0a\x0a## API\x0a\x0aUse the method `inspect:on:` to inspect an object on an inspector.";
  98. smalltalk.addMethod(
  99. smalltalk.method({
  100. selector: "code",
  101. protocol: 'accessing',
  102. fn: function (){
  103. var self=this;
  104. function $HLCodeModel(){return globals.HLCodeModel||(typeof HLCodeModel=="undefined"?nil:HLCodeModel)}
  105. return smalltalk.withContext(function($ctx1) {
  106. var $2,$1,$receiver;
  107. $2=self["@code"];
  108. if(($receiver = $2) == nil || $receiver == null){
  109. self["@code"]=_st($HLCodeModel())._on_(self._environment());
  110. $1=self["@code"];
  111. } else {
  112. $1=$2;
  113. };
  114. return $1;
  115. }, function($ctx1) {$ctx1.fill(self,"code",{},globals.HLInspectorModel)})},
  116. args: [],
  117. source: "code\x0a\x09\x22Answers the code model working for this workspace model\x22\x0a\x09^ code ifNil:[ code := HLCodeModel on: self environment ]",
  118. messageSends: ["ifNil:", "on:", "environment"],
  119. referencedClasses: ["HLCodeModel"]
  120. }),
  121. globals.HLInspectorModel);
  122. smalltalk.addMethod(
  123. smalltalk.method({
  124. selector: "inspect:on:",
  125. protocol: 'actions',
  126. fn: function (anObject,anInspector){
  127. var self=this;
  128. return smalltalk.withContext(function($ctx1) {
  129. self["@inspectee"]=anObject;
  130. self["@variables"]=[];
  131. _st(self["@inspectee"])._inspectOn_(anInspector);
  132. return self}, function($ctx1) {$ctx1.fill(self,"inspect:on:",{anObject:anObject,anInspector:anInspector},globals.HLInspectorModel)})},
  133. args: ["anObject", "anInspector"],
  134. source: "inspect: anObject on: anInspector\x0a\x09inspectee := anObject.\x0a\x09variables := #().\x0a\x09inspectee inspectOn: anInspector",
  135. messageSends: ["inspectOn:"],
  136. referencedClasses: []
  137. }),
  138. globals.HLInspectorModel);
  139. smalltalk.addMethod(
  140. smalltalk.method({
  141. selector: "inspectee",
  142. protocol: 'accessing',
  143. fn: function (){
  144. var self=this;
  145. var $1;
  146. $1=self["@inspectee"];
  147. return $1;
  148. },
  149. args: [],
  150. source: "inspectee \x0a\x09^ inspectee",
  151. messageSends: [],
  152. referencedClasses: []
  153. }),
  154. globals.HLInspectorModel);
  155. smalltalk.addMethod(
  156. smalltalk.method({
  157. selector: "inspectee:",
  158. protocol: 'accessing',
  159. fn: function (anObject){
  160. var self=this;
  161. self["@inspectee"]=anObject;
  162. return self},
  163. args: ["anObject"],
  164. source: "inspectee: anObject \x0a\x09inspectee := anObject",
  165. messageSends: [],
  166. referencedClasses: []
  167. }),
  168. globals.HLInspectorModel);
  169. smalltalk.addMethod(
  170. smalltalk.method({
  171. selector: "instVarObjectAt:",
  172. protocol: 'actions',
  173. fn: function (anInstVarName){
  174. var self=this;
  175. return smalltalk.withContext(function($ctx1) {
  176. var $1;
  177. $1=_st(self._variables())._at_(anInstVarName);
  178. return $1;
  179. }, function($ctx1) {$ctx1.fill(self,"instVarObjectAt:",{anInstVarName:anInstVarName},globals.HLInspectorModel)})},
  180. args: ["anInstVarName"],
  181. source: "instVarObjectAt: anInstVarName\x0a\x09^ self variables at: anInstVarName",
  182. messageSends: ["at:", "variables"],
  183. referencedClasses: []
  184. }),
  185. globals.HLInspectorModel);
  186. smalltalk.addMethod(
  187. smalltalk.method({
  188. selector: "label",
  189. protocol: 'accessing',
  190. fn: function (){
  191. var self=this;
  192. return smalltalk.withContext(function($ctx1) {
  193. var $2,$1,$receiver;
  194. $2=self["@label"];
  195. if(($receiver = $2) == nil || $receiver == null){
  196. $1=_st(self._inspectee())._printString();
  197. } else {
  198. $1=$2;
  199. };
  200. return $1;
  201. }, function($ctx1) {$ctx1.fill(self,"label",{},globals.HLInspectorModel)})},
  202. args: [],
  203. source: "label\x0a ^ label ifNil: [ self inspectee printString ]",
  204. messageSends: ["ifNil:", "printString", "inspectee"],
  205. referencedClasses: []
  206. }),
  207. globals.HLInspectorModel);
  208. smalltalk.addMethod(
  209. smalltalk.method({
  210. selector: "label:",
  211. protocol: 'accessing',
  212. fn: function (aString){
  213. var self=this;
  214. self["@label"]=aString;
  215. return self},
  216. args: ["aString"],
  217. source: "label: aString\x0a label := aString",
  218. messageSends: [],
  219. referencedClasses: []
  220. }),
  221. globals.HLInspectorModel);
  222. smalltalk.addMethod(
  223. smalltalk.method({
  224. selector: "selectedInstVar:",
  225. protocol: 'actions',
  226. fn: function (anInstVarName){
  227. var self=this;
  228. return smalltalk.withContext(function($ctx1) {
  229. self._selection_(anInstVarName);
  230. return self}, function($ctx1) {$ctx1.fill(self,"selectedInstVar:",{anInstVarName:anInstVarName},globals.HLInspectorModel)})},
  231. args: ["anInstVarName"],
  232. source: "selectedInstVar: anInstVarName\x0a self selection: anInstVarName",
  233. messageSends: ["selection:"],
  234. referencedClasses: []
  235. }),
  236. globals.HLInspectorModel);
  237. smalltalk.addMethod(
  238. smalltalk.method({
  239. selector: "selectedInstVarObject",
  240. protocol: 'accessing',
  241. fn: function (){
  242. var self=this;
  243. return smalltalk.withContext(function($ctx1) {
  244. var $1;
  245. $1=self._instVarObjectAt_(self._selection());
  246. return $1;
  247. }, function($ctx1) {$ctx1.fill(self,"selectedInstVarObject",{},globals.HLInspectorModel)})},
  248. args: [],
  249. source: "selectedInstVarObject\x0a\x09^ self instVarObjectAt: self selection",
  250. messageSends: ["instVarObjectAt:", "selection"],
  251. referencedClasses: []
  252. }),
  253. globals.HLInspectorModel);
  254. smalltalk.addMethod(
  255. smalltalk.method({
  256. selector: "selection",
  257. protocol: 'accessing',
  258. fn: function (){
  259. var self=this;
  260. return smalltalk.withContext(function($ctx1) {
  261. var $2,$1,$receiver;
  262. $2=self["@selection"];
  263. if(($receiver = $2) == nil || $receiver == null){
  264. $1="";
  265. } else {
  266. $1=$2;
  267. };
  268. return $1;
  269. }, function($ctx1) {$ctx1.fill(self,"selection",{},globals.HLInspectorModel)})},
  270. args: [],
  271. source: "selection\x0a\x09^ selection ifNil:[ '' ]",
  272. messageSends: ["ifNil:"],
  273. referencedClasses: []
  274. }),
  275. globals.HLInspectorModel);
  276. smalltalk.addMethod(
  277. smalltalk.method({
  278. selector: "selection:",
  279. protocol: 'accessing',
  280. fn: function (anObject){
  281. var self=this;
  282. function $HLInstanceVariableSelected(){return globals.HLInstanceVariableSelected||(typeof HLInstanceVariableSelected=="undefined"?nil:HLInstanceVariableSelected)}
  283. return smalltalk.withContext(function($ctx1) {
  284. self["@selection"]=anObject;
  285. _st(self._announcer())._announce_(_st($HLInstanceVariableSelected())._on_(self["@selection"]));
  286. return self}, function($ctx1) {$ctx1.fill(self,"selection:",{anObject:anObject},globals.HLInspectorModel)})},
  287. args: ["anObject"],
  288. source: "selection: anObject\x0a\x09selection := anObject.\x0a\x0a\x09self announcer announce: (HLInstanceVariableSelected on: selection)",
  289. messageSends: ["announce:", "announcer", "on:"],
  290. referencedClasses: ["HLInstanceVariableSelected"]
  291. }),
  292. globals.HLInspectorModel);
  293. smalltalk.addMethod(
  294. smalltalk.method({
  295. selector: "subscribe:",
  296. protocol: 'actions',
  297. fn: function (aWidget){
  298. var self=this;
  299. return smalltalk.withContext(function($ctx1) {
  300. _st(aWidget)._subscribeTo_(self._announcer());
  301. return self}, function($ctx1) {$ctx1.fill(self,"subscribe:",{aWidget:aWidget},globals.HLInspectorModel)})},
  302. args: ["aWidget"],
  303. source: "subscribe: aWidget\x0a\x09aWidget subscribeTo: self announcer",
  304. messageSends: ["subscribeTo:", "announcer"],
  305. referencedClasses: []
  306. }),
  307. globals.HLInspectorModel);
  308. smalltalk.addMethod(
  309. smalltalk.method({
  310. selector: "variables",
  311. protocol: 'accessing',
  312. fn: function (){
  313. var self=this;
  314. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  315. return smalltalk.withContext(function($ctx1) {
  316. var $2,$1,$receiver;
  317. $2=self["@variables"];
  318. if(($receiver = $2) == nil || $receiver == null){
  319. $1=_st($Dictionary())._new();
  320. } else {
  321. $1=$2;
  322. };
  323. return $1;
  324. }, function($ctx1) {$ctx1.fill(self,"variables",{},globals.HLInspectorModel)})},
  325. args: [],
  326. source: "variables\x0a\x09^ variables ifNil: [ Dictionary new ]",
  327. messageSends: ["ifNil:", "new"],
  328. referencedClasses: ["Dictionary"]
  329. }),
  330. globals.HLInspectorModel);
  331. smalltalk.addMethod(
  332. smalltalk.method({
  333. selector: "variables:",
  334. protocol: 'accessing',
  335. fn: function (aCollection){
  336. var self=this;
  337. self["@variables"]=aCollection;
  338. return self},
  339. args: ["aCollection"],
  340. source: "variables: aCollection\x0a\x09variables := aCollection",
  341. messageSends: [],
  342. referencedClasses: []
  343. }),
  344. globals.HLInspectorModel);
  345. smalltalk.addMethod(
  346. smalltalk.method({
  347. selector: "on:",
  348. protocol: 'actions',
  349. fn: function (anEnvironment){
  350. var self=this;
  351. return smalltalk.withContext(function($ctx1) {
  352. var $2,$3,$1;
  353. $2=self._new();
  354. _st($2)._environment_(anEnvironment);
  355. $3=_st($2)._yourself();
  356. $1=$3;
  357. return $1;
  358. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},globals.HLInspectorModel.klass)})},
  359. args: ["anEnvironment"],
  360. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  361. messageSends: ["environment:", "new", "yourself"],
  362. referencedClasses: []
  363. }),
  364. globals.HLInspectorModel.klass);
  365. smalltalk.addClass('HLInspectorVariablesWidget', globals.HLNavigationListWidget, ['announcer', 'inspector', 'list', 'diveButton'], 'Helios-Inspector');
  366. smalltalk.addMethod(
  367. smalltalk.method({
  368. selector: "announcer",
  369. protocol: 'accessing',
  370. fn: function (){
  371. var self=this;
  372. function $Announcer(){return globals.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  373. return smalltalk.withContext(function($ctx1) {
  374. var $2,$1,$receiver;
  375. $2=self["@announcer"];
  376. if(($receiver = $2) == nil || $receiver == null){
  377. self["@announcer"]=_st($Announcer())._new();
  378. $1=self["@announcer"];
  379. } else {
  380. $1=$2;
  381. };
  382. return $1;
  383. }, function($ctx1) {$ctx1.fill(self,"announcer",{},globals.HLInspectorVariablesWidget)})},
  384. args: [],
  385. source: "announcer\x0a\x09^ announcer ifNil:[ announcer := Announcer new ]",
  386. messageSends: ["ifNil:", "new"],
  387. referencedClasses: ["Announcer"]
  388. }),
  389. globals.HLInspectorVariablesWidget);
  390. smalltalk.addMethod(
  391. smalltalk.method({
  392. selector: "defaultItems",
  393. protocol: 'defaults',
  394. fn: function (){
  395. var self=this;
  396. return smalltalk.withContext(function($ctx1) {
  397. var $1;
  398. $1=self._variables();
  399. return $1;
  400. }, function($ctx1) {$ctx1.fill(self,"defaultItems",{},globals.HLInspectorVariablesWidget)})},
  401. args: [],
  402. source: "defaultItems\x0a\x09^ self variables",
  403. messageSends: ["variables"],
  404. referencedClasses: []
  405. }),
  406. globals.HLInspectorVariablesWidget);
  407. smalltalk.addMethod(
  408. smalltalk.method({
  409. selector: "dive",
  410. protocol: 'actions',
  411. fn: function (){
  412. var self=this;
  413. function $HLDiveRequested(){return globals.HLDiveRequested||(typeof HLDiveRequested=="undefined"?nil:HLDiveRequested)}
  414. return smalltalk.withContext(function($ctx1) {
  415. _st(self._announcer())._announce_(_st($HLDiveRequested())._new());
  416. return self}, function($ctx1) {$ctx1.fill(self,"dive",{},globals.HLInspectorVariablesWidget)})},
  417. args: [],
  418. source: "dive\x0a\x09self announcer announce: HLDiveRequested new",
  419. messageSends: ["announce:", "announcer", "new"],
  420. referencedClasses: ["HLDiveRequested"]
  421. }),
  422. globals.HLInspectorVariablesWidget);
  423. smalltalk.addMethod(
  424. smalltalk.method({
  425. selector: "inspector",
  426. protocol: 'accessing',
  427. fn: function (){
  428. var self=this;
  429. var $1;
  430. $1=self["@inspector"];
  431. return $1;
  432. },
  433. args: [],
  434. source: "inspector\x0a\x09^ inspector",
  435. messageSends: [],
  436. referencedClasses: []
  437. }),
  438. globals.HLInspectorVariablesWidget);
  439. smalltalk.addMethod(
  440. smalltalk.method({
  441. selector: "inspector:",
  442. protocol: 'accessing',
  443. fn: function (anInspector){
  444. var self=this;
  445. self["@inspector"]=anInspector;
  446. return self},
  447. args: ["anInspector"],
  448. source: "inspector: anInspector\x0a\x09inspector := anInspector",
  449. messageSends: [],
  450. referencedClasses: []
  451. }),
  452. globals.HLInspectorVariablesWidget);
  453. smalltalk.addMethod(
  454. smalltalk.method({
  455. selector: "label",
  456. protocol: 'accessing',
  457. fn: function (){
  458. var self=this;
  459. return smalltalk.withContext(function($ctx1) {
  460. var $1;
  461. $1=_st(self._model())._label();
  462. return $1;
  463. }, function($ctx1) {$ctx1.fill(self,"label",{},globals.HLInspectorVariablesWidget)})},
  464. args: [],
  465. source: "label\x0a\x09^ self model label",
  466. messageSends: ["label", "model"],
  467. referencedClasses: []
  468. }),
  469. globals.HLInspectorVariablesWidget);
  470. smalltalk.addMethod(
  471. smalltalk.method({
  472. selector: "model",
  473. protocol: 'accessing',
  474. fn: function (){
  475. var self=this;
  476. return smalltalk.withContext(function($ctx1) {
  477. var $1;
  478. $1=_st(self._inspector())._model();
  479. return $1;
  480. }, function($ctx1) {$ctx1.fill(self,"model",{},globals.HLInspectorVariablesWidget)})},
  481. args: [],
  482. source: "model\x0a ^ self inspector model",
  483. messageSends: ["model", "inspector"],
  484. referencedClasses: []
  485. }),
  486. globals.HLInspectorVariablesWidget);
  487. smalltalk.addMethod(
  488. smalltalk.method({
  489. selector: "refresh",
  490. protocol: 'actions',
  491. fn: function (){
  492. var self=this;
  493. return smalltalk.withContext(function($ctx1) {
  494. var $1;
  495. $1=_st(self._variables()).__eq(self._items());
  496. if(! smalltalk.assert($1)){
  497. self._resetItems();
  498. globals.HLInspectorVariablesWidget.superclass.fn.prototype._refresh.apply(_st(self), []);
  499. };
  500. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},globals.HLInspectorVariablesWidget)})},
  501. args: [],
  502. source: "refresh\x0a\x09self variables = self items ifFalse: [\x0a\x09\x09self resetItems.\x0a \x09super refresh ]",
  503. messageSends: ["ifFalse:", "=", "variables", "items", "resetItems", "refresh"],
  504. referencedClasses: []
  505. }),
  506. globals.HLInspectorVariablesWidget);
  507. smalltalk.addMethod(
  508. smalltalk.method({
  509. selector: "renderButtonsOn:",
  510. protocol: 'rendering',
  511. fn: function (html){
  512. var self=this;
  513. return smalltalk.withContext(function($ctx1) {
  514. var $1,$2;
  515. $1=_st(html)._button();
  516. _st($1)._class_("btn");
  517. _st($1)._with_("Dive");
  518. $2=_st($1)._onClick_((function(){
  519. return smalltalk.withContext(function($ctx2) {
  520. return self._dive();
  521. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  522. self["@diveButton"]=$2;
  523. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.HLInspectorVariablesWidget)})},
  524. args: ["html"],
  525. source: "renderButtonsOn: html\x0a\x09diveButton := html button \x0a\x09\x09class: 'btn';\x0a\x09\x09with: 'Dive'; \x0a\x09\x09onClick: [ self dive ]",
  526. messageSends: ["class:", "button", "with:", "onClick:", "dive"],
  527. referencedClasses: []
  528. }),
  529. globals.HLInspectorVariablesWidget);
  530. smalltalk.addMethod(
  531. smalltalk.method({
  532. selector: "renderContentOn:",
  533. protocol: 'rendering',
  534. fn: function (html){
  535. var self=this;
  536. return smalltalk.withContext(function($ctx1) {
  537. self._renderHeadOn_(html);
  538. globals.HLInspectorVariablesWidget.superclass.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  539. _st(self._wrapper())._onDblClick_((function(){
  540. return smalltalk.withContext(function($ctx2) {
  541. return self._dive();
  542. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  543. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLInspectorVariablesWidget)})},
  544. args: ["html"],
  545. source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x0a\x09super renderContentOn: html.\x0a\x09self wrapper onDblClick: [ self dive ]",
  546. messageSends: ["renderHeadOn:", "renderContentOn:", "onDblClick:", "wrapper", "dive"],
  547. referencedClasses: []
  548. }),
  549. globals.HLInspectorVariablesWidget);
  550. smalltalk.addMethod(
  551. smalltalk.method({
  552. selector: "renderHeadOn:",
  553. protocol: 'rendering',
  554. fn: function (html){
  555. var self=this;
  556. return smalltalk.withContext(function($ctx1) {
  557. var $1,$2;
  558. $1=_st(html)._div();
  559. _st($1)._class_("list-label");
  560. $2=_st($1)._with_(self._label());
  561. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},globals.HLInspectorVariablesWidget)})},
  562. args: ["html"],
  563. source: "renderHeadOn: html\x0a\x09html div \x0a\x09\x09class: 'list-label';\x0a\x09\x09with: self label",
  564. messageSends: ["class:", "div", "with:", "label"],
  565. referencedClasses: []
  566. }),
  567. globals.HLInspectorVariablesWidget);
  568. smalltalk.addMethod(
  569. smalltalk.method({
  570. selector: "resetItems",
  571. protocol: 'actions',
  572. fn: function (){
  573. var self=this;
  574. self["@items"]=nil;
  575. return self},
  576. args: [],
  577. source: "resetItems\x0a\x09items := nil",
  578. messageSends: [],
  579. referencedClasses: []
  580. }),
  581. globals.HLInspectorVariablesWidget);
  582. smalltalk.addMethod(
  583. smalltalk.method({
  584. selector: "selectItem:",
  585. protocol: 'reactions',
  586. fn: function (anObject){
  587. var self=this;
  588. return smalltalk.withContext(function($ctx1) {
  589. globals.HLInspectorVariablesWidget.superclass.fn.prototype._selectItem_.apply(_st(self), [anObject]);
  590. _st(self._model())._selectedInstVar_(anObject);
  591. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject},globals.HLInspectorVariablesWidget)})},
  592. args: ["anObject"],
  593. source: "selectItem: anObject\x0a\x09super selectItem: anObject.\x0a self model selectedInstVar: anObject",
  594. messageSends: ["selectItem:", "selectedInstVar:", "model"],
  595. referencedClasses: []
  596. }),
  597. globals.HLInspectorVariablesWidget);
  598. smalltalk.addMethod(
  599. smalltalk.method({
  600. selector: "selection",
  601. protocol: 'accessing',
  602. fn: function (){
  603. var self=this;
  604. return smalltalk.withContext(function($ctx1) {
  605. var $1;
  606. $1=_st(self._model())._selection();
  607. return $1;
  608. }, function($ctx1) {$ctx1.fill(self,"selection",{},globals.HLInspectorVariablesWidget)})},
  609. args: [],
  610. source: "selection\x0a\x09^ self model selection",
  611. messageSends: ["selection", "model"],
  612. referencedClasses: []
  613. }),
  614. globals.HLInspectorVariablesWidget);
  615. smalltalk.addMethod(
  616. smalltalk.method({
  617. selector: "variables",
  618. protocol: 'accessing',
  619. fn: function (){
  620. var self=this;
  621. return smalltalk.withContext(function($ctx1) {
  622. var $1;
  623. $1=_st(_st(self._model())._variables())._keys();
  624. return $1;
  625. }, function($ctx1) {$ctx1.fill(self,"variables",{},globals.HLInspectorVariablesWidget)})},
  626. args: [],
  627. source: "variables\x0a\x09^ self model variables keys",
  628. messageSends: ["keys", "variables", "model"],
  629. referencedClasses: []
  630. }),
  631. globals.HLInspectorVariablesWidget);
  632. smalltalk.addClass('HLInspectorWidget', globals.HLWidget, ['model', 'variablesWidget', 'displayWidget', 'codeWidget'], 'Helios-Inspector');
  633. smalltalk.addMethod(
  634. smalltalk.method({
  635. selector: "codeWidget",
  636. protocol: 'accessing',
  637. fn: function (){
  638. var self=this;
  639. return smalltalk.withContext(function($ctx1) {
  640. var $2,$1,$receiver;
  641. $2=self["@codeWidget"];
  642. if(($receiver = $2) == nil || $receiver == null){
  643. self["@codeWidget"]=self._defaultCodeWidget();
  644. $1=self["@codeWidget"];
  645. } else {
  646. $1=$2;
  647. };
  648. return $1;
  649. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},globals.HLInspectorWidget)})},
  650. args: [],
  651. source: "codeWidget\x0a\x09^ codeWidget ifNil: [\x0a\x09\x09codeWidget := self defaultCodeWidget ]",
  652. messageSends: ["ifNil:", "defaultCodeWidget"],
  653. referencedClasses: []
  654. }),
  655. globals.HLInspectorWidget);
  656. smalltalk.addMethod(
  657. smalltalk.method({
  658. selector: "codeWidget:",
  659. protocol: 'accessing',
  660. fn: function (aWidget){
  661. var self=this;
  662. self["@codeWidget"]=aWidget;
  663. return self},
  664. args: ["aWidget"],
  665. source: "codeWidget: aWidget\x0a\x09codeWidget := aWidget",
  666. messageSends: [],
  667. referencedClasses: []
  668. }),
  669. globals.HLInspectorWidget);
  670. smalltalk.addMethod(
  671. smalltalk.method({
  672. selector: "defaultCodeWidget",
  673. protocol: 'defaults',
  674. fn: function (){
  675. var self=this;
  676. function $HLCodeWidget(){return globals.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
  677. return smalltalk.withContext(function($ctx1) {
  678. var $2,$3,$5,$4,$6,$1;
  679. $2=_st($HLCodeWidget())._new();
  680. $3=$2;
  681. $5=self._model();
  682. $ctx1.sendIdx["model"]=1;
  683. $4=_st($5)._code();
  684. _st($3)._model_($4);
  685. _st($2)._receiver_(_st(self._model())._inspectee());
  686. $6=_st($2)._yourself();
  687. $1=$6;
  688. return $1;
  689. }, function($ctx1) {$ctx1.fill(self,"defaultCodeWidget",{},globals.HLInspectorWidget)})},
  690. args: [],
  691. source: "defaultCodeWidget\x0a\x09^ HLCodeWidget new\x0a \x09model: self model code;\x0a \x09receiver: self model inspectee;\x0a \x09yourself",
  692. messageSends: ["model:", "new", "code", "model", "receiver:", "inspectee", "yourself"],
  693. referencedClasses: ["HLCodeWidget"]
  694. }),
  695. globals.HLInspectorWidget);
  696. smalltalk.addMethod(
  697. smalltalk.method({
  698. selector: "displayWidget",
  699. protocol: 'accessing',
  700. fn: function (){
  701. var self=this;
  702. function $HLInspectorDisplayWidget(){return globals.HLInspectorDisplayWidget||(typeof HLInspectorDisplayWidget=="undefined"?nil:HLInspectorDisplayWidget)}
  703. return smalltalk.withContext(function($ctx1) {
  704. var $2,$3,$4,$1,$receiver;
  705. $2=self["@displayWidget"];
  706. if(($receiver = $2) == nil || $receiver == null){
  707. $3=_st($HLInspectorDisplayWidget())._new();
  708. _st($3)._inspector_(self);
  709. $4=_st($3)._yourself();
  710. self["@displayWidget"]=$4;
  711. $1=self["@displayWidget"];
  712. } else {
  713. $1=$2;
  714. };
  715. return $1;
  716. }, function($ctx1) {$ctx1.fill(self,"displayWidget",{},globals.HLInspectorWidget)})},
  717. args: [],
  718. source: "displayWidget\x0a\x09^ displayWidget ifNil: [\x0a\x09\x09displayWidget := HLInspectorDisplayWidget new\x0a \x09\x09inspector: self;\x0a \x09yourself ]",
  719. messageSends: ["ifNil:", "inspector:", "new", "yourself"],
  720. referencedClasses: ["HLInspectorDisplayWidget"]
  721. }),
  722. globals.HLInspectorWidget);
  723. smalltalk.addMethod(
  724. smalltalk.method({
  725. selector: "initialize",
  726. protocol: 'accessing',
  727. fn: function (){
  728. var self=this;
  729. return smalltalk.withContext(function($ctx1) {
  730. globals.HLInspectorWidget.superclass.fn.prototype._initialize.apply(_st(self), []);
  731. self._register();
  732. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.HLInspectorWidget)})},
  733. args: [],
  734. source: "initialize\x0a\x09super initialize.\x0a\x09self register",
  735. messageSends: ["initialize", "register"],
  736. referencedClasses: []
  737. }),
  738. globals.HLInspectorWidget);
  739. smalltalk.addMethod(
  740. smalltalk.method({
  741. selector: "inspect:",
  742. protocol: 'actions',
  743. fn: function (anObject){
  744. var self=this;
  745. return smalltalk.withContext(function($ctx1) {
  746. var $1;
  747. _st(self._model())._inspect_on_(anObject,self);
  748. _st(self._codeWidget())._receiver_(anObject);
  749. self._refreshVariablesWidget();
  750. $1=self._refreshDisplayWidget();
  751. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.HLInspectorWidget)})},
  752. args: ["anObject"],
  753. source: "inspect: anObject\x0a\x09self model inspect: anObject on: self.\x0a\x09self codeWidget receiver: anObject.\x0a \x0a\x09self \x0a \x09refreshVariablesWidget;\x0a\x09\x09refreshDisplayWidget",
  754. messageSends: ["inspect:on:", "model", "receiver:", "codeWidget", "refreshVariablesWidget", "refreshDisplayWidget"],
  755. referencedClasses: []
  756. }),
  757. globals.HLInspectorWidget);
  758. smalltalk.addMethod(
  759. smalltalk.method({
  760. selector: "inspectee",
  761. protocol: 'accessing',
  762. fn: function (){
  763. var self=this;
  764. return smalltalk.withContext(function($ctx1) {
  765. var $1;
  766. $1=_st(self._model())._inspectee();
  767. return $1;
  768. }, function($ctx1) {$ctx1.fill(self,"inspectee",{},globals.HLInspectorWidget)})},
  769. args: [],
  770. source: "inspectee\x0a\x09^ self model inspectee",
  771. messageSends: ["inspectee", "model"],
  772. referencedClasses: []
  773. }),
  774. globals.HLInspectorWidget);
  775. smalltalk.addMethod(
  776. smalltalk.method({
  777. selector: "inspectee:",
  778. protocol: 'accessing',
  779. fn: function (anObject){
  780. var self=this;
  781. return smalltalk.withContext(function($ctx1) {
  782. _st(self._model())._inspectee_(anObject);
  783. return self}, function($ctx1) {$ctx1.fill(self,"inspectee:",{anObject:anObject},globals.HLInspectorWidget)})},
  784. args: ["anObject"],
  785. source: "inspectee: anObject\x0a\x09self model inspectee: anObject",
  786. messageSends: ["inspectee:", "model"],
  787. referencedClasses: []
  788. }),
  789. globals.HLInspectorWidget);
  790. smalltalk.addMethod(
  791. smalltalk.method({
  792. selector: "label",
  793. protocol: 'accessing',
  794. fn: function (){
  795. var self=this;
  796. return smalltalk.withContext(function($ctx1) {
  797. var $1;
  798. $1=_st(self._model())._label();
  799. return $1;
  800. }, function($ctx1) {$ctx1.fill(self,"label",{},globals.HLInspectorWidget)})},
  801. args: [],
  802. source: "label\x0a ^ self model label",
  803. messageSends: ["label", "model"],
  804. referencedClasses: []
  805. }),
  806. globals.HLInspectorWidget);
  807. smalltalk.addMethod(
  808. smalltalk.method({
  809. selector: "model",
  810. protocol: 'accessing',
  811. fn: function (){
  812. var self=this;
  813. function $HLInspectorModel(){return globals.HLInspectorModel||(typeof HLInspectorModel=="undefined"?nil:HLInspectorModel)}
  814. return smalltalk.withContext(function($ctx1) {
  815. var $2,$1,$receiver;
  816. $2=self["@model"];
  817. if(($receiver = $2) == nil || $receiver == null){
  818. self._model_(_st($HLInspectorModel())._new());
  819. $1=self["@model"];
  820. } else {
  821. $1=$2;
  822. };
  823. return $1;
  824. }, function($ctx1) {$ctx1.fill(self,"model",{},globals.HLInspectorWidget)})},
  825. args: [],
  826. source: "model\x0a\x09^ model ifNil: [ \x0a \x09self model: HLInspectorModel new.\x0a\x09\x09model ]",
  827. messageSends: ["ifNil:", "model:", "new"],
  828. referencedClasses: ["HLInspectorModel"]
  829. }),
  830. globals.HLInspectorWidget);
  831. smalltalk.addMethod(
  832. smalltalk.method({
  833. selector: "model:",
  834. protocol: 'accessing',
  835. fn: function (aModel){
  836. var self=this;
  837. return smalltalk.withContext(function($ctx1) {
  838. var $1;
  839. self["@model"]=aModel;
  840. _st(self._codeWidget())._model_(_st(aModel)._code());
  841. self._observeCodeWidget();
  842. self._observeVariablesWidget();
  843. $1=self._observeModel();
  844. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},globals.HLInspectorWidget)})},
  845. args: ["aModel"],
  846. source: "model: aModel\x0a\x09model := aModel. \x0a self codeWidget model: aModel code.\x0a \x0a self \x0a observeCodeWidget;\x0a \x09observeVariablesWidget;\x0a observeModel",
  847. messageSends: ["model:", "codeWidget", "code", "observeCodeWidget", "observeVariablesWidget", "observeModel"],
  848. referencedClasses: []
  849. }),
  850. globals.HLInspectorWidget);
  851. smalltalk.addMethod(
  852. smalltalk.method({
  853. selector: "observeCodeWidget",
  854. protocol: 'actions',
  855. fn: function (){
  856. var self=this;
  857. function $HLDoItExecuted(){return globals.HLDoItExecuted||(typeof HLDoItExecuted=="undefined"?nil:HLDoItExecuted)}
  858. return smalltalk.withContext(function($ctx1) {
  859. _st(_st(self._codeWidget())._announcer())._on_do_($HLDoItExecuted(),(function(){
  860. return smalltalk.withContext(function($ctx2) {
  861. return self._onDoneIt();
  862. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  863. return self}, function($ctx1) {$ctx1.fill(self,"observeCodeWidget",{},globals.HLInspectorWidget)})},
  864. args: [],
  865. source: "observeCodeWidget\x0a\x09self codeWidget announcer \x0a \x09on: HLDoItExecuted \x0a do: [ self onDoneIt ]",
  866. messageSends: ["on:do:", "announcer", "codeWidget", "onDoneIt"],
  867. referencedClasses: ["HLDoItExecuted"]
  868. }),
  869. globals.HLInspectorWidget);
  870. smalltalk.addMethod(
  871. smalltalk.method({
  872. selector: "observeModel",
  873. protocol: 'actions',
  874. fn: function (){
  875. var self=this;
  876. function $HLInstanceVariableSelected(){return globals.HLInstanceVariableSelected||(typeof HLInstanceVariableSelected=="undefined"?nil:HLInstanceVariableSelected)}
  877. return smalltalk.withContext(function($ctx1) {
  878. _st(_st(self._model())._announcer())._on_send_to_($HLInstanceVariableSelected(),"onInstanceVariableSelected",self);
  879. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},globals.HLInspectorWidget)})},
  880. args: [],
  881. source: "observeModel\x0a\x09self model announcer\x0a on: HLInstanceVariableSelected\x0a\x09\x09send: #onInstanceVariableSelected\x0a\x09\x09to: self",
  882. messageSends: ["on:send:to:", "announcer", "model"],
  883. referencedClasses: ["HLInstanceVariableSelected"]
  884. }),
  885. globals.HLInspectorWidget);
  886. smalltalk.addMethod(
  887. smalltalk.method({
  888. selector: "observeVariablesWidget",
  889. protocol: 'actions',
  890. fn: function (){
  891. var self=this;
  892. function $HLDiveRequested(){return globals.HLDiveRequested||(typeof HLDiveRequested=="undefined"?nil:HLDiveRequested)}
  893. return smalltalk.withContext(function($ctx1) {
  894. _st(_st(self._variablesWidget())._announcer())._on_send_to_($HLDiveRequested(),"onDive",self);
  895. return self}, function($ctx1) {$ctx1.fill(self,"observeVariablesWidget",{},globals.HLInspectorWidget)})},
  896. args: [],
  897. source: "observeVariablesWidget\x0a\x09self variablesWidget announcer \x0a on: HLDiveRequested \x0a\x09\x09send: #onDive\x0a\x09\x09to: self",
  898. messageSends: ["on:send:to:", "announcer", "variablesWidget"],
  899. referencedClasses: ["HLDiveRequested"]
  900. }),
  901. globals.HLInspectorWidget);
  902. smalltalk.addMethod(
  903. smalltalk.method({
  904. selector: "onDive",
  905. protocol: 'reactions',
  906. fn: function (){
  907. var self=this;
  908. function $HLInspector(){return globals.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
  909. return smalltalk.withContext(function($ctx1) {
  910. var $1,$2;
  911. $1=_st($HLInspector())._new();
  912. _st($1)._inspect_(_st(self._model())._selectedInstVarObject());
  913. $2=_st($1)._openAsTab();
  914. return self}, function($ctx1) {$ctx1.fill(self,"onDive",{},globals.HLInspectorWidget)})},
  915. args: [],
  916. source: "onDive\x0a\x09HLInspector new \x0a\x09\x09inspect: self model selectedInstVarObject;\x0a\x09\x09openAsTab",
  917. messageSends: ["inspect:", "new", "selectedInstVarObject", "model", "openAsTab"],
  918. referencedClasses: ["HLInspector"]
  919. }),
  920. globals.HLInspectorWidget);
  921. smalltalk.addMethod(
  922. smalltalk.method({
  923. selector: "onDoneIt",
  924. protocol: 'reactions',
  925. fn: function (){
  926. var self=this;
  927. return smalltalk.withContext(function($ctx1) {
  928. self._refresh();
  929. return self}, function($ctx1) {$ctx1.fill(self,"onDoneIt",{},globals.HLInspectorWidget)})},
  930. args: [],
  931. source: "onDoneIt\x0a\x0a\x09self refresh",
  932. messageSends: ["refresh"],
  933. referencedClasses: []
  934. }),
  935. globals.HLInspectorWidget);
  936. smalltalk.addMethod(
  937. smalltalk.method({
  938. selector: "onInspectIt",
  939. protocol: 'reactions',
  940. fn: function (){
  941. var self=this;
  942. return self},
  943. args: [],
  944. source: "onInspectIt",
  945. messageSends: [],
  946. referencedClasses: []
  947. }),
  948. globals.HLInspectorWidget);
  949. smalltalk.addMethod(
  950. smalltalk.method({
  951. selector: "onInstanceVariableSelected",
  952. protocol: 'reactions',
  953. fn: function (){
  954. var self=this;
  955. return smalltalk.withContext(function($ctx1) {
  956. self._refreshDisplayWidget();
  957. return self}, function($ctx1) {$ctx1.fill(self,"onInstanceVariableSelected",{},globals.HLInspectorWidget)})},
  958. args: [],
  959. source: "onInstanceVariableSelected\x0a\x09self refreshDisplayWidget",
  960. messageSends: ["refreshDisplayWidget"],
  961. referencedClasses: []
  962. }),
  963. globals.HLInspectorWidget);
  964. smalltalk.addMethod(
  965. smalltalk.method({
  966. selector: "onPrintIt",
  967. protocol: 'reactions',
  968. fn: function (){
  969. var self=this;
  970. return self},
  971. args: [],
  972. source: "onPrintIt",
  973. messageSends: [],
  974. referencedClasses: []
  975. }),
  976. globals.HLInspectorWidget);
  977. smalltalk.addMethod(
  978. smalltalk.method({
  979. selector: "refresh",
  980. protocol: 'actions',
  981. fn: function (){
  982. var self=this;
  983. return smalltalk.withContext(function($ctx1) {
  984. self._inspect_(self._inspectee());
  985. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},globals.HLInspectorWidget)})},
  986. args: [],
  987. source: "refresh\x0a\x09self inspect: self inspectee",
  988. messageSends: ["inspect:", "inspectee"],
  989. referencedClasses: []
  990. }),
  991. globals.HLInspectorWidget);
  992. smalltalk.addMethod(
  993. smalltalk.method({
  994. selector: "refreshDisplayWidget",
  995. protocol: 'actions',
  996. fn: function (){
  997. var self=this;
  998. return smalltalk.withContext(function($ctx1) {
  999. _st(self._displayWidget())._refresh();
  1000. return self}, function($ctx1) {$ctx1.fill(self,"refreshDisplayWidget",{},globals.HLInspectorWidget)})},
  1001. args: [],
  1002. source: "refreshDisplayWidget\x0a\x09self displayWidget refresh",
  1003. messageSends: ["refresh", "displayWidget"],
  1004. referencedClasses: []
  1005. }),
  1006. globals.HLInspectorWidget);
  1007. smalltalk.addMethod(
  1008. smalltalk.method({
  1009. selector: "refreshVariablesWidget",
  1010. protocol: 'actions',
  1011. fn: function (){
  1012. var self=this;
  1013. return smalltalk.withContext(function($ctx1) {
  1014. _st(self._variablesWidget())._refresh();
  1015. return self}, function($ctx1) {$ctx1.fill(self,"refreshVariablesWidget",{},globals.HLInspectorWidget)})},
  1016. args: [],
  1017. source: "refreshVariablesWidget\x0a\x09self variablesWidget refresh",
  1018. messageSends: ["refresh", "variablesWidget"],
  1019. referencedClasses: []
  1020. }),
  1021. globals.HLInspectorWidget);
  1022. smalltalk.addMethod(
  1023. smalltalk.method({
  1024. selector: "register",
  1025. protocol: 'registration',
  1026. fn: function (){
  1027. var self=this;
  1028. function $HLInspector(){return globals.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
  1029. return smalltalk.withContext(function($ctx1) {
  1030. _st($HLInspector())._register_(self);
  1031. return self}, function($ctx1) {$ctx1.fill(self,"register",{},globals.HLInspectorWidget)})},
  1032. args: [],
  1033. source: "register\x0a\x09HLInspector register: self",
  1034. messageSends: ["register:"],
  1035. referencedClasses: ["HLInspector"]
  1036. }),
  1037. globals.HLInspectorWidget);
  1038. smalltalk.addMethod(
  1039. smalltalk.method({
  1040. selector: "renderContentOn:",
  1041. protocol: 'rendering',
  1042. fn: function (html){
  1043. var self=this;
  1044. function $HLHorizontalSplitter(){return globals.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  1045. function $HLVerticalSplitter(){return globals.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  1046. return smalltalk.withContext(function($ctx1) {
  1047. var $1;
  1048. $1=_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(self._variablesWidget(),self._displayWidget()),self._codeWidget());
  1049. $ctx1.sendIdx["with:with:"]=1;
  1050. _st(html)._with_($1);
  1051. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLInspectorWidget)})},
  1052. args: ["html"],
  1053. source: "renderContentOn: html\x0a \x09html with: (HLHorizontalSplitter\x0a \x09with: (HLVerticalSplitter \x0a with: self variablesWidget\x0a with: self displayWidget)\x0a with: self codeWidget)",
  1054. messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget"],
  1055. referencedClasses: ["HLHorizontalSplitter", "HLVerticalSplitter"]
  1056. }),
  1057. globals.HLInspectorWidget);
  1058. smalltalk.addMethod(
  1059. smalltalk.method({
  1060. selector: "setLabel:",
  1061. protocol: 'actions',
  1062. fn: function (aString){
  1063. var self=this;
  1064. return smalltalk.withContext(function($ctx1) {
  1065. _st(self._model())._label_(aString);
  1066. return self}, function($ctx1) {$ctx1.fill(self,"setLabel:",{aString:aString},globals.HLInspectorWidget)})},
  1067. args: ["aString"],
  1068. source: "setLabel: aString\x0a\x09self model label: aString",
  1069. messageSends: ["label:", "model"],
  1070. referencedClasses: []
  1071. }),
  1072. globals.HLInspectorWidget);
  1073. smalltalk.addMethod(
  1074. smalltalk.method({
  1075. selector: "setVariables:",
  1076. protocol: 'actions',
  1077. fn: function (aDictionary){
  1078. var self=this;
  1079. return smalltalk.withContext(function($ctx1) {
  1080. _st(self._model())._variables_(aDictionary);
  1081. return self}, function($ctx1) {$ctx1.fill(self,"setVariables:",{aDictionary:aDictionary},globals.HLInspectorWidget)})},
  1082. args: ["aDictionary"],
  1083. source: "setVariables: aDictionary\x0a\x09self model variables: aDictionary",
  1084. messageSends: ["variables:", "model"],
  1085. referencedClasses: []
  1086. }),
  1087. globals.HLInspectorWidget);
  1088. smalltalk.addMethod(
  1089. smalltalk.method({
  1090. selector: "tabLabel",
  1091. protocol: 'accessing',
  1092. fn: function (){
  1093. var self=this;
  1094. return "Inspector";
  1095. },
  1096. args: [],
  1097. source: "tabLabel\x0a ^ 'Inspector'",
  1098. messageSends: [],
  1099. referencedClasses: []
  1100. }),
  1101. globals.HLInspectorWidget);
  1102. smalltalk.addMethod(
  1103. smalltalk.method({
  1104. selector: "unregister",
  1105. protocol: 'registration',
  1106. fn: function (){
  1107. var self=this;
  1108. function $HLInspector(){return globals.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
  1109. return smalltalk.withContext(function($ctx1) {
  1110. globals.HLInspectorWidget.superclass.fn.prototype._unregister.apply(_st(self), []);
  1111. _st($HLInspector())._unregister_(self);
  1112. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},globals.HLInspectorWidget)})},
  1113. args: [],
  1114. source: "unregister\x0a\x09super unregister.\x0a\x09HLInspector unregister: self",
  1115. messageSends: ["unregister", "unregister:"],
  1116. referencedClasses: ["HLInspector"]
  1117. }),
  1118. globals.HLInspectorWidget);
  1119. smalltalk.addMethod(
  1120. smalltalk.method({
  1121. selector: "variablesWidget",
  1122. protocol: 'accessing',
  1123. fn: function (){
  1124. var self=this;
  1125. function $HLInspectorVariablesWidget(){return globals.HLInspectorVariablesWidget||(typeof HLInspectorVariablesWidget=="undefined"?nil:HLInspectorVariablesWidget)}
  1126. return smalltalk.withContext(function($ctx1) {
  1127. var $2,$3,$4,$1,$receiver;
  1128. $2=self["@variablesWidget"];
  1129. if(($receiver = $2) == nil || $receiver == null){
  1130. $3=_st($HLInspectorVariablesWidget())._new();
  1131. _st($3)._inspector_(self);
  1132. $4=_st($3)._yourself();
  1133. self["@variablesWidget"]=$4;
  1134. $1=self["@variablesWidget"];
  1135. } else {
  1136. $1=$2;
  1137. };
  1138. return $1;
  1139. }, function($ctx1) {$ctx1.fill(self,"variablesWidget",{},globals.HLInspectorWidget)})},
  1140. args: [],
  1141. source: "variablesWidget\x0a\x09^ variablesWidget ifNil: [\x0a\x09\x09variablesWidget := HLInspectorVariablesWidget new\x0a \x09\x09inspector: self;\x0a \x09yourself ]",
  1142. messageSends: ["ifNil:", "inspector:", "new", "yourself"],
  1143. referencedClasses: ["HLInspectorVariablesWidget"]
  1144. }),
  1145. globals.HLInspectorWidget);
  1146. smalltalk.addClass('HLInspector', globals.HLInspectorWidget, [], 'Helios-Inspector');
  1147. smalltalk.addMethod(
  1148. smalltalk.method({
  1149. selector: "inspect:",
  1150. protocol: 'actions',
  1151. fn: function (anObject){
  1152. var self=this;
  1153. return smalltalk.withContext(function($ctx1) {
  1154. self._setTabLabel_(_st(anObject)._printString());
  1155. globals.HLInspector.superclass.fn.prototype._inspect_.apply(_st(self), [anObject]);
  1156. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.HLInspector)})},
  1157. args: ["anObject"],
  1158. source: "inspect: anObject\x0a\x09self setTabLabel: anObject printString.\x0a\x09super inspect: anObject",
  1159. messageSends: ["setTabLabel:", "printString", "inspect:"],
  1160. referencedClasses: []
  1161. }),
  1162. globals.HLInspector);
  1163. smalltalk.addMethod(
  1164. smalltalk.method({
  1165. selector: "renderContentOn:",
  1166. protocol: 'rendering',
  1167. fn: function (html){
  1168. var self=this;
  1169. function $HLContainer(){return globals.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  1170. function $HLHorizontalSplitter(){return globals.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  1171. function $HLVerticalSplitter(){return globals.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  1172. return smalltalk.withContext(function($ctx1) {
  1173. var $4,$3,$2,$1;
  1174. $4=self._variablesWidget();
  1175. $ctx1.sendIdx["variablesWidget"]=1;
  1176. $3=_st($HLVerticalSplitter())._with_with_($4,self._displayWidget());
  1177. $2=_st($HLHorizontalSplitter())._with_with_($3,self._codeWidget());
  1178. $ctx1.sendIdx["with:with:"]=1;
  1179. $1=_st($HLContainer())._with_($2);
  1180. _st(html)._with_($1);
  1181. $ctx1.sendIdx["with:"]=1;
  1182. _st(self._variablesWidget())._focus();
  1183. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLInspector)})},
  1184. args: ["html"],
  1185. source: "renderContentOn: html\x0a \x09html with: (HLContainer with: (HLHorizontalSplitter\x0a \x09with: (HLVerticalSplitter \x0a with: self variablesWidget\x0a with: self displayWidget)\x0a with: self codeWidget)).\x0a\x09\x0a\x09self variablesWidget focus",
  1186. messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget", "focus"],
  1187. referencedClasses: ["HLContainer", "HLHorizontalSplitter", "HLVerticalSplitter"]
  1188. }),
  1189. globals.HLInspector);
  1190. globals.HLInspector.klass.iVarNames = ['inspectors'];
  1191. smalltalk.addMethod(
  1192. smalltalk.method({
  1193. selector: "canBeOpenAsTab",
  1194. protocol: 'testing',
  1195. fn: function (){
  1196. var self=this;
  1197. return false;
  1198. },
  1199. args: [],
  1200. source: "canBeOpenAsTab\x0a\x09^ false",
  1201. messageSends: [],
  1202. referencedClasses: []
  1203. }),
  1204. globals.HLInspector.klass);
  1205. smalltalk.addMethod(
  1206. smalltalk.method({
  1207. selector: "initialize",
  1208. protocol: 'initialization',
  1209. fn: function (){
  1210. var self=this;
  1211. return smalltalk.withContext(function($ctx1) {
  1212. globals.HLInspector.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
  1213. self._watchChanges();
  1214. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.HLInspector.klass)})},
  1215. args: [],
  1216. source: "initialize\x0a\x09super initialize.\x0a\x09self watchChanges",
  1217. messageSends: ["initialize", "watchChanges"],
  1218. referencedClasses: []
  1219. }),
  1220. globals.HLInspector.klass);
  1221. smalltalk.addMethod(
  1222. smalltalk.method({
  1223. selector: "inspect:",
  1224. protocol: 'actions',
  1225. fn: function (anObject){
  1226. var self=this;
  1227. return smalltalk.withContext(function($ctx1) {
  1228. var $1,$2;
  1229. $1=self._new();
  1230. _st($1)._openAsTab();
  1231. $2=_st($1)._inspect_(anObject);
  1232. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.HLInspector.klass)})},
  1233. args: ["anObject"],
  1234. source: "inspect: anObject\x0a\x09self new\x0a\x09\x09openAsTab;\x0a\x09\x09inspect: anObject",
  1235. messageSends: ["openAsTab", "new", "inspect:"],
  1236. referencedClasses: []
  1237. }),
  1238. globals.HLInspector.klass);
  1239. smalltalk.addMethod(
  1240. smalltalk.method({
  1241. selector: "inspectors",
  1242. protocol: 'accessing',
  1243. fn: function (){
  1244. var self=this;
  1245. function $OrderedCollection(){return globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  1246. return smalltalk.withContext(function($ctx1) {
  1247. var $2,$1,$receiver;
  1248. $2=self["@inspectors"];
  1249. if(($receiver = $2) == nil || $receiver == null){
  1250. self["@inspectors"]=_st($OrderedCollection())._new();
  1251. $1=self["@inspectors"];
  1252. } else {
  1253. $1=$2;
  1254. };
  1255. return $1;
  1256. }, function($ctx1) {$ctx1.fill(self,"inspectors",{},globals.HLInspector.klass)})},
  1257. args: [],
  1258. source: "inspectors\x0a\x09^ inspectors ifNil: [ inspectors := OrderedCollection new ]",
  1259. messageSends: ["ifNil:", "new"],
  1260. referencedClasses: ["OrderedCollection"]
  1261. }),
  1262. globals.HLInspector.klass);
  1263. smalltalk.addMethod(
  1264. smalltalk.method({
  1265. selector: "register:",
  1266. protocol: 'registration',
  1267. fn: function (anInspector){
  1268. var self=this;
  1269. return smalltalk.withContext(function($ctx1) {
  1270. _st(self._inspectors())._add_(anInspector);
  1271. return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},globals.HLInspector.klass)})},
  1272. args: ["anInspector"],
  1273. source: "register: anInspector\x0a\x09self inspectors add: anInspector",
  1274. messageSends: ["add:", "inspectors"],
  1275. referencedClasses: []
  1276. }),
  1277. globals.HLInspector.klass);
  1278. smalltalk.addMethod(
  1279. smalltalk.method({
  1280. selector: "tabClass",
  1281. protocol: 'accessing',
  1282. fn: function (){
  1283. var self=this;
  1284. return "inspector";
  1285. },
  1286. args: [],
  1287. source: "tabClass\x0a\x09^ 'inspector'",
  1288. messageSends: [],
  1289. referencedClasses: []
  1290. }),
  1291. globals.HLInspector.klass);
  1292. smalltalk.addMethod(
  1293. smalltalk.method({
  1294. selector: "tabLabel",
  1295. protocol: 'accessing',
  1296. fn: function (){
  1297. var self=this;
  1298. return "Inspector";
  1299. },
  1300. args: [],
  1301. source: "tabLabel\x0a\x09^ 'Inspector'",
  1302. messageSends: [],
  1303. referencedClasses: []
  1304. }),
  1305. globals.HLInspector.klass);
  1306. smalltalk.addMethod(
  1307. smalltalk.method({
  1308. selector: "tabPriority",
  1309. protocol: 'accessing',
  1310. fn: function (){
  1311. var self=this;
  1312. return (10);
  1313. },
  1314. args: [],
  1315. source: "tabPriority\x0a\x09^ 10",
  1316. messageSends: [],
  1317. referencedClasses: []
  1318. }),
  1319. globals.HLInspector.klass);
  1320. smalltalk.addMethod(
  1321. smalltalk.method({
  1322. selector: "unregister:",
  1323. protocol: 'registration',
  1324. fn: function (anInspector){
  1325. var self=this;
  1326. return smalltalk.withContext(function($ctx1) {
  1327. _st(self._inspectors())._remove_(anInspector);
  1328. return self}, function($ctx1) {$ctx1.fill(self,"unregister:",{anInspector:anInspector},globals.HLInspector.klass)})},
  1329. args: ["anInspector"],
  1330. source: "unregister: anInspector\x0a\x09self inspectors remove: anInspector",
  1331. messageSends: ["remove:", "inspectors"],
  1332. referencedClasses: []
  1333. }),
  1334. globals.HLInspector.klass);
  1335. smalltalk.addMethod(
  1336. smalltalk.method({
  1337. selector: "watchChanges",
  1338. protocol: 'initialization',
  1339. fn: function (){
  1340. var self=this;
  1341. return smalltalk.withContext(function($ctx1) {
  1342. _st((function(){
  1343. return smalltalk.withContext(function($ctx2) {
  1344. return _st(self._inspectors())._do_((function(each){
  1345. return smalltalk.withContext(function($ctx3) {
  1346. return _st(each)._refresh();
  1347. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  1348. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._valueWithInterval_((500));
  1349. return self}, function($ctx1) {$ctx1.fill(self,"watchChanges",{},globals.HLInspector.klass)})},
  1350. args: [],
  1351. source: "watchChanges\x0a\x09[ self inspectors do: [ :each | each refresh ] ]\x0a\x09\x09valueWithInterval: 500",
  1352. messageSends: ["valueWithInterval:", "do:", "inspectors", "refresh"],
  1353. referencedClasses: []
  1354. }),
  1355. globals.HLInspector.klass);
  1356. });