Helios-Inspector.js 45 KB

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