1
0

Helios-Inspector.js 47 KB

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