Helios-Inspector.js 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433
  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)._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:", "selectedInstVarObject", "model", "new", "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. _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: "refresh",
  993. category: 'actions',
  994. fn: function (){
  995. var self=this;
  996. return smalltalk.withContext(function($ctx1) {
  997. var $1,$2;
  998. $1=self;
  999. _st($1)._refreshVariablesWidget();
  1000. $2=_st($1)._refreshDisplayWidget();
  1001. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLInspectorWidget)})},
  1002. args: [],
  1003. source: "refresh\x0a\x09self \x0a\x09\x09refreshVariablesWidget;\x0a\x09\x09refreshDisplayWidget",
  1004. messageSends: ["refreshVariablesWidget", "refreshDisplayWidget"],
  1005. referencedClasses: []
  1006. }),
  1007. smalltalk.HLInspectorWidget);
  1008. smalltalk.addMethod(
  1009. smalltalk.method({
  1010. selector: "refreshDisplayWidget",
  1011. category: 'actions',
  1012. fn: function (){
  1013. var self=this;
  1014. return smalltalk.withContext(function($ctx1) {
  1015. _st(_st(self)._displayWidget())._refresh();
  1016. return self}, function($ctx1) {$ctx1.fill(self,"refreshDisplayWidget",{},smalltalk.HLInspectorWidget)})},
  1017. args: [],
  1018. source: "refreshDisplayWidget\x0a\x09self displayWidget refresh",
  1019. messageSends: ["refresh", "displayWidget"],
  1020. referencedClasses: []
  1021. }),
  1022. smalltalk.HLInspectorWidget);
  1023. smalltalk.addMethod(
  1024. smalltalk.method({
  1025. selector: "refreshVariablesWidget",
  1026. category: 'actions',
  1027. fn: function (){
  1028. var self=this;
  1029. return smalltalk.withContext(function($ctx1) {
  1030. _st(_st(self)._variablesWidget())._refresh();
  1031. return self}, function($ctx1) {$ctx1.fill(self,"refreshVariablesWidget",{},smalltalk.HLInspectorWidget)})},
  1032. args: [],
  1033. source: "refreshVariablesWidget\x0a\x09self variablesWidget refresh",
  1034. messageSends: ["refresh", "variablesWidget"],
  1035. referencedClasses: []
  1036. }),
  1037. smalltalk.HLInspectorWidget);
  1038. smalltalk.addMethod(
  1039. smalltalk.method({
  1040. selector: "register",
  1041. category: 'registration',
  1042. fn: function (){
  1043. var self=this;
  1044. function $HLInspector(){return smalltalk.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
  1045. return smalltalk.withContext(function($ctx1) {
  1046. _st($HLInspector())._register_(self);
  1047. return self}, function($ctx1) {$ctx1.fill(self,"register",{},smalltalk.HLInspectorWidget)})},
  1048. args: [],
  1049. source: "register\x0a\x09HLInspector register: self",
  1050. messageSends: ["register:"],
  1051. referencedClasses: ["HLInspector"]
  1052. }),
  1053. smalltalk.HLInspectorWidget);
  1054. smalltalk.addMethod(
  1055. smalltalk.method({
  1056. selector: "renderContentOn:",
  1057. category: 'rendering',
  1058. fn: function (html){
  1059. var self=this;
  1060. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  1061. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  1062. return smalltalk.withContext(function($ctx1) {
  1063. _st(html)._with_(_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st(self)._variablesWidget(),_st(self)._displayWidget()),_st(self)._codeWidget()));
  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)\x0a ",
  1067. messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget"],
  1068. referencedClasses: ["HLVerticalSplitter", "HLHorizontalSplitter"]
  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(_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(_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.HLWidget.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 == undefined){
  1144. $3=_st($HLInspectorVariablesWidget())._new();
  1145. _st($3)._model_(_st(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:", "model", "new", "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 $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  1168. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  1169. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  1170. return smalltalk.withContext(function($ctx1) {
  1171. _st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st(self)._variablesWidget(),_st(self)._displayWidget()),_st(self)._codeWidget())));
  1172. _st(_st(self)._variablesWidget())._focus();
  1173. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspector)})},
  1174. args: ["html"],
  1175. 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",
  1176. messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget", "focus"],
  1177. referencedClasses: ["HLVerticalSplitter", "HLHorizontalSplitter", "HLContainer"]
  1178. }),
  1179. smalltalk.HLInspector);
  1180. smalltalk.HLInspector.klass.iVarNames = ['inspectors'];
  1181. smalltalk.addMethod(
  1182. smalltalk.method({
  1183. selector: "canBeOpenAsTab",
  1184. category: 'testing',
  1185. fn: function (){
  1186. var self=this;
  1187. return smalltalk.withContext(function($ctx1) {
  1188. return false;
  1189. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLInspector.klass)})},
  1190. args: [],
  1191. source: "canBeOpenAsTab\x0a\x09^ false",
  1192. messageSends: [],
  1193. referencedClasses: []
  1194. }),
  1195. smalltalk.HLInspector.klass);
  1196. smalltalk.addMethod(
  1197. smalltalk.method({
  1198. selector: "initialize",
  1199. category: 'initialization',
  1200. fn: function (){
  1201. var self=this;
  1202. return smalltalk.withContext(function($ctx1) {
  1203. smalltalk.HLInspectorWidget.klass.fn.prototype._initialize.apply(_st(self), []);
  1204. _st(self)._watchChanges();
  1205. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLInspector.klass)})},
  1206. args: [],
  1207. source: "initialize\x0a\x09super initialize.\x0a\x09self watchChanges",
  1208. messageSends: ["initialize", "watchChanges"],
  1209. referencedClasses: []
  1210. }),
  1211. smalltalk.HLInspector.klass);
  1212. smalltalk.addMethod(
  1213. smalltalk.method({
  1214. selector: "inspect:",
  1215. category: 'actions',
  1216. fn: function (anObject){
  1217. var self=this;
  1218. return smalltalk.withContext(function($ctx1) {
  1219. var $1,$2;
  1220. $1=_st(self)._new();
  1221. _st($1)._inspect_(anObject);
  1222. $2=_st($1)._openAsTab();
  1223. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.HLInspector.klass)})},
  1224. args: ["anObject"],
  1225. source: "inspect: anObject\x0a\x09self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09openAsTab",
  1226. messageSends: ["inspect:", "new", "openAsTab"],
  1227. referencedClasses: []
  1228. }),
  1229. smalltalk.HLInspector.klass);
  1230. smalltalk.addMethod(
  1231. smalltalk.method({
  1232. selector: "inspectors",
  1233. category: 'accessing',
  1234. fn: function (){
  1235. var self=this;
  1236. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  1237. return smalltalk.withContext(function($ctx1) {
  1238. var $2,$1;
  1239. $2=self["@inspectors"];
  1240. if(($receiver = $2) == nil || $receiver == undefined){
  1241. self["@inspectors"]=_st($OrderedCollection())._new();
  1242. $1=self["@inspectors"];
  1243. } else {
  1244. $1=$2;
  1245. };
  1246. return $1;
  1247. }, function($ctx1) {$ctx1.fill(self,"inspectors",{},smalltalk.HLInspector.klass)})},
  1248. args: [],
  1249. source: "inspectors\x0a\x09^ inspectors ifNil: [ inspectors := OrderedCollection new ]",
  1250. messageSends: ["ifNil:", "new"],
  1251. referencedClasses: ["OrderedCollection"]
  1252. }),
  1253. smalltalk.HLInspector.klass);
  1254. smalltalk.addMethod(
  1255. smalltalk.method({
  1256. selector: "register:",
  1257. category: 'registration',
  1258. fn: function (anInspector){
  1259. var self=this;
  1260. return smalltalk.withContext(function($ctx1) {
  1261. _st(_st(self)._inspectors())._add_(anInspector);
  1262. return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.HLInspector.klass)})},
  1263. args: ["anInspector"],
  1264. source: "register: anInspector\x0a\x09self inspectors add: anInspector",
  1265. messageSends: ["add:", "inspectors"],
  1266. referencedClasses: []
  1267. }),
  1268. smalltalk.HLInspector.klass);
  1269. smalltalk.addMethod(
  1270. smalltalk.method({
  1271. selector: "tabClass",
  1272. category: 'accessing',
  1273. fn: function (){
  1274. var self=this;
  1275. return smalltalk.withContext(function($ctx1) {
  1276. return "inspector";
  1277. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLInspector.klass)})},
  1278. args: [],
  1279. source: "tabClass\x0a\x09^ 'inspector'",
  1280. messageSends: [],
  1281. referencedClasses: []
  1282. }),
  1283. smalltalk.HLInspector.klass);
  1284. smalltalk.addMethod(
  1285. smalltalk.method({
  1286. selector: "tabLabel",
  1287. category: 'accessing',
  1288. fn: function (){
  1289. var self=this;
  1290. return smalltalk.withContext(function($ctx1) {
  1291. return "Inspector";
  1292. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLInspector.klass)})},
  1293. args: [],
  1294. source: "tabLabel\x0a\x09^ 'Inspector'",
  1295. messageSends: [],
  1296. referencedClasses: []
  1297. }),
  1298. smalltalk.HLInspector.klass);
  1299. smalltalk.addMethod(
  1300. smalltalk.method({
  1301. selector: "tabPriority",
  1302. category: 'accessing',
  1303. fn: function (){
  1304. var self=this;
  1305. return smalltalk.withContext(function($ctx1) {
  1306. return (10);
  1307. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLInspector.klass)})},
  1308. args: [],
  1309. source: "tabPriority\x0a\x09^ 10",
  1310. messageSends: [],
  1311. referencedClasses: []
  1312. }),
  1313. smalltalk.HLInspector.klass);
  1314. smalltalk.addMethod(
  1315. smalltalk.method({
  1316. selector: "unregister:",
  1317. category: 'registration',
  1318. fn: function (anInspector){
  1319. var self=this;
  1320. return smalltalk.withContext(function($ctx1) {
  1321. _st(_st(self)._inspectors())._remove_(anInspector);
  1322. return self}, function($ctx1) {$ctx1.fill(self,"unregister:",{anInspector:anInspector},smalltalk.HLInspector.klass)})},
  1323. args: ["anInspector"],
  1324. source: "unregister: anInspector\x0a\x09self inspectors remove: anInspector",
  1325. messageSends: ["remove:", "inspectors"],
  1326. referencedClasses: []
  1327. }),
  1328. smalltalk.HLInspector.klass);
  1329. smalltalk.addMethod(
  1330. smalltalk.method({
  1331. selector: "watchChanges",
  1332. category: 'initialization',
  1333. fn: function (){
  1334. var self=this;
  1335. return smalltalk.withContext(function($ctx1) {
  1336. _st((function(){
  1337. return smalltalk.withContext(function($ctx2) {
  1338. return _st(_st(self)._inspectors())._do_((function(each){
  1339. return smalltalk.withContext(function($ctx3) {
  1340. return _st(each)._refresh();
  1341. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  1342. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithInterval_((500));
  1343. return self}, function($ctx1) {$ctx1.fill(self,"watchChanges",{},smalltalk.HLInspector.klass)})},
  1344. args: [],
  1345. source: "watchChanges\x0a\x09[ self inspectors do: [ :each | each refresh ] ]\x0a\x09\x09valueWithInterval: 500",
  1346. messageSends: ["valueWithInterval:", "do:", "refresh", "inspectors"],
  1347. referencedClasses: []
  1348. }),
  1349. smalltalk.HLInspector.klass);