Helios-Inspector.js 43 KB

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