Helios-Inspector.js 45 KB

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