1
0

Helios-Inspector.js 44 KB

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