Helios-Inspector.js 42 KB

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