Helios-Inspector.js 47 KB

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