Helios-Inspector.js 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393
  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. function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
  527. return smalltalk.withContext(function($ctx1) {
  528. smalltalk.HLWidget.klass.fn.prototype._initialize.apply(_st(self), []);
  529. _st($InspectorHandler())._register_(self);
  530. _st(self)._watchChanges();
  531. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLInspector.klass)})},
  532. args: [],
  533. source: "initialize\x0a\x09super initialize.\x0a\x09InspectorHandler register: self.\x0a\x09self watchChanges",
  534. messageSends: ["initialize", "register:", "watchChanges"],
  535. referencedClasses: ["InspectorHandler"]
  536. }),
  537. smalltalk.HLInspector.klass);
  538. smalltalk.addMethod(
  539. smalltalk.method({
  540. selector: "inspect:",
  541. category: 'actions',
  542. fn: function (anObject){
  543. var self=this;
  544. return smalltalk.withContext(function($ctx1) {
  545. var $1,$2;
  546. $1=_st(self)._new();
  547. _st($1)._inspect_(anObject);
  548. $2=_st($1)._open();
  549. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.HLInspector.klass)})},
  550. args: ["anObject"],
  551. source: "inspect: anObject\x0a\x09self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09open",
  552. messageSends: ["inspect:", "new", "open"],
  553. referencedClasses: []
  554. }),
  555. smalltalk.HLInspector.klass);
  556. smalltalk.addMethod(
  557. smalltalk.method({
  558. selector: "inspectors",
  559. category: 'accessing',
  560. fn: function (){
  561. var self=this;
  562. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  563. return smalltalk.withContext(function($ctx1) {
  564. var $2,$1;
  565. $2=self["@inspectors"];
  566. if(($receiver = $2) == nil || $receiver == undefined){
  567. self["@inspectors"]=_st($OrderedCollection())._new();
  568. $1=self["@inspectors"];
  569. } else {
  570. $1=$2;
  571. };
  572. return $1;
  573. }, function($ctx1) {$ctx1.fill(self,"inspectors",{},smalltalk.HLInspector.klass)})},
  574. args: [],
  575. source: "inspectors\x0a\x09^ inspectors ifNil: [ inspectors := OrderedCollection new ]",
  576. messageSends: ["ifNil:", "new"],
  577. referencedClasses: ["OrderedCollection"]
  578. }),
  579. smalltalk.HLInspector.klass);
  580. smalltalk.addMethod(
  581. smalltalk.method({
  582. selector: "register:",
  583. category: 'registration',
  584. fn: function (anInspector){
  585. var self=this;
  586. return smalltalk.withContext(function($ctx1) {
  587. _st(_st(self)._inspectors())._add_(anInspector);
  588. return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.HLInspector.klass)})},
  589. args: ["anInspector"],
  590. source: "register: anInspector\x0a\x09self inspectors add: anInspector",
  591. messageSends: ["add:", "inspectors"],
  592. referencedClasses: []
  593. }),
  594. smalltalk.HLInspector.klass);
  595. smalltalk.addMethod(
  596. smalltalk.method({
  597. selector: "tabLabel",
  598. category: 'accessing',
  599. fn: function (){
  600. var self=this;
  601. return smalltalk.withContext(function($ctx1) {
  602. return "Inspector";
  603. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLInspector.klass)})},
  604. args: [],
  605. source: "tabLabel\x0a\x09^ 'Inspector'",
  606. messageSends: [],
  607. referencedClasses: []
  608. }),
  609. smalltalk.HLInspector.klass);
  610. smalltalk.addMethod(
  611. smalltalk.method({
  612. selector: "tabPriority",
  613. category: 'accessing',
  614. fn: function (){
  615. var self=this;
  616. return smalltalk.withContext(function($ctx1) {
  617. var $1;
  618. $1=(10);
  619. return $1;
  620. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLInspector.klass)})},
  621. args: [],
  622. source: "tabPriority\x0a\x09^ 10",
  623. messageSends: [],
  624. referencedClasses: []
  625. }),
  626. smalltalk.HLInspector.klass);
  627. smalltalk.addMethod(
  628. smalltalk.method({
  629. selector: "unregister:",
  630. category: 'registration',
  631. fn: function (anInspector){
  632. var self=this;
  633. return smalltalk.withContext(function($ctx1) {
  634. _st(_st(self)._inspectors())._remove_(anInspector);
  635. return self}, function($ctx1) {$ctx1.fill(self,"unregister:",{anInspector:anInspector},smalltalk.HLInspector.klass)})},
  636. args: ["anInspector"],
  637. source: "unregister: anInspector\x0a\x09self inspectors remove: anInspector",
  638. messageSends: ["remove:", "inspectors"],
  639. referencedClasses: []
  640. }),
  641. smalltalk.HLInspector.klass);
  642. smalltalk.addMethod(
  643. smalltalk.method({
  644. selector: "watchChanges",
  645. category: 'initialization',
  646. fn: function (){
  647. var self=this;
  648. return smalltalk.withContext(function($ctx1) {
  649. _st((function(){
  650. return smalltalk.withContext(function($ctx2) {
  651. return _st(_st(self)._inspectors())._do_((function(each){
  652. return smalltalk.withContext(function($ctx3) {
  653. return _st(each)._refresh();
  654. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  655. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithInterval_((500));
  656. return self}, function($ctx1) {$ctx1.fill(self,"watchChanges",{},smalltalk.HLInspector.klass)})},
  657. args: [],
  658. source: "watchChanges\x0a\x09[ self inspectors do: [ :each | each refresh ] ]\x0a\x09\x09valueWithInterval: 500",
  659. messageSends: ["valueWithInterval:", "do:", "refresh", "inspectors"],
  660. referencedClasses: []
  661. }),
  662. smalltalk.HLInspector.klass);
  663. smalltalk.addClass('HLInspectorWidget', smalltalk.HLInspector, [], 'Helios-Inspector');
  664. smalltalk.addMethod(
  665. smalltalk.method({
  666. selector: "renderContentOn:",
  667. category: 'rendering',
  668. fn: function (html){
  669. var self=this;
  670. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  671. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  672. return smalltalk.withContext(function($ctx1) {
  673. _st(html)._with_(_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st(self)._variablesWidget(),_st(self)._displayWidget()),_st(self)._codeWidget()));
  674. _st(_st(self)._variablesWidget())._focus();
  675. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspectorWidget)})},
  676. args: ["html"],
  677. source: "renderContentOn: html\x0a \x09html 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 ",
  678. messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget", "focus"],
  679. referencedClasses: ["HLVerticalSplitter", "HLHorizontalSplitter"]
  680. }),
  681. smalltalk.HLInspectorWidget);
  682. smalltalk.addClass('HLInspectorDisplayWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Inspector');
  683. smalltalk.addMethod(
  684. smalltalk.method({
  685. selector: "model",
  686. category: 'accessing',
  687. fn: function (){
  688. var self=this;
  689. return smalltalk.withContext(function($ctx1) {
  690. var $1;
  691. $1=self["@model"];
  692. return $1;
  693. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLInspectorDisplayWidget)})},
  694. args: [],
  695. source: "model\x0a\x0a\x09^ model",
  696. messageSends: [],
  697. referencedClasses: []
  698. }),
  699. smalltalk.HLInspectorDisplayWidget);
  700. smalltalk.addMethod(
  701. smalltalk.method({
  702. selector: "model:",
  703. category: 'accessing',
  704. fn: function (aModel){
  705. var self=this;
  706. return smalltalk.withContext(function($ctx1) {
  707. self["@model"]=aModel;
  708. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLInspectorDisplayWidget)})},
  709. args: ["aModel"],
  710. source: "model: aModel\x0a\x0a\x09model := aModel",
  711. messageSends: [],
  712. referencedClasses: []
  713. }),
  714. smalltalk.HLInspectorDisplayWidget);
  715. smalltalk.addMethod(
  716. smalltalk.method({
  717. selector: "renderContentOn:",
  718. category: 'rendering',
  719. fn: function (html){
  720. var self=this;
  721. return smalltalk.withContext(function($ctx1) {
  722. _st(_st(html)._div())._with_(_st(self)._selectionDisplayString());
  723. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspectorDisplayWidget)})},
  724. args: ["html"],
  725. source: "renderContentOn: html\x0a\x09\x0a html div with: self selectionDisplayString\x0a ",
  726. messageSends: ["with:", "selectionDisplayString", "div"],
  727. referencedClasses: []
  728. }),
  729. smalltalk.HLInspectorDisplayWidget);
  730. smalltalk.addMethod(
  731. smalltalk.method({
  732. selector: "selectionDisplayString",
  733. category: 'rendering',
  734. fn: function (){
  735. var self=this;
  736. var selection;
  737. return smalltalk.withContext(function($ctx1) {
  738. var $2,$1;
  739. selection=_st(self["@model"])._selection();
  740. $2=_st(_st(_st(self["@model"])._variables())._keys())._includes_(selection);
  741. if(smalltalk.assert($2)){
  742. $1=_st(_st(self["@model"])._instVarObjectAt_(selection))._printString();
  743. } else {
  744. $1="";
  745. };
  746. return $1;
  747. }, function($ctx1) {$ctx1.fill(self,"selectionDisplayString",{selection:selection},smalltalk.HLInspectorDisplayWidget)})},
  748. args: [],
  749. source: "selectionDisplayString\x0a\x09|selection|\x0a\x09selection := model selection.\x0a ^ (model variables keys includes: selection)\x0a \x09ifTrue:[(model instVarObjectAt: selection) printString]\x0a \x09ifFalse:['']",
  750. messageSends: ["selection", "ifTrue:ifFalse:", "printString", "instVarObjectAt:", "includes:", "keys", "variables"],
  751. referencedClasses: []
  752. }),
  753. smalltalk.HLInspectorDisplayWidget);
  754. smalltalk.addClass('HLInspectorModel', smalltalk.Object, ['announcer', 'environment', 'inspectee', 'code', 'variables', 'selection'], 'Helios-Inspector');
  755. smalltalk.addMethod(
  756. smalltalk.method({
  757. selector: "announcer",
  758. category: 'accessing',
  759. fn: function (){
  760. var self=this;
  761. function $Announcer(){return smalltalk.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  762. return smalltalk.withContext(function($ctx1) {
  763. var $2,$1;
  764. $2=self["@announcer"];
  765. if(($receiver = $2) == nil || $receiver == undefined){
  766. self["@announcer"]=_st($Announcer())._new();
  767. $1=self["@announcer"];
  768. } else {
  769. $1=$2;
  770. };
  771. return $1;
  772. }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLInspectorModel)})},
  773. args: [],
  774. source: "announcer\x0a\x09^ announcer ifNil: [announcer := Announcer new ]",
  775. messageSends: ["ifNil:", "new"],
  776. referencedClasses: ["Announcer"]
  777. }),
  778. smalltalk.HLInspectorModel);
  779. smalltalk.addMethod(
  780. smalltalk.method({
  781. selector: "code",
  782. category: 'accessing',
  783. fn: function (){
  784. var self=this;
  785. function $HLCodeModel(){return smalltalk.HLCodeModel||(typeof HLCodeModel=="undefined"?nil:HLCodeModel)}
  786. return smalltalk.withContext(function($ctx1) {
  787. var $2,$1;
  788. $2=self["@code"];
  789. if(($receiver = $2) == nil || $receiver == undefined){
  790. self["@code"]=_st($HLCodeModel())._on_(_st(self)._environment());
  791. $1=self["@code"];
  792. } else {
  793. $1=$2;
  794. };
  795. return $1;
  796. }, function($ctx1) {$ctx1.fill(self,"code",{},smalltalk.HLInspectorModel)})},
  797. args: [],
  798. source: "code\x0a\x09\x22Answers the code model working for this workspace model\x22\x0a\x09^ code ifNil:[ code := HLCodeModel on: self environment ]",
  799. messageSends: ["ifNil:", "on:", "environment"],
  800. referencedClasses: ["HLCodeModel"]
  801. }),
  802. smalltalk.HLInspectorModel);
  803. smalltalk.addMethod(
  804. smalltalk.method({
  805. selector: "environment",
  806. category: 'accessing',
  807. fn: function (){
  808. var self=this;
  809. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  810. return smalltalk.withContext(function($ctx1) {
  811. var $2,$1;
  812. $2=self["@environment"];
  813. if(($receiver = $2) == nil || $receiver == undefined){
  814. $1=_st(_st($HLManager())._current())._environment();
  815. } else {
  816. $1=$2;
  817. };
  818. return $1;
  819. }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLInspectorModel)})},
  820. args: [],
  821. source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
  822. messageSends: ["ifNil:", "environment", "current"],
  823. referencedClasses: ["HLManager"]
  824. }),
  825. smalltalk.HLInspectorModel);
  826. smalltalk.addMethod(
  827. smalltalk.method({
  828. selector: "environment:",
  829. category: 'accessing',
  830. fn: function (anEnvironment){
  831. var self=this;
  832. return smalltalk.withContext(function($ctx1) {
  833. self["@environment"]=anEnvironment;
  834. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLInspectorModel)})},
  835. args: ["anEnvironment"],
  836. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  837. messageSends: [],
  838. referencedClasses: []
  839. }),
  840. smalltalk.HLInspectorModel);
  841. smalltalk.addMethod(
  842. smalltalk.method({
  843. selector: "inspect:on:",
  844. category: 'actions',
  845. fn: function (anObject,anInspector){
  846. var self=this;
  847. return smalltalk.withContext(function($ctx1) {
  848. self["@inspectee"]=anObject;
  849. self["@variables"]=[];
  850. _st(self["@inspectee"])._inspectOn_(anInspector);
  851. return self}, function($ctx1) {$ctx1.fill(self,"inspect:on:",{anObject:anObject,anInspector:anInspector},smalltalk.HLInspectorModel)})},
  852. args: ["anObject", "anInspector"],
  853. source: "inspect: anObject on: anInspector\x0a\x09inspectee := anObject.\x0a\x09variables := #().\x0a\x09inspectee inspectOn: anInspector ",
  854. messageSends: ["inspectOn:"],
  855. referencedClasses: []
  856. }),
  857. smalltalk.HLInspectorModel);
  858. smalltalk.addMethod(
  859. smalltalk.method({
  860. selector: "inspectee",
  861. category: 'accessing',
  862. fn: function (){
  863. var self=this;
  864. return smalltalk.withContext(function($ctx1) {
  865. var $1;
  866. $1=self["@inspectee"];
  867. return $1;
  868. }, function($ctx1) {$ctx1.fill(self,"inspectee",{},smalltalk.HLInspectorModel)})},
  869. args: [],
  870. source: "inspectee \x0a\x09^ inspectee ",
  871. messageSends: [],
  872. referencedClasses: []
  873. }),
  874. smalltalk.HLInspectorModel);
  875. smalltalk.addMethod(
  876. smalltalk.method({
  877. selector: "inspectee:",
  878. category: 'accessing',
  879. fn: function (anObject){
  880. var self=this;
  881. return smalltalk.withContext(function($ctx1) {
  882. self["@inspectee"]=anObject;
  883. return self}, function($ctx1) {$ctx1.fill(self,"inspectee:",{anObject:anObject},smalltalk.HLInspectorModel)})},
  884. args: ["anObject"],
  885. source: "inspectee: anObject \x0a\x09inspectee := anObject\x0a ",
  886. messageSends: [],
  887. referencedClasses: []
  888. }),
  889. smalltalk.HLInspectorModel);
  890. smalltalk.addMethod(
  891. smalltalk.method({
  892. selector: "instVarObjectAt:",
  893. category: 'actions',
  894. fn: function (anInstVarName){
  895. var self=this;
  896. return smalltalk.withContext(function($ctx1) {
  897. var $1;
  898. $1=_st(_st(self)._variables())._at_(anInstVarName);
  899. return $1;
  900. }, function($ctx1) {$ctx1.fill(self,"instVarObjectAt:",{anInstVarName:anInstVarName},smalltalk.HLInspectorModel)})},
  901. args: ["anInstVarName"],
  902. source: "instVarObjectAt: anInstVarName\x0a\x09^ self variables at: anInstVarName",
  903. messageSends: ["at:", "variables"],
  904. referencedClasses: []
  905. }),
  906. smalltalk.HLInspectorModel);
  907. smalltalk.addMethod(
  908. smalltalk.method({
  909. selector: "onKeyDown:",
  910. category: 'reactions',
  911. fn: function (anEvent){
  912. var self=this;
  913. return smalltalk.withContext(function($ctx1) {
  914. if(anEvent.ctrlKey) {
  915. if(anEvent.keyCode === 80) { //ctrl+p
  916. self._printIt();
  917. anEvent.preventDefault();
  918. return false;
  919. }
  920. if(anEvent.keyCode === 68) { //ctrl+d
  921. self._doIt();
  922. anEvent.preventDefault();
  923. return false;
  924. }
  925. if(anEvent.keyCode === 73) { //ctrl+i
  926. self._inspectIt();
  927. anEvent.preventDefault();
  928. return false;
  929. }
  930. };
  931. return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{anEvent:anEvent},smalltalk.HLInspectorModel)})},
  932. args: ["anEvent"],
  933. 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}>",
  934. messageSends: [],
  935. referencedClasses: []
  936. }),
  937. smalltalk.HLInspectorModel);
  938. smalltalk.addMethod(
  939. smalltalk.method({
  940. selector: "selectedInstVar:",
  941. category: 'actions',
  942. fn: function (anInstVarName){
  943. var self=this;
  944. return smalltalk.withContext(function($ctx1) {
  945. _st(self)._selection_(anInstVarName);
  946. return self}, function($ctx1) {$ctx1.fill(self,"selectedInstVar:",{anInstVarName:anInstVarName},smalltalk.HLInspectorModel)})},
  947. args: ["anInstVarName"],
  948. source: "selectedInstVar: anInstVarName\x0a self selection: anInstVarName",
  949. messageSends: ["selection:"],
  950. referencedClasses: []
  951. }),
  952. smalltalk.HLInspectorModel);
  953. smalltalk.addMethod(
  954. smalltalk.method({
  955. selector: "selectedInstVarObject",
  956. category: 'accessing',
  957. fn: function (){
  958. var self=this;
  959. return smalltalk.withContext(function($ctx1) {
  960. var $1;
  961. $1=_st(self)._instVarObjectAt_(_st(self)._selection());
  962. return $1;
  963. }, function($ctx1) {$ctx1.fill(self,"selectedInstVarObject",{},smalltalk.HLInspectorModel)})},
  964. args: [],
  965. source: "selectedInstVarObject\x0a\x09^ self instVarObjectAt: self selection\x0a ",
  966. messageSends: ["instVarObjectAt:", "selection"],
  967. referencedClasses: []
  968. }),
  969. smalltalk.HLInspectorModel);
  970. smalltalk.addMethod(
  971. smalltalk.method({
  972. selector: "selection",
  973. category: 'accessing',
  974. fn: function (){
  975. var self=this;
  976. return smalltalk.withContext(function($ctx1) {
  977. var $2,$1;
  978. $2=self["@selection"];
  979. if(($receiver = $2) == nil || $receiver == undefined){
  980. $1="";
  981. } else {
  982. $1=$2;
  983. };
  984. return $1;
  985. }, function($ctx1) {$ctx1.fill(self,"selection",{},smalltalk.HLInspectorModel)})},
  986. args: [],
  987. source: "selection\x0a\x09^ selection ifNil:[ '' ] ",
  988. messageSends: ["ifNil:"],
  989. referencedClasses: []
  990. }),
  991. smalltalk.HLInspectorModel);
  992. smalltalk.addMethod(
  993. smalltalk.method({
  994. selector: "selection:",
  995. category: 'accessing',
  996. fn: function (anObject){
  997. var self=this;
  998. function $HLInstanceVariableSelected(){return smalltalk.HLInstanceVariableSelected||(typeof HLInstanceVariableSelected=="undefined"?nil:HLInstanceVariableSelected)}
  999. return smalltalk.withContext(function($ctx1) {
  1000. self["@selection"]=anObject;
  1001. _st(_st(self)._announcer())._announce_(_st($HLInstanceVariableSelected())._on_(self["@selection"]));
  1002. return self}, function($ctx1) {$ctx1.fill(self,"selection:",{anObject:anObject},smalltalk.HLInspectorModel)})},
  1003. args: ["anObject"],
  1004. source: "selection: anObject\x0a\x09selection := anObject.\x0a\x0a\x09self announcer announce: (HLInstanceVariableSelected on: selection)\x0a ",
  1005. messageSends: ["announce:", "on:", "announcer"],
  1006. referencedClasses: ["HLInstanceVariableSelected"]
  1007. }),
  1008. smalltalk.HLInspectorModel);
  1009. smalltalk.addMethod(
  1010. smalltalk.method({
  1011. selector: "subscribe:",
  1012. category: 'actions',
  1013. fn: function (aWidget){
  1014. var self=this;
  1015. return smalltalk.withContext(function($ctx1) {
  1016. _st(aWidget)._subscribeTo_(_st(self)._announcer());
  1017. return self}, function($ctx1) {$ctx1.fill(self,"subscribe:",{aWidget:aWidget},smalltalk.HLInspectorModel)})},
  1018. args: ["aWidget"],
  1019. source: "subscribe: aWidget\x0a\x09aWidget subscribeTo: self announcer",
  1020. messageSends: ["subscribeTo:", "announcer"],
  1021. referencedClasses: []
  1022. }),
  1023. smalltalk.HLInspectorModel);
  1024. smalltalk.addMethod(
  1025. smalltalk.method({
  1026. selector: "variables",
  1027. category: 'accessing',
  1028. fn: function (){
  1029. var self=this;
  1030. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  1031. return smalltalk.withContext(function($ctx1) {
  1032. var $2,$1;
  1033. $2=self["@variables"];
  1034. if(($receiver = $2) == nil || $receiver == undefined){
  1035. $1=_st($Dictionary())._new();
  1036. } else {
  1037. $1=$2;
  1038. };
  1039. return $1;
  1040. }, function($ctx1) {$ctx1.fill(self,"variables",{},smalltalk.HLInspectorModel)})},
  1041. args: [],
  1042. source: "variables\x0a\x09^ variables ifNil: [ Dictionary new ]",
  1043. messageSends: ["ifNil:", "new"],
  1044. referencedClasses: ["Dictionary"]
  1045. }),
  1046. smalltalk.HLInspectorModel);
  1047. smalltalk.addMethod(
  1048. smalltalk.method({
  1049. selector: "variables:",
  1050. category: 'accessing',
  1051. fn: function (aCollection){
  1052. var self=this;
  1053. return smalltalk.withContext(function($ctx1) {
  1054. self["@variables"]=aCollection;
  1055. return self}, function($ctx1) {$ctx1.fill(self,"variables:",{aCollection:aCollection},smalltalk.HLInspectorModel)})},
  1056. args: ["aCollection"],
  1057. source: "variables: aCollection\x0a\x09variables := aCollection\x0a ",
  1058. messageSends: [],
  1059. referencedClasses: []
  1060. }),
  1061. smalltalk.HLInspectorModel);
  1062. smalltalk.addMethod(
  1063. smalltalk.method({
  1064. selector: "on:",
  1065. category: 'actions',
  1066. fn: function (anEnvironment){
  1067. var self=this;
  1068. return smalltalk.withContext(function($ctx1) {
  1069. var $2,$3,$1;
  1070. $2=_st(self)._new();
  1071. _st($2)._environment_(anEnvironment);
  1072. $3=_st($2)._yourself();
  1073. $1=$3;
  1074. return $1;
  1075. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},smalltalk.HLInspectorModel.klass)})},
  1076. args: ["anEnvironment"],
  1077. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  1078. messageSends: ["environment:", "new", "yourself"],
  1079. referencedClasses: []
  1080. }),
  1081. smalltalk.HLInspectorModel.klass);
  1082. smalltalk.addClass('HLInspectorVariablesWidget', smalltalk.HLNavigationListWidget, ['announcer', 'model', 'list', 'diveButton'], 'Helios-Inspector');
  1083. smalltalk.addMethod(
  1084. smalltalk.method({
  1085. selector: "announcer",
  1086. category: 'accessing',
  1087. fn: function (){
  1088. var self=this;
  1089. function $Announcer(){return smalltalk.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  1090. return smalltalk.withContext(function($ctx1) {
  1091. var $2,$1;
  1092. $2=self["@announcer"];
  1093. if(($receiver = $2) == nil || $receiver == undefined){
  1094. self["@announcer"]=_st($Announcer())._new();
  1095. $1=self["@announcer"];
  1096. } else {
  1097. $1=$2;
  1098. };
  1099. return $1;
  1100. }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLInspectorVariablesWidget)})},
  1101. args: [],
  1102. source: "announcer\x0a\x09^ announcer ifNil:[ announcer := Announcer new ]",
  1103. messageSends: ["ifNil:", "new"],
  1104. referencedClasses: ["Announcer"]
  1105. }),
  1106. smalltalk.HLInspectorVariablesWidget);
  1107. smalltalk.addMethod(
  1108. smalltalk.method({
  1109. selector: "defaultItems",
  1110. category: 'defaults',
  1111. fn: function (){
  1112. var self=this;
  1113. return smalltalk.withContext(function($ctx1) {
  1114. var $1;
  1115. $1=_st(_st(_st(self)._model())._variables())._keys();
  1116. return $1;
  1117. }, function($ctx1) {$ctx1.fill(self,"defaultItems",{},smalltalk.HLInspectorVariablesWidget)})},
  1118. args: [],
  1119. source: "defaultItems\x0a\x09^ self model variables keys",
  1120. messageSends: ["keys", "variables", "model"],
  1121. referencedClasses: []
  1122. }),
  1123. smalltalk.HLInspectorVariablesWidget);
  1124. smalltalk.addMethod(
  1125. smalltalk.method({
  1126. selector: "label",
  1127. category: 'accessing',
  1128. fn: function (){
  1129. var self=this;
  1130. return smalltalk.withContext(function($ctx1) {
  1131. var $1;
  1132. $1=_st(_st(_st(_st(self)._model())._inspectee())._class())._name();
  1133. return $1;
  1134. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLInspectorVariablesWidget)})},
  1135. args: [],
  1136. source: "label\x0a\x09^ self model inspectee class name",
  1137. messageSends: ["name", "class", "inspectee", "model"],
  1138. referencedClasses: []
  1139. }),
  1140. smalltalk.HLInspectorVariablesWidget);
  1141. smalltalk.addMethod(
  1142. smalltalk.method({
  1143. selector: "model",
  1144. category: 'accessing',
  1145. fn: function (){
  1146. var self=this;
  1147. return smalltalk.withContext(function($ctx1) {
  1148. var $1;
  1149. $1=self["@model"];
  1150. return $1;
  1151. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLInspectorVariablesWidget)})},
  1152. args: [],
  1153. source: "model\x0a ^ model\x0a ",
  1154. messageSends: [],
  1155. referencedClasses: []
  1156. }),
  1157. smalltalk.HLInspectorVariablesWidget);
  1158. smalltalk.addMethod(
  1159. smalltalk.method({
  1160. selector: "model:",
  1161. category: 'accessing',
  1162. fn: function (aModel){
  1163. var self=this;
  1164. return smalltalk.withContext(function($ctx1) {
  1165. self["@model"]=aModel;
  1166. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLInspectorVariablesWidget)})},
  1167. args: ["aModel"],
  1168. source: "model: aModel\x0a model := aModel\x0a ",
  1169. messageSends: [],
  1170. referencedClasses: []
  1171. }),
  1172. smalltalk.HLInspectorVariablesWidget);
  1173. smalltalk.addMethod(
  1174. smalltalk.method({
  1175. selector: "refresh",
  1176. category: 'actions',
  1177. fn: function (){
  1178. var self=this;
  1179. return smalltalk.withContext(function($ctx1) {
  1180. _st(self)._resetItems();
  1181. smalltalk.HLNavigationListWidget.fn.prototype._refresh.apply(_st(self), []);
  1182. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLInspectorVariablesWidget)})},
  1183. args: [],
  1184. source: "refresh\x0a\x09self resetItems.\x0a super refresh\x0a ",
  1185. messageSends: ["resetItems", "refresh"],
  1186. referencedClasses: []
  1187. }),
  1188. smalltalk.HLInspectorVariablesWidget);
  1189. smalltalk.addMethod(
  1190. smalltalk.method({
  1191. selector: "renderButtonsOn:",
  1192. category: 'rendering',
  1193. fn: function (html){
  1194. var self=this;
  1195. function $HLDiveRequested(){return smalltalk.HLDiveRequested||(typeof HLDiveRequested=="undefined"?nil:HLDiveRequested)}
  1196. return smalltalk.withContext(function($ctx1) {
  1197. var $1,$2;
  1198. $1=_st(html)._button();
  1199. _st($1)._class_("btn");
  1200. _st($1)._with_("Dive");
  1201. $2=_st($1)._onClick_((function(){
  1202. return smalltalk.withContext(function($ctx2) {
  1203. return _st(_st(self)._announcer())._announce_(_st($HLDiveRequested())._new());
  1204. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1205. self["@diveButton"]=$2;
  1206. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLInspectorVariablesWidget)})},
  1207. args: ["html"],
  1208. source: "renderButtonsOn: html\x0a\x09diveButton := html button \x0a\x09\x09class: 'btn';\x0a\x09\x09with: 'Dive'; \x0a\x09\x09onClick: [ self announcer announce: HLDiveRequested new ]",
  1209. messageSends: ["class:", "button", "with:", "onClick:", "announce:", "new", "announcer"],
  1210. referencedClasses: ["HLDiveRequested"]
  1211. }),
  1212. smalltalk.HLInspectorVariablesWidget);
  1213. smalltalk.addMethod(
  1214. smalltalk.method({
  1215. selector: "renderContentOn:",
  1216. category: 'rendering',
  1217. fn: function (html){
  1218. var self=this;
  1219. return smalltalk.withContext(function($ctx1) {
  1220. _st(self)._renderHeadOn_(html);
  1221. smalltalk.HLNavigationListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  1222. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspectorVariablesWidget)})},
  1223. args: ["html"],
  1224. source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x0a\x09super renderContentOn: html",
  1225. messageSends: ["renderHeadOn:", "renderContentOn:"],
  1226. referencedClasses: []
  1227. }),
  1228. smalltalk.HLInspectorVariablesWidget);
  1229. smalltalk.addMethod(
  1230. smalltalk.method({
  1231. selector: "renderHeadOn:",
  1232. category: 'rendering',
  1233. fn: function (html){
  1234. var self=this;
  1235. return smalltalk.withContext(function($ctx1) {
  1236. var $1,$2;
  1237. $1=_st(html)._div();
  1238. _st($1)._class_("list-label");
  1239. $2=_st($1)._with_(_st(self)._label());
  1240. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},smalltalk.HLInspectorVariablesWidget)})},
  1241. args: ["html"],
  1242. source: "renderHeadOn: html\x0a\x09html div \x0a\x09\x09class: 'list-label';\x0a\x09\x09with: self label",
  1243. messageSends: ["class:", "div", "with:", "label"],
  1244. referencedClasses: []
  1245. }),
  1246. smalltalk.HLInspectorVariablesWidget);
  1247. smalltalk.addMethod(
  1248. smalltalk.method({
  1249. selector: "resetItems",
  1250. category: 'actions',
  1251. fn: function (){
  1252. var self=this;
  1253. return smalltalk.withContext(function($ctx1) {
  1254. self["@items"]=nil;
  1255. return self}, function($ctx1) {$ctx1.fill(self,"resetItems",{},smalltalk.HLInspectorVariablesWidget)})},
  1256. args: [],
  1257. source: "resetItems\x0a\x09items := nil",
  1258. messageSends: [],
  1259. referencedClasses: []
  1260. }),
  1261. smalltalk.HLInspectorVariablesWidget);
  1262. smalltalk.addMethod(
  1263. smalltalk.method({
  1264. selector: "selectItem:",
  1265. category: 'reactions',
  1266. fn: function (anObject){
  1267. var self=this;
  1268. return smalltalk.withContext(function($ctx1) {
  1269. smalltalk.HLNavigationListWidget.fn.prototype._selectItem_.apply(_st(self), [anObject]);
  1270. _st(_st(self)._model())._selectedInstVar_(anObject);
  1271. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject},smalltalk.HLInspectorVariablesWidget)})},
  1272. args: ["anObject"],
  1273. source: "selectItem: anObject\x0a\x09super selectItem: anObject.\x0a self model selectedInstVar: anObject",
  1274. messageSends: ["selectItem:", "selectedInstVar:", "model"],
  1275. referencedClasses: []
  1276. }),
  1277. smalltalk.HLInspectorVariablesWidget);
  1278. smalltalk.addMethod(
  1279. smalltalk.method({
  1280. selector: "selection",
  1281. category: 'accessing',
  1282. fn: function (){
  1283. var self=this;
  1284. return smalltalk.withContext(function($ctx1) {
  1285. var $1;
  1286. $1=_st(self["@model"])._selection();
  1287. return $1;
  1288. }, function($ctx1) {$ctx1.fill(self,"selection",{},smalltalk.HLInspectorVariablesWidget)})},
  1289. args: [],
  1290. source: "selection\x0a\x09^ model selection",
  1291. messageSends: ["selection"],
  1292. referencedClasses: []
  1293. }),
  1294. smalltalk.HLInspectorVariablesWidget);
  1295. smalltalk.addMethod(
  1296. smalltalk.method({
  1297. selector: "variables",
  1298. category: 'accessing',
  1299. fn: function (){
  1300. var self=this;
  1301. return smalltalk.withContext(function($ctx1) {
  1302. var $1;
  1303. $1=_st(self["@model"])._variables();
  1304. return $1;
  1305. }, function($ctx1) {$ctx1.fill(self,"variables",{},smalltalk.HLInspectorVariablesWidget)})},
  1306. args: [],
  1307. source: "variables\x0a\x09^ model variables",
  1308. messageSends: ["variables"],
  1309. referencedClasses: []
  1310. }),
  1311. smalltalk.HLInspectorVariablesWidget);