Helios-Inspector.js 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450
  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 $1,$3,$4,$2;
  1061. $1=html;
  1062. $3=$HLHorizontalSplitter();
  1063. $4=_st($HLVerticalSplitter())._with_with_(self._variablesWidget(),self._displayWidget());
  1064. $2=_st($3)._with_with_($4,self._codeWidget());
  1065. $ctx1.sendIdx["with:with:"]=1;
  1066. _st($1)._with_($2);
  1067. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspectorWidget)})},
  1068. args: ["html"],
  1069. source: "renderContentOn: html\x0a \x09html with: (HLHorizontalSplitter\x0a \x09with: (HLVerticalSplitter \x0a with: self variablesWidget\x0a with: self displayWidget)\x0a with: self codeWidget)",
  1070. messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget"],
  1071. referencedClasses: ["HLHorizontalSplitter", "HLVerticalSplitter"]
  1072. }),
  1073. smalltalk.HLInspectorWidget);
  1074. smalltalk.addMethod(
  1075. smalltalk.method({
  1076. selector: "setLabel:",
  1077. category: 'actions',
  1078. fn: function (aString){
  1079. var self=this;
  1080. return smalltalk.withContext(function($ctx1) {
  1081. _st(self._model())._label_(aString);
  1082. return self}, function($ctx1) {$ctx1.fill(self,"setLabel:",{aString:aString},smalltalk.HLInspectorWidget)})},
  1083. args: ["aString"],
  1084. source: "setLabel: aString\x0a\x09self model label: aString",
  1085. messageSends: ["label:", "model"],
  1086. referencedClasses: []
  1087. }),
  1088. smalltalk.HLInspectorWidget);
  1089. smalltalk.addMethod(
  1090. smalltalk.method({
  1091. selector: "setVariables:",
  1092. category: 'actions',
  1093. fn: function (aDictionary){
  1094. var self=this;
  1095. return smalltalk.withContext(function($ctx1) {
  1096. _st(self._model())._variables_(aDictionary);
  1097. return self}, function($ctx1) {$ctx1.fill(self,"setVariables:",{aDictionary:aDictionary},smalltalk.HLInspectorWidget)})},
  1098. args: ["aDictionary"],
  1099. source: "setVariables: aDictionary\x0a\x09self model variables: aDictionary",
  1100. messageSends: ["variables:", "model"],
  1101. referencedClasses: []
  1102. }),
  1103. smalltalk.HLInspectorWidget);
  1104. smalltalk.addMethod(
  1105. smalltalk.method({
  1106. selector: "tabLabel",
  1107. category: 'accessing',
  1108. fn: function (){
  1109. var self=this;
  1110. return smalltalk.withContext(function($ctx1) {
  1111. return "Inspector";
  1112. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLInspectorWidget)})},
  1113. args: [],
  1114. source: "tabLabel\x0a ^ 'Inspector'",
  1115. messageSends: [],
  1116. referencedClasses: []
  1117. }),
  1118. smalltalk.HLInspectorWidget);
  1119. smalltalk.addMethod(
  1120. smalltalk.method({
  1121. selector: "unregister",
  1122. category: 'registration',
  1123. fn: function (){
  1124. var self=this;
  1125. function $HLInspector(){return smalltalk.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
  1126. return smalltalk.withContext(function($ctx1) {
  1127. smalltalk.HLInspectorWidget.superclass.fn.prototype._unregister.apply(_st(self), []);
  1128. _st($HLInspector())._unregister_(self);
  1129. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLInspectorWidget)})},
  1130. args: [],
  1131. source: "unregister\x0a\x09super unregister.\x0a\x09HLInspector unregister: self",
  1132. messageSends: ["unregister", "unregister:"],
  1133. referencedClasses: ["HLInspector"]
  1134. }),
  1135. smalltalk.HLInspectorWidget);
  1136. smalltalk.addMethod(
  1137. smalltalk.method({
  1138. selector: "variablesWidget",
  1139. category: 'accessing',
  1140. fn: function (){
  1141. var self=this;
  1142. function $HLInspectorVariablesWidget(){return smalltalk.HLInspectorVariablesWidget||(typeof HLInspectorVariablesWidget=="undefined"?nil:HLInspectorVariablesWidget)}
  1143. return smalltalk.withContext(function($ctx1) {
  1144. var $2,$3,$4,$1;
  1145. $2=self["@variablesWidget"];
  1146. if(($receiver = $2) == nil || $receiver == null){
  1147. $3=_st($HLInspectorVariablesWidget())._new();
  1148. _st($3)._model_(self._model());
  1149. $4=_st($3)._yourself();
  1150. self["@variablesWidget"]=$4;
  1151. $1=self["@variablesWidget"];
  1152. } else {
  1153. $1=$2;
  1154. };
  1155. return $1;
  1156. }, function($ctx1) {$ctx1.fill(self,"variablesWidget",{},smalltalk.HLInspectorWidget)})},
  1157. args: [],
  1158. source: "variablesWidget\x0a\x09^ variablesWidget ifNil: [\x0a\x09\x09variablesWidget := HLInspectorVariablesWidget new\x0a \x09\x09model: self model;\x0a \x09yourself ]",
  1159. messageSends: ["ifNil:", "model:", "new", "model", "yourself"],
  1160. referencedClasses: ["HLInspectorVariablesWidget"]
  1161. }),
  1162. smalltalk.HLInspectorWidget);
  1163. smalltalk.addClass('HLInspector', smalltalk.HLInspectorWidget, [], 'Helios-Inspector');
  1164. smalltalk.addMethod(
  1165. smalltalk.method({
  1166. selector: "renderContentOn:",
  1167. category: 'rendering',
  1168. fn: function (html){
  1169. var self=this;
  1170. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  1171. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  1172. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  1173. return smalltalk.withContext(function($ctx1) {
  1174. var $2,$4,$6,$8,$9,$7,$5,$3,$1,$10;
  1175. $2=html;
  1176. $4=$HLContainer();
  1177. $6=$HLHorizontalSplitter();
  1178. $8=$HLVerticalSplitter();
  1179. $9=self._variablesWidget();
  1180. $ctx1.sendIdx["variablesWidget"]=1;
  1181. $7=_st($8)._with_with_($9,self._displayWidget());
  1182. $5=_st($6)._with_with_($7,self._codeWidget());
  1183. $ctx1.sendIdx["with:with:"]=1;
  1184. $3=_st($4)._with_($5);
  1185. $1=_st($2)._with_($3);
  1186. $ctx1.sendIdx["with:"]=1;
  1187. $10=self._variablesWidget();
  1188. _st($10)._focus();
  1189. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspector)})},
  1190. args: ["html"],
  1191. 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",
  1192. messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget", "focus"],
  1193. referencedClasses: ["HLContainer", "HLHorizontalSplitter", "HLVerticalSplitter"]
  1194. }),
  1195. smalltalk.HLInspector);
  1196. smalltalk.HLInspector.klass.iVarNames = ['inspectors'];
  1197. smalltalk.addMethod(
  1198. smalltalk.method({
  1199. selector: "canBeOpenAsTab",
  1200. category: 'testing',
  1201. fn: function (){
  1202. var self=this;
  1203. return smalltalk.withContext(function($ctx1) {
  1204. return false;
  1205. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLInspector.klass)})},
  1206. args: [],
  1207. source: "canBeOpenAsTab\x0a\x09^ false",
  1208. messageSends: [],
  1209. referencedClasses: []
  1210. }),
  1211. smalltalk.HLInspector.klass);
  1212. smalltalk.addMethod(
  1213. smalltalk.method({
  1214. selector: "initialize",
  1215. category: 'initialization',
  1216. fn: function (){
  1217. var self=this;
  1218. return smalltalk.withContext(function($ctx1) {
  1219. smalltalk.HLInspector.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
  1220. self._watchChanges();
  1221. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLInspector.klass)})},
  1222. args: [],
  1223. source: "initialize\x0a\x09super initialize.\x0a\x09self watchChanges",
  1224. messageSends: ["initialize", "watchChanges"],
  1225. referencedClasses: []
  1226. }),
  1227. smalltalk.HLInspector.klass);
  1228. smalltalk.addMethod(
  1229. smalltalk.method({
  1230. selector: "inspect:",
  1231. category: 'actions',
  1232. fn: function (anObject){
  1233. var self=this;
  1234. return smalltalk.withContext(function($ctx1) {
  1235. var $1,$2;
  1236. $1=self._new();
  1237. _st($1)._inspect_(anObject);
  1238. $2=_st($1)._openAsTab();
  1239. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.HLInspector.klass)})},
  1240. args: ["anObject"],
  1241. source: "inspect: anObject\x0a\x09self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09openAsTab",
  1242. messageSends: ["inspect:", "new", "openAsTab"],
  1243. referencedClasses: []
  1244. }),
  1245. smalltalk.HLInspector.klass);
  1246. smalltalk.addMethod(
  1247. smalltalk.method({
  1248. selector: "inspectors",
  1249. category: 'accessing',
  1250. fn: function (){
  1251. var self=this;
  1252. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  1253. return smalltalk.withContext(function($ctx1) {
  1254. var $2,$1;
  1255. $2=self["@inspectors"];
  1256. if(($receiver = $2) == nil || $receiver == null){
  1257. self["@inspectors"]=_st($OrderedCollection())._new();
  1258. $1=self["@inspectors"];
  1259. } else {
  1260. $1=$2;
  1261. };
  1262. return $1;
  1263. }, function($ctx1) {$ctx1.fill(self,"inspectors",{},smalltalk.HLInspector.klass)})},
  1264. args: [],
  1265. source: "inspectors\x0a\x09^ inspectors ifNil: [ inspectors := OrderedCollection new ]",
  1266. messageSends: ["ifNil:", "new"],
  1267. referencedClasses: ["OrderedCollection"]
  1268. }),
  1269. smalltalk.HLInspector.klass);
  1270. smalltalk.addMethod(
  1271. smalltalk.method({
  1272. selector: "register:",
  1273. category: 'registration',
  1274. fn: function (anInspector){
  1275. var self=this;
  1276. return smalltalk.withContext(function($ctx1) {
  1277. _st(self._inspectors())._add_(anInspector);
  1278. return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.HLInspector.klass)})},
  1279. args: ["anInspector"],
  1280. source: "register: anInspector\x0a\x09self inspectors add: anInspector",
  1281. messageSends: ["add:", "inspectors"],
  1282. referencedClasses: []
  1283. }),
  1284. smalltalk.HLInspector.klass);
  1285. smalltalk.addMethod(
  1286. smalltalk.method({
  1287. selector: "tabClass",
  1288. category: 'accessing',
  1289. fn: function (){
  1290. var self=this;
  1291. return smalltalk.withContext(function($ctx1) {
  1292. return "inspector";
  1293. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLInspector.klass)})},
  1294. args: [],
  1295. source: "tabClass\x0a\x09^ 'inspector'",
  1296. messageSends: [],
  1297. referencedClasses: []
  1298. }),
  1299. smalltalk.HLInspector.klass);
  1300. smalltalk.addMethod(
  1301. smalltalk.method({
  1302. selector: "tabLabel",
  1303. category: 'accessing',
  1304. fn: function (){
  1305. var self=this;
  1306. return smalltalk.withContext(function($ctx1) {
  1307. return "Inspector";
  1308. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLInspector.klass)})},
  1309. args: [],
  1310. source: "tabLabel\x0a\x09^ 'Inspector'",
  1311. messageSends: [],
  1312. referencedClasses: []
  1313. }),
  1314. smalltalk.HLInspector.klass);
  1315. smalltalk.addMethod(
  1316. smalltalk.method({
  1317. selector: "tabPriority",
  1318. category: 'accessing',
  1319. fn: function (){
  1320. var self=this;
  1321. return smalltalk.withContext(function($ctx1) {
  1322. return (10);
  1323. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLInspector.klass)})},
  1324. args: [],
  1325. source: "tabPriority\x0a\x09^ 10",
  1326. messageSends: [],
  1327. referencedClasses: []
  1328. }),
  1329. smalltalk.HLInspector.klass);
  1330. smalltalk.addMethod(
  1331. smalltalk.method({
  1332. selector: "unregister:",
  1333. category: 'registration',
  1334. fn: function (anInspector){
  1335. var self=this;
  1336. return smalltalk.withContext(function($ctx1) {
  1337. _st(self._inspectors())._remove_(anInspector);
  1338. return self}, function($ctx1) {$ctx1.fill(self,"unregister:",{anInspector:anInspector},smalltalk.HLInspector.klass)})},
  1339. args: ["anInspector"],
  1340. source: "unregister: anInspector\x0a\x09self inspectors remove: anInspector",
  1341. messageSends: ["remove:", "inspectors"],
  1342. referencedClasses: []
  1343. }),
  1344. smalltalk.HLInspector.klass);
  1345. smalltalk.addMethod(
  1346. smalltalk.method({
  1347. selector: "watchChanges",
  1348. category: 'initialization',
  1349. fn: function (){
  1350. var self=this;
  1351. return smalltalk.withContext(function($ctx1) {
  1352. _st((function(){
  1353. return smalltalk.withContext(function($ctx2) {
  1354. return _st(self._inspectors())._do_((function(each){
  1355. return smalltalk.withContext(function($ctx3) {
  1356. return _st(each)._refresh();
  1357. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  1358. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._valueWithInterval_((500));
  1359. return self}, function($ctx1) {$ctx1.fill(self,"watchChanges",{},smalltalk.HLInspector.klass)})},
  1360. args: [],
  1361. source: "watchChanges\x0a\x09[ self inspectors do: [ :each | each refresh ] ]\x0a\x09\x09valueWithInterval: 500",
  1362. messageSends: ["valueWithInterval:", "do:", "inspectors", "refresh"],
  1363. referencedClasses: []
  1364. }),
  1365. smalltalk.HLInspector.klass);
  1366. });