Helios-Inspector.js 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446
  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. return smalltalk.withContext(function($ctx1) {
  640. var $2,$1;
  641. $2=self["@codeWidget"];
  642. if(($receiver = $2) == nil || $receiver == null){
  643. self["@codeWidget"]=self._defaultCodeWidget();
  644. $1=self["@codeWidget"];
  645. } else {
  646. $1=$2;
  647. };
  648. return $1;
  649. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},globals.HLInspectorWidget)})},
  650. args: [],
  651. source: "codeWidget\x0a\x09^ codeWidget ifNil: [\x0a\x09\x09codeWidget := self defaultCodeWidget ]",
  652. messageSends: ["ifNil:", "defaultCodeWidget"],
  653. referencedClasses: []
  654. }),
  655. globals.HLInspectorWidget);
  656. smalltalk.addMethod(
  657. smalltalk.method({
  658. selector: "codeWidget:",
  659. protocol: 'accessing',
  660. fn: function (aWidget){
  661. var self=this;
  662. self["@codeWidget"]=aWidget;
  663. return self},
  664. args: ["aWidget"],
  665. source: "codeWidget: aWidget\x0a\x09codeWidget := aWidget",
  666. messageSends: [],
  667. referencedClasses: []
  668. }),
  669. globals.HLInspectorWidget);
  670. smalltalk.addMethod(
  671. smalltalk.method({
  672. selector: "defaultCodeWidget",
  673. protocol: 'defaults',
  674. fn: function (){
  675. var self=this;
  676. function $HLCodeWidget(){return globals.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
  677. return smalltalk.withContext(function($ctx1) {
  678. var $2,$3,$5,$4,$6,$1;
  679. $2=_st($HLCodeWidget())._new();
  680. $3=$2;
  681. $5=self._model();
  682. $ctx1.sendIdx["model"]=1;
  683. $4=_st($5)._code();
  684. _st($3)._model_($4);
  685. _st($2)._receiver_(_st(self._model())._inspectee());
  686. $6=_st($2)._yourself();
  687. $1=$6;
  688. return $1;
  689. }, function($ctx1) {$ctx1.fill(self,"defaultCodeWidget",{},globals.HLInspectorWidget)})},
  690. args: [],
  691. source: "defaultCodeWidget\x0a\x09^ HLCodeWidget new\x0a \x09model: self model code;\x0a \x09receiver: self model inspectee;\x0a \x09yourself",
  692. messageSends: ["model:", "new", "code", "model", "receiver:", "inspectee", "yourself"],
  693. referencedClasses: ["HLCodeWidget"]
  694. }),
  695. globals.HLInspectorWidget);
  696. smalltalk.addMethod(
  697. smalltalk.method({
  698. selector: "displayWidget",
  699. protocol: 'accessing',
  700. fn: function (){
  701. var self=this;
  702. function $HLInspectorDisplayWidget(){return globals.HLInspectorDisplayWidget||(typeof HLInspectorDisplayWidget=="undefined"?nil:HLInspectorDisplayWidget)}
  703. return smalltalk.withContext(function($ctx1) {
  704. var $2,$3,$4,$1;
  705. $2=self["@displayWidget"];
  706. if(($receiver = $2) == nil || $receiver == null){
  707. $3=_st($HLInspectorDisplayWidget())._new();
  708. _st($3)._inspector_(self);
  709. $4=_st($3)._yourself();
  710. self["@displayWidget"]=$4;
  711. $1=self["@displayWidget"];
  712. } else {
  713. $1=$2;
  714. };
  715. return $1;
  716. }, function($ctx1) {$ctx1.fill(self,"displayWidget",{},globals.HLInspectorWidget)})},
  717. args: [],
  718. source: "displayWidget\x0a\x09^ displayWidget ifNil: [\x0a\x09\x09displayWidget := HLInspectorDisplayWidget new\x0a \x09\x09inspector: self;\x0a \x09yourself ]",
  719. messageSends: ["ifNil:", "inspector:", "new", "yourself"],
  720. referencedClasses: ["HLInspectorDisplayWidget"]
  721. }),
  722. globals.HLInspectorWidget);
  723. smalltalk.addMethod(
  724. smalltalk.method({
  725. selector: "initialize",
  726. protocol: 'accessing',
  727. fn: function (){
  728. var self=this;
  729. return smalltalk.withContext(function($ctx1) {
  730. globals.HLInspectorWidget.superclass.fn.prototype._initialize.apply(_st(self), []);
  731. self._register();
  732. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.HLInspectorWidget)})},
  733. args: [],
  734. source: "initialize\x0a\x09super initialize.\x0a\x09self register",
  735. messageSends: ["initialize", "register"],
  736. referencedClasses: []
  737. }),
  738. globals.HLInspectorWidget);
  739. smalltalk.addMethod(
  740. smalltalk.method({
  741. selector: "inspect:",
  742. protocol: 'actions',
  743. fn: function (anObject){
  744. var self=this;
  745. return smalltalk.withContext(function($ctx1) {
  746. var $1;
  747. _st(self._model())._inspect_on_(anObject,self);
  748. _st(self._codeWidget())._receiver_(anObject);
  749. self._refreshVariablesWidget();
  750. $1=self._refreshDisplayWidget();
  751. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.HLInspectorWidget)})},
  752. args: ["anObject"],
  753. source: "inspect: anObject\x0a\x09self model inspect: anObject on: self.\x0a\x09self codeWidget receiver: anObject.\x0a \x0a\x09self \x0a \x09refreshVariablesWidget;\x0a\x09\x09refreshDisplayWidget",
  754. messageSends: ["inspect:on:", "model", "receiver:", "codeWidget", "refreshVariablesWidget", "refreshDisplayWidget"],
  755. referencedClasses: []
  756. }),
  757. globals.HLInspectorWidget);
  758. smalltalk.addMethod(
  759. smalltalk.method({
  760. selector: "inspectee",
  761. protocol: 'accessing',
  762. fn: function (){
  763. var self=this;
  764. return smalltalk.withContext(function($ctx1) {
  765. var $1;
  766. $1=_st(self._model())._inspectee();
  767. return $1;
  768. }, function($ctx1) {$ctx1.fill(self,"inspectee",{},globals.HLInspectorWidget)})},
  769. args: [],
  770. source: "inspectee\x0a\x09^ self model inspectee",
  771. messageSends: ["inspectee", "model"],
  772. referencedClasses: []
  773. }),
  774. globals.HLInspectorWidget);
  775. smalltalk.addMethod(
  776. smalltalk.method({
  777. selector: "inspectee:",
  778. protocol: 'accessing',
  779. fn: function (anObject){
  780. var self=this;
  781. return smalltalk.withContext(function($ctx1) {
  782. _st(self._model())._inspectee_(anObject);
  783. return self}, function($ctx1) {$ctx1.fill(self,"inspectee:",{anObject:anObject},globals.HLInspectorWidget)})},
  784. args: ["anObject"],
  785. source: "inspectee: anObject\x0a\x09self model inspectee: anObject",
  786. messageSends: ["inspectee:", "model"],
  787. referencedClasses: []
  788. }),
  789. globals.HLInspectorWidget);
  790. smalltalk.addMethod(
  791. smalltalk.method({
  792. selector: "label",
  793. protocol: 'accessing',
  794. fn: function (){
  795. var self=this;
  796. return smalltalk.withContext(function($ctx1) {
  797. var $1;
  798. $1=_st(self._model())._label();
  799. return $1;
  800. }, function($ctx1) {$ctx1.fill(self,"label",{},globals.HLInspectorWidget)})},
  801. args: [],
  802. source: "label\x0a ^ self model label",
  803. messageSends: ["label", "model"],
  804. referencedClasses: []
  805. }),
  806. globals.HLInspectorWidget);
  807. smalltalk.addMethod(
  808. smalltalk.method({
  809. selector: "model",
  810. protocol: 'accessing',
  811. fn: function (){
  812. var self=this;
  813. function $HLInspectorModel(){return globals.HLInspectorModel||(typeof HLInspectorModel=="undefined"?nil:HLInspectorModel)}
  814. return smalltalk.withContext(function($ctx1) {
  815. var $2,$1;
  816. $2=self["@model"];
  817. if(($receiver = $2) == nil || $receiver == null){
  818. self._model_(_st($HLInspectorModel())._new());
  819. $1=self["@model"];
  820. } else {
  821. $1=$2;
  822. };
  823. return $1;
  824. }, function($ctx1) {$ctx1.fill(self,"model",{},globals.HLInspectorWidget)})},
  825. args: [],
  826. source: "model\x0a\x09^ model ifNil: [ \x0a \x09self model: HLInspectorModel new.\x0a\x09\x09model ]",
  827. messageSends: ["ifNil:", "model:", "new"],
  828. referencedClasses: ["HLInspectorModel"]
  829. }),
  830. globals.HLInspectorWidget);
  831. smalltalk.addMethod(
  832. smalltalk.method({
  833. selector: "model:",
  834. protocol: 'accessing',
  835. fn: function (aModel){
  836. var self=this;
  837. return smalltalk.withContext(function($ctx1) {
  838. var $1;
  839. self["@model"]=aModel;
  840. _st(self._codeWidget())._model_(_st(aModel)._code());
  841. self._observeCodeWidget();
  842. self._observeVariablesWidget();
  843. $1=self._observeModel();
  844. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},globals.HLInspectorWidget)})},
  845. args: ["aModel"],
  846. source: "model: aModel\x0a\x09model := aModel. \x0a self codeWidget model: aModel code.\x0a \x0a self \x0a observeCodeWidget;\x0a \x09observeVariablesWidget;\x0a observeModel",
  847. messageSends: ["model:", "codeWidget", "code", "observeCodeWidget", "observeVariablesWidget", "observeModel"],
  848. referencedClasses: []
  849. }),
  850. globals.HLInspectorWidget);
  851. smalltalk.addMethod(
  852. smalltalk.method({
  853. selector: "observeCodeWidget",
  854. protocol: 'actions',
  855. fn: function (){
  856. var self=this;
  857. function $HLDoItExecuted(){return globals.HLDoItExecuted||(typeof HLDoItExecuted=="undefined"?nil:HLDoItExecuted)}
  858. return smalltalk.withContext(function($ctx1) {
  859. _st(_st(self._codeWidget())._announcer())._on_do_($HLDoItExecuted(),(function(){
  860. return smalltalk.withContext(function($ctx2) {
  861. return self._onDoneIt();
  862. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  863. return self}, function($ctx1) {$ctx1.fill(self,"observeCodeWidget",{},globals.HLInspectorWidget)})},
  864. args: [],
  865. source: "observeCodeWidget\x0a\x09self codeWidget announcer \x0a \x09on: HLDoItExecuted \x0a do: [ self onDoneIt ]",
  866. messageSends: ["on:do:", "announcer", "codeWidget", "onDoneIt"],
  867. referencedClasses: ["HLDoItExecuted"]
  868. }),
  869. globals.HLInspectorWidget);
  870. smalltalk.addMethod(
  871. smalltalk.method({
  872. selector: "observeModel",
  873. protocol: 'actions',
  874. fn: function (){
  875. var self=this;
  876. function $HLInstanceVariableSelected(){return globals.HLInstanceVariableSelected||(typeof HLInstanceVariableSelected=="undefined"?nil:HLInstanceVariableSelected)}
  877. return smalltalk.withContext(function($ctx1) {
  878. _st(_st(self._model())._announcer())._on_send_to_($HLInstanceVariableSelected(),"onInstanceVariableSelected",self);
  879. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},globals.HLInspectorWidget)})},
  880. args: [],
  881. source: "observeModel\x0a\x09self model announcer\x0a on: HLInstanceVariableSelected\x0a\x09\x09send: #onInstanceVariableSelected\x0a\x09\x09to: self",
  882. messageSends: ["on:send:to:", "announcer", "model"],
  883. referencedClasses: ["HLInstanceVariableSelected"]
  884. }),
  885. globals.HLInspectorWidget);
  886. smalltalk.addMethod(
  887. smalltalk.method({
  888. selector: "observeVariablesWidget",
  889. protocol: 'actions',
  890. fn: function (){
  891. var self=this;
  892. function $HLDiveRequested(){return globals.HLDiveRequested||(typeof HLDiveRequested=="undefined"?nil:HLDiveRequested)}
  893. return smalltalk.withContext(function($ctx1) {
  894. _st(_st(self._variablesWidget())._announcer())._on_send_to_($HLDiveRequested(),"onDive",self);
  895. return self}, function($ctx1) {$ctx1.fill(self,"observeVariablesWidget",{},globals.HLInspectorWidget)})},
  896. args: [],
  897. source: "observeVariablesWidget\x0a\x09self variablesWidget announcer \x0a on: HLDiveRequested \x0a\x09\x09send: #onDive\x0a\x09\x09to: self",
  898. messageSends: ["on:send:to:", "announcer", "variablesWidget"],
  899. referencedClasses: ["HLDiveRequested"]
  900. }),
  901. globals.HLInspectorWidget);
  902. smalltalk.addMethod(
  903. smalltalk.method({
  904. selector: "onDive",
  905. protocol: 'reactions',
  906. fn: function (){
  907. var self=this;
  908. function $HLInspector(){return globals.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
  909. return smalltalk.withContext(function($ctx1) {
  910. var $1,$2;
  911. $1=_st($HLInspector())._new();
  912. _st($1)._inspect_(_st(self._model())._selectedInstVarObject());
  913. $2=_st($1)._openAsTab();
  914. return self}, function($ctx1) {$ctx1.fill(self,"onDive",{},globals.HLInspectorWidget)})},
  915. args: [],
  916. source: "onDive\x0a\x09HLInspector new \x0a\x09\x09inspect: self model selectedInstVarObject;\x0a\x09\x09openAsTab",
  917. messageSends: ["inspect:", "new", "selectedInstVarObject", "model", "openAsTab"],
  918. referencedClasses: ["HLInspector"]
  919. }),
  920. globals.HLInspectorWidget);
  921. smalltalk.addMethod(
  922. smalltalk.method({
  923. selector: "onDoneIt",
  924. protocol: 'reactions',
  925. fn: function (){
  926. var self=this;
  927. return smalltalk.withContext(function($ctx1) {
  928. self._refresh();
  929. return self}, function($ctx1) {$ctx1.fill(self,"onDoneIt",{},globals.HLInspectorWidget)})},
  930. args: [],
  931. source: "onDoneIt\x0a\x0a\x09self refresh",
  932. messageSends: ["refresh"],
  933. referencedClasses: []
  934. }),
  935. globals.HLInspectorWidget);
  936. smalltalk.addMethod(
  937. smalltalk.method({
  938. selector: "onInspectIt",
  939. protocol: 'reactions',
  940. fn: function (){
  941. var self=this;
  942. return self},
  943. args: [],
  944. source: "onInspectIt",
  945. messageSends: [],
  946. referencedClasses: []
  947. }),
  948. globals.HLInspectorWidget);
  949. smalltalk.addMethod(
  950. smalltalk.method({
  951. selector: "onInstanceVariableSelected",
  952. protocol: 'reactions',
  953. fn: function (){
  954. var self=this;
  955. return smalltalk.withContext(function($ctx1) {
  956. self._refreshDisplayWidget();
  957. return self}, function($ctx1) {$ctx1.fill(self,"onInstanceVariableSelected",{},globals.HLInspectorWidget)})},
  958. args: [],
  959. source: "onInstanceVariableSelected\x0a\x09self refreshDisplayWidget",
  960. messageSends: ["refreshDisplayWidget"],
  961. referencedClasses: []
  962. }),
  963. globals.HLInspectorWidget);
  964. smalltalk.addMethod(
  965. smalltalk.method({
  966. selector: "onPrintIt",
  967. protocol: 'reactions',
  968. fn: function (){
  969. var self=this;
  970. return self},
  971. args: [],
  972. source: "onPrintIt",
  973. messageSends: [],
  974. referencedClasses: []
  975. }),
  976. globals.HLInspectorWidget);
  977. smalltalk.addMethod(
  978. smalltalk.method({
  979. selector: "refresh",
  980. protocol: 'actions',
  981. fn: function (){
  982. var self=this;
  983. return smalltalk.withContext(function($ctx1) {
  984. self._inspect_(self._inspectee());
  985. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},globals.HLInspectorWidget)})},
  986. args: [],
  987. source: "refresh\x0a\x09self inspect: self inspectee",
  988. messageSends: ["inspect:", "inspectee"],
  989. referencedClasses: []
  990. }),
  991. globals.HLInspectorWidget);
  992. smalltalk.addMethod(
  993. smalltalk.method({
  994. selector: "refreshDisplayWidget",
  995. protocol: 'actions',
  996. fn: function (){
  997. var self=this;
  998. return smalltalk.withContext(function($ctx1) {
  999. _st(self._displayWidget())._refresh();
  1000. return self}, function($ctx1) {$ctx1.fill(self,"refreshDisplayWidget",{},globals.HLInspectorWidget)})},
  1001. args: [],
  1002. source: "refreshDisplayWidget\x0a\x09self displayWidget refresh",
  1003. messageSends: ["refresh", "displayWidget"],
  1004. referencedClasses: []
  1005. }),
  1006. globals.HLInspectorWidget);
  1007. smalltalk.addMethod(
  1008. smalltalk.method({
  1009. selector: "refreshVariablesWidget",
  1010. protocol: 'actions',
  1011. fn: function (){
  1012. var self=this;
  1013. return smalltalk.withContext(function($ctx1) {
  1014. _st(self._variablesWidget())._refresh();
  1015. return self}, function($ctx1) {$ctx1.fill(self,"refreshVariablesWidget",{},globals.HLInspectorWidget)})},
  1016. args: [],
  1017. source: "refreshVariablesWidget\x0a\x09self variablesWidget refresh",
  1018. messageSends: ["refresh", "variablesWidget"],
  1019. referencedClasses: []
  1020. }),
  1021. globals.HLInspectorWidget);
  1022. smalltalk.addMethod(
  1023. smalltalk.method({
  1024. selector: "register",
  1025. protocol: 'registration',
  1026. fn: function (){
  1027. var self=this;
  1028. function $HLInspector(){return globals.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
  1029. return smalltalk.withContext(function($ctx1) {
  1030. _st($HLInspector())._register_(self);
  1031. return self}, function($ctx1) {$ctx1.fill(self,"register",{},globals.HLInspectorWidget)})},
  1032. args: [],
  1033. source: "register\x0a\x09HLInspector register: self",
  1034. messageSends: ["register:"],
  1035. referencedClasses: ["HLInspector"]
  1036. }),
  1037. globals.HLInspectorWidget);
  1038. smalltalk.addMethod(
  1039. smalltalk.method({
  1040. selector: "renderContentOn:",
  1041. protocol: 'rendering',
  1042. fn: function (html){
  1043. var self=this;
  1044. function $HLHorizontalSplitter(){return globals.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  1045. function $HLVerticalSplitter(){return globals.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  1046. return smalltalk.withContext(function($ctx1) {
  1047. var $1;
  1048. $1=_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(self._variablesWidget(),self._displayWidget()),self._codeWidget());
  1049. $ctx1.sendIdx["with:with:"]=1;
  1050. _st(html)._with_($1);
  1051. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLInspectorWidget)})},
  1052. args: ["html"],
  1053. source: "renderContentOn: html\x0a \x09html with: (HLHorizontalSplitter\x0a \x09with: (HLVerticalSplitter \x0a with: self variablesWidget\x0a with: self displayWidget)\x0a with: self codeWidget)",
  1054. messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget"],
  1055. referencedClasses: ["HLHorizontalSplitter", "HLVerticalSplitter"]
  1056. }),
  1057. globals.HLInspectorWidget);
  1058. smalltalk.addMethod(
  1059. smalltalk.method({
  1060. selector: "setLabel:",
  1061. protocol: 'actions',
  1062. fn: function (aString){
  1063. var self=this;
  1064. return smalltalk.withContext(function($ctx1) {
  1065. _st(self._model())._label_(aString);
  1066. return self}, function($ctx1) {$ctx1.fill(self,"setLabel:",{aString:aString},globals.HLInspectorWidget)})},
  1067. args: ["aString"],
  1068. source: "setLabel: aString\x0a\x09self model label: aString",
  1069. messageSends: ["label:", "model"],
  1070. referencedClasses: []
  1071. }),
  1072. globals.HLInspectorWidget);
  1073. smalltalk.addMethod(
  1074. smalltalk.method({
  1075. selector: "setVariables:",
  1076. protocol: 'actions',
  1077. fn: function (aDictionary){
  1078. var self=this;
  1079. return smalltalk.withContext(function($ctx1) {
  1080. _st(self._model())._variables_(aDictionary);
  1081. return self}, function($ctx1) {$ctx1.fill(self,"setVariables:",{aDictionary:aDictionary},globals.HLInspectorWidget)})},
  1082. args: ["aDictionary"],
  1083. source: "setVariables: aDictionary\x0a\x09self model variables: aDictionary",
  1084. messageSends: ["variables:", "model"],
  1085. referencedClasses: []
  1086. }),
  1087. globals.HLInspectorWidget);
  1088. smalltalk.addMethod(
  1089. smalltalk.method({
  1090. selector: "tabLabel",
  1091. protocol: 'accessing',
  1092. fn: function (){
  1093. var self=this;
  1094. return "Inspector";
  1095. },
  1096. args: [],
  1097. source: "tabLabel\x0a ^ 'Inspector'",
  1098. messageSends: [],
  1099. referencedClasses: []
  1100. }),
  1101. globals.HLInspectorWidget);
  1102. smalltalk.addMethod(
  1103. smalltalk.method({
  1104. selector: "unregister",
  1105. protocol: 'registration',
  1106. fn: function (){
  1107. var self=this;
  1108. function $HLInspector(){return globals.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
  1109. return smalltalk.withContext(function($ctx1) {
  1110. globals.HLInspectorWidget.superclass.fn.prototype._unregister.apply(_st(self), []);
  1111. _st($HLInspector())._unregister_(self);
  1112. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},globals.HLInspectorWidget)})},
  1113. args: [],
  1114. source: "unregister\x0a\x09super unregister.\x0a\x09HLInspector unregister: self",
  1115. messageSends: ["unregister", "unregister:"],
  1116. referencedClasses: ["HLInspector"]
  1117. }),
  1118. globals.HLInspectorWidget);
  1119. smalltalk.addMethod(
  1120. smalltalk.method({
  1121. selector: "variablesWidget",
  1122. protocol: 'accessing',
  1123. fn: function (){
  1124. var self=this;
  1125. function $HLInspectorVariablesWidget(){return globals.HLInspectorVariablesWidget||(typeof HLInspectorVariablesWidget=="undefined"?nil:HLInspectorVariablesWidget)}
  1126. return smalltalk.withContext(function($ctx1) {
  1127. var $2,$3,$4,$1;
  1128. $2=self["@variablesWidget"];
  1129. if(($receiver = $2) == nil || $receiver == null){
  1130. $3=_st($HLInspectorVariablesWidget())._new();
  1131. _st($3)._inspector_(self);
  1132. $4=_st($3)._yourself();
  1133. self["@variablesWidget"]=$4;
  1134. $1=self["@variablesWidget"];
  1135. } else {
  1136. $1=$2;
  1137. };
  1138. return $1;
  1139. }, function($ctx1) {$ctx1.fill(self,"variablesWidget",{},globals.HLInspectorWidget)})},
  1140. args: [],
  1141. source: "variablesWidget\x0a\x09^ variablesWidget ifNil: [\x0a\x09\x09variablesWidget := HLInspectorVariablesWidget new\x0a \x09\x09inspector: self;\x0a \x09yourself ]",
  1142. messageSends: ["ifNil:", "inspector:", "new", "yourself"],
  1143. referencedClasses: ["HLInspectorVariablesWidget"]
  1144. }),
  1145. globals.HLInspectorWidget);
  1146. smalltalk.addClass('HLInspector', globals.HLInspectorWidget, [], 'Helios-Inspector');
  1147. smalltalk.addMethod(
  1148. smalltalk.method({
  1149. selector: "inspect:",
  1150. protocol: 'actions',
  1151. fn: function (anObject){
  1152. var self=this;
  1153. return smalltalk.withContext(function($ctx1) {
  1154. var $1;
  1155. $1=_st(self._inspectee()).__eq(anObject);
  1156. if(! smalltalk.assert($1)){
  1157. self._setTabLabel_(_st(anObject)._printString());
  1158. };
  1159. globals.HLInspector.superclass.fn.prototype._inspect_.apply(_st(self), [anObject]);
  1160. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.HLInspector)})},
  1161. args: ["anObject"],
  1162. source: "inspect: anObject\x0a\x09\x22Avoid refreshing the tabs if the inspectee didn't change\x22\x0a\x09self inspectee = anObject ifFalse: [\x0a\x09\x09self setTabLabel: anObject printString ].\x0a\x09\x09\x0a\x09super inspect: anObject",
  1163. messageSends: ["ifFalse:", "=", "inspectee", "setTabLabel:", "printString", "inspect:"],
  1164. referencedClasses: []
  1165. }),
  1166. globals.HLInspector);
  1167. smalltalk.addMethod(
  1168. smalltalk.method({
  1169. selector: "renderContentOn:",
  1170. protocol: 'rendering',
  1171. fn: function (html){
  1172. var self=this;
  1173. function $HLContainer(){return globals.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  1174. function $HLHorizontalSplitter(){return globals.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  1175. function $HLVerticalSplitter(){return globals.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  1176. return smalltalk.withContext(function($ctx1) {
  1177. var $4,$3,$2,$1;
  1178. $4=self._variablesWidget();
  1179. $ctx1.sendIdx["variablesWidget"]=1;
  1180. $3=_st($HLVerticalSplitter())._with_with_($4,self._displayWidget());
  1181. $2=_st($HLHorizontalSplitter())._with_with_($3,self._codeWidget());
  1182. $ctx1.sendIdx["with:with:"]=1;
  1183. $1=_st($HLContainer())._with_($2);
  1184. _st(html)._with_($1);
  1185. $ctx1.sendIdx["with:"]=1;
  1186. _st(self._variablesWidget())._focus();
  1187. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLInspector)})},
  1188. args: ["html"],
  1189. 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",
  1190. messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget", "focus"],
  1191. referencedClasses: ["HLContainer", "HLHorizontalSplitter", "HLVerticalSplitter"]
  1192. }),
  1193. globals.HLInspector);
  1194. globals.HLInspector.klass.iVarNames = ['inspectors'];
  1195. smalltalk.addMethod(
  1196. smalltalk.method({
  1197. selector: "canBeOpenAsTab",
  1198. protocol: 'testing',
  1199. fn: function (){
  1200. var self=this;
  1201. return false;
  1202. },
  1203. args: [],
  1204. source: "canBeOpenAsTab\x0a\x09^ false",
  1205. messageSends: [],
  1206. referencedClasses: []
  1207. }),
  1208. globals.HLInspector.klass);
  1209. smalltalk.addMethod(
  1210. smalltalk.method({
  1211. selector: "initialize",
  1212. protocol: 'initialization',
  1213. fn: function (){
  1214. var self=this;
  1215. return smalltalk.withContext(function($ctx1) {
  1216. globals.HLInspector.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
  1217. self._watchChanges();
  1218. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.HLInspector.klass)})},
  1219. args: [],
  1220. source: "initialize\x0a\x09super initialize.\x0a\x09self watchChanges",
  1221. messageSends: ["initialize", "watchChanges"],
  1222. referencedClasses: []
  1223. }),
  1224. globals.HLInspector.klass);
  1225. smalltalk.addMethod(
  1226. smalltalk.method({
  1227. selector: "inspect:",
  1228. protocol: 'actions',
  1229. fn: function (anObject){
  1230. var self=this;
  1231. return smalltalk.withContext(function($ctx1) {
  1232. var $1,$2;
  1233. $1=self._new();
  1234. _st($1)._openAsTab();
  1235. $2=_st($1)._inspect_(anObject);
  1236. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.HLInspector.klass)})},
  1237. args: ["anObject"],
  1238. source: "inspect: anObject\x0a\x09self new\x0a\x09\x09openAsTab;\x0a\x09\x09inspect: anObject",
  1239. messageSends: ["openAsTab", "new", "inspect:"],
  1240. referencedClasses: []
  1241. }),
  1242. globals.HLInspector.klass);
  1243. smalltalk.addMethod(
  1244. smalltalk.method({
  1245. selector: "inspectors",
  1246. protocol: 'accessing',
  1247. fn: function (){
  1248. var self=this;
  1249. function $OrderedCollection(){return globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  1250. return smalltalk.withContext(function($ctx1) {
  1251. var $2,$1;
  1252. $2=self["@inspectors"];
  1253. if(($receiver = $2) == nil || $receiver == null){
  1254. self["@inspectors"]=_st($OrderedCollection())._new();
  1255. $1=self["@inspectors"];
  1256. } else {
  1257. $1=$2;
  1258. };
  1259. return $1;
  1260. }, function($ctx1) {$ctx1.fill(self,"inspectors",{},globals.HLInspector.klass)})},
  1261. args: [],
  1262. source: "inspectors\x0a\x09^ inspectors ifNil: [ inspectors := OrderedCollection new ]",
  1263. messageSends: ["ifNil:", "new"],
  1264. referencedClasses: ["OrderedCollection"]
  1265. }),
  1266. globals.HLInspector.klass);
  1267. smalltalk.addMethod(
  1268. smalltalk.method({
  1269. selector: "register:",
  1270. protocol: 'registration',
  1271. fn: function (anInspector){
  1272. var self=this;
  1273. return smalltalk.withContext(function($ctx1) {
  1274. _st(self._inspectors())._add_(anInspector);
  1275. return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},globals.HLInspector.klass)})},
  1276. args: ["anInspector"],
  1277. source: "register: anInspector\x0a\x09self inspectors add: anInspector",
  1278. messageSends: ["add:", "inspectors"],
  1279. referencedClasses: []
  1280. }),
  1281. globals.HLInspector.klass);
  1282. smalltalk.addMethod(
  1283. smalltalk.method({
  1284. selector: "tabClass",
  1285. protocol: 'accessing',
  1286. fn: function (){
  1287. var self=this;
  1288. return "inspector";
  1289. },
  1290. args: [],
  1291. source: "tabClass\x0a\x09^ 'inspector'",
  1292. messageSends: [],
  1293. referencedClasses: []
  1294. }),
  1295. globals.HLInspector.klass);
  1296. smalltalk.addMethod(
  1297. smalltalk.method({
  1298. selector: "tabLabel",
  1299. protocol: 'accessing',
  1300. fn: function (){
  1301. var self=this;
  1302. return "Inspector";
  1303. },
  1304. args: [],
  1305. source: "tabLabel\x0a\x09^ 'Inspector'",
  1306. messageSends: [],
  1307. referencedClasses: []
  1308. }),
  1309. globals.HLInspector.klass);
  1310. smalltalk.addMethod(
  1311. smalltalk.method({
  1312. selector: "tabPriority",
  1313. protocol: 'accessing',
  1314. fn: function (){
  1315. var self=this;
  1316. return (10);
  1317. },
  1318. args: [],
  1319. source: "tabPriority\x0a\x09^ 10",
  1320. messageSends: [],
  1321. referencedClasses: []
  1322. }),
  1323. globals.HLInspector.klass);
  1324. smalltalk.addMethod(
  1325. smalltalk.method({
  1326. selector: "unregister:",
  1327. protocol: 'registration',
  1328. fn: function (anInspector){
  1329. var self=this;
  1330. return smalltalk.withContext(function($ctx1) {
  1331. _st(self._inspectors())._remove_(anInspector);
  1332. return self}, function($ctx1) {$ctx1.fill(self,"unregister:",{anInspector:anInspector},globals.HLInspector.klass)})},
  1333. args: ["anInspector"],
  1334. source: "unregister: anInspector\x0a\x09self inspectors remove: anInspector",
  1335. messageSends: ["remove:", "inspectors"],
  1336. referencedClasses: []
  1337. }),
  1338. globals.HLInspector.klass);
  1339. smalltalk.addMethod(
  1340. smalltalk.method({
  1341. selector: "watchChanges",
  1342. protocol: 'initialization',
  1343. fn: function (){
  1344. var self=this;
  1345. return smalltalk.withContext(function($ctx1) {
  1346. _st((function(){
  1347. return smalltalk.withContext(function($ctx2) {
  1348. return _st(self._inspectors())._do_((function(each){
  1349. return smalltalk.withContext(function($ctx3) {
  1350. return _st(each)._refresh();
  1351. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  1352. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._valueWithInterval_((500));
  1353. return self}, function($ctx1) {$ctx1.fill(self,"watchChanges",{},globals.HLInspector.klass)})},
  1354. args: [],
  1355. source: "watchChanges\x0a\x09[ self inspectors do: [ :each | each refresh ] ]\x0a\x09\x09valueWithInterval: 500",
  1356. messageSends: ["valueWithInterval:", "do:", "inspectors", "refresh"],
  1357. referencedClasses: []
  1358. }),
  1359. globals.HLInspector.klass);
  1360. });