1
0

Helios-Inspector.js 47 KB

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