Helios-Inspector.js 45 KB

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