2
0

Helios-Inspector.js 47 KB

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