1
0

Helios-Inspector.js 48 KB

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