2
0

Helios-Inspector.js 43 KB

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