Helios-Inspector.js 47 KB

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