Helios-Inspector.js 47 KB

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