Helios-Inspector.deploy.js 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010
  1. smalltalk.addPackage('Helios-Inspector');
  2. smalltalk.addClass('HLInspector', smalltalk.HLWidget, ['model', 'variablesWidget', 'displayWidget', 'codeWidget', 'label'], 'Helios-Inspector');
  3. smalltalk.addMethod(
  4. smalltalk.method({
  5. selector: "codeWidget",
  6. fn: function (){
  7. var self=this;
  8. function $HLCodeWidget(){return smalltalk.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
  9. return smalltalk.withContext(function($ctx1) {
  10. var $2,$3,$4,$1;
  11. $2=self["@codeWidget"];
  12. if(($receiver = $2) == nil || $receiver == undefined){
  13. $3=_st($HLCodeWidget())._new();
  14. _st($3)._model_(_st(self["@model"])._code());
  15. _st($3)._receiver_(_st(self["@model"])._inspectee());
  16. $4=_st($3)._yourself();
  17. self["@codeWidget"]=$4;
  18. $1=self["@codeWidget"];
  19. } else {
  20. $1=$2;
  21. };
  22. return $1;
  23. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},smalltalk.HLInspector)})},
  24. messageSends: ["ifNil:", "model:", "code", "new", "receiver:", "inspectee", "yourself"]}),
  25. smalltalk.HLInspector);
  26. smalltalk.addMethod(
  27. smalltalk.method({
  28. selector: "displayWidget",
  29. fn: function (){
  30. var self=this;
  31. function $HLInspectorDisplayWidget(){return smalltalk.HLInspectorDisplayWidget||(typeof HLInspectorDisplayWidget=="undefined"?nil:HLInspectorDisplayWidget)}
  32. return smalltalk.withContext(function($ctx1) {
  33. var $2,$3,$4,$1;
  34. $2=self["@displayWidget"];
  35. if(($receiver = $2) == nil || $receiver == undefined){
  36. $3=_st($HLInspectorDisplayWidget())._new();
  37. _st($3)._model_(_st(self)._model());
  38. $4=_st($3)._yourself();
  39. self["@displayWidget"]=$4;
  40. $1=self["@displayWidget"];
  41. } else {
  42. $1=$2;
  43. };
  44. return $1;
  45. }, function($ctx1) {$ctx1.fill(self,"displayWidget",{},smalltalk.HLInspector)})},
  46. messageSends: ["ifNil:", "model:", "model", "new", "yourself"]}),
  47. smalltalk.HLInspector);
  48. smalltalk.addMethod(
  49. smalltalk.method({
  50. selector: "initialize",
  51. fn: function (){
  52. var self=this;
  53. return smalltalk.withContext(function($ctx1) {
  54. smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  55. _st(self)._register();
  56. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLInspector)})},
  57. messageSends: ["initialize", "register"]}),
  58. smalltalk.HLInspector);
  59. smalltalk.addMethod(
  60. smalltalk.method({
  61. selector: "inspect:",
  62. fn: function (anObject){
  63. var self=this;
  64. return smalltalk.withContext(function($ctx1) {
  65. var $1,$2;
  66. _st(_st(self)._model())._inspect_on_(anObject,self);
  67. $1=self;
  68. _st($1)._refreshVariablesWidget();
  69. $2=_st($1)._refreshDisplayWidget();
  70. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.HLInspector)})},
  71. messageSends: ["inspect:on:", "model", "refreshVariablesWidget", "refreshDisplayWidget"]}),
  72. smalltalk.HLInspector);
  73. smalltalk.addMethod(
  74. smalltalk.method({
  75. selector: "inspectee",
  76. fn: function (){
  77. var self=this;
  78. return smalltalk.withContext(function($ctx1) {
  79. var $1;
  80. $1=_st(_st(self)._model())._inspectee();
  81. return $1;
  82. }, function($ctx1) {$ctx1.fill(self,"inspectee",{},smalltalk.HLInspector)})},
  83. messageSends: ["inspectee", "model"]}),
  84. smalltalk.HLInspector);
  85. smalltalk.addMethod(
  86. smalltalk.method({
  87. selector: "inspectee:",
  88. fn: function (anObject){
  89. var self=this;
  90. return smalltalk.withContext(function($ctx1) {
  91. _st(_st(self)._model())._inspectee_(anObject);
  92. return self}, function($ctx1) {$ctx1.fill(self,"inspectee:",{anObject:anObject},smalltalk.HLInspector)})},
  93. messageSends: ["inspectee:", "model"]}),
  94. smalltalk.HLInspector);
  95. smalltalk.addMethod(
  96. smalltalk.method({
  97. selector: "label",
  98. fn: function (){
  99. var self=this;
  100. return smalltalk.withContext(function($ctx1) {
  101. var $2,$1;
  102. $2=self["@label"];
  103. if(($receiver = $2) == nil || $receiver == undefined){
  104. $1=_st(_st(self["@model"])._inspectee())._printString();
  105. } else {
  106. $1=$2;
  107. };
  108. return $1;
  109. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLInspector)})},
  110. messageSends: ["ifNil:", "printString", "inspectee"]}),
  111. smalltalk.HLInspector);
  112. smalltalk.addMethod(
  113. smalltalk.method({
  114. selector: "model",
  115. fn: function (){
  116. var self=this;
  117. function $HLInspectorModel(){return smalltalk.HLInspectorModel||(typeof HLInspectorModel=="undefined"?nil:HLInspectorModel)}
  118. return smalltalk.withContext(function($ctx1) {
  119. var $2,$1;
  120. $2=self["@model"];
  121. if(($receiver = $2) == nil || $receiver == undefined){
  122. _st(self)._model_(_st($HLInspectorModel())._new());
  123. $1=self["@model"];
  124. } else {
  125. $1=$2;
  126. };
  127. return $1;
  128. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLInspector)})},
  129. messageSends: ["ifNil:", "model:", "new"]}),
  130. smalltalk.HLInspector);
  131. smalltalk.addMethod(
  132. smalltalk.method({
  133. selector: "model:",
  134. fn: function (aModel){
  135. var self=this;
  136. return smalltalk.withContext(function($ctx1) {
  137. var $1,$2;
  138. self["@model"]=aModel;
  139. _st(_st(self)._codeWidget())._model_(_st(aModel)._code());
  140. $1=self;
  141. _st($1)._observeCodeWidget();
  142. _st($1)._observeVariablesWidget();
  143. $2=_st($1)._observeModel();
  144. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLInspector)})},
  145. messageSends: ["model:", "code", "codeWidget", "observeCodeWidget", "observeVariablesWidget", "observeModel"]}),
  146. smalltalk.HLInspector);
  147. smalltalk.addMethod(
  148. smalltalk.method({
  149. selector: "observeCodeWidget",
  150. fn: function (){
  151. var self=this;
  152. function $HLDoItExecuted(){return smalltalk.HLDoItExecuted||(typeof HLDoItExecuted=="undefined"?nil:HLDoItExecuted)}
  153. return smalltalk.withContext(function($ctx1) {
  154. _st(_st(_st(self)._codeWidget())._announcer())._on_do_($HLDoItExecuted(),(function(){
  155. return smalltalk.withContext(function($ctx2) {
  156. return _st(self)._onDoneIt();
  157. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  158. return self}, function($ctx1) {$ctx1.fill(self,"observeCodeWidget",{},smalltalk.HLInspector)})},
  159. messageSends: ["on:do:", "onDoneIt", "announcer", "codeWidget"]}),
  160. smalltalk.HLInspector);
  161. smalltalk.addMethod(
  162. smalltalk.method({
  163. selector: "observeModel",
  164. fn: function (){
  165. var self=this;
  166. function $HLInstanceVariableSelected(){return smalltalk.HLInstanceVariableSelected||(typeof HLInstanceVariableSelected=="undefined"?nil:HLInstanceVariableSelected)}
  167. return smalltalk.withContext(function($ctx1) {
  168. _st(_st(_st(self)._model())._announcer())._on_send_to_($HLInstanceVariableSelected(),"onInstanceVariableSelected",self);
  169. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLInspector)})},
  170. messageSends: ["on:send:to:", "announcer", "model"]}),
  171. smalltalk.HLInspector);
  172. smalltalk.addMethod(
  173. smalltalk.method({
  174. selector: "observeVariablesWidget",
  175. fn: function (){
  176. var self=this;
  177. function $HLDiveRequested(){return smalltalk.HLDiveRequested||(typeof HLDiveRequested=="undefined"?nil:HLDiveRequested)}
  178. return smalltalk.withContext(function($ctx1) {
  179. _st(_st(_st(self)._variablesWidget())._announcer())._on_do_($HLDiveRequested(),(function(){
  180. return smalltalk.withContext(function($ctx2) {
  181. return _st(self)._onDive();
  182. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  183. return self}, function($ctx1) {$ctx1.fill(self,"observeVariablesWidget",{},smalltalk.HLInspector)})},
  184. messageSends: ["on:do:", "onDive", "announcer", "variablesWidget"]}),
  185. smalltalk.HLInspector);
  186. smalltalk.addMethod(
  187. smalltalk.method({
  188. selector: "onDive",
  189. fn: function (){
  190. var self=this;
  191. return smalltalk.withContext(function($ctx1) {
  192. _st(self)._inspect_(_st(_st(self)._model())._selectedInstVarObject());
  193. return self}, function($ctx1) {$ctx1.fill(self,"onDive",{},smalltalk.HLInspector)})},
  194. messageSends: ["inspect:", "selectedInstVarObject", "model"]}),
  195. smalltalk.HLInspector);
  196. smalltalk.addMethod(
  197. smalltalk.method({
  198. selector: "onDoneIt",
  199. fn: function (){
  200. var self=this;
  201. return smalltalk.withContext(function($ctx1) {
  202. _st(self)._refresh();
  203. return self}, function($ctx1) {$ctx1.fill(self,"onDoneIt",{},smalltalk.HLInspector)})},
  204. messageSends: ["refresh"]}),
  205. smalltalk.HLInspector);
  206. smalltalk.addMethod(
  207. smalltalk.method({
  208. selector: "onInspectIt",
  209. fn: function (){
  210. var self=this;
  211. return smalltalk.withContext(function($ctx1) {
  212. return self}, function($ctx1) {$ctx1.fill(self,"onInspectIt",{},smalltalk.HLInspector)})},
  213. messageSends: []}),
  214. smalltalk.HLInspector);
  215. smalltalk.addMethod(
  216. smalltalk.method({
  217. selector: "onInstanceVariableSelected",
  218. fn: function (){
  219. var self=this;
  220. return smalltalk.withContext(function($ctx1) {
  221. _st(_st(self)._codeWidget())._receiver_(_st(_st(self)._model())._selectedInstVarObject());
  222. _st(self)._refreshDisplayWidget();
  223. return self}, function($ctx1) {$ctx1.fill(self,"onInstanceVariableSelected",{},smalltalk.HLInspector)})},
  224. messageSends: ["receiver:", "selectedInstVarObject", "model", "codeWidget", "refreshDisplayWidget"]}),
  225. smalltalk.HLInspector);
  226. smalltalk.addMethod(
  227. smalltalk.method({
  228. selector: "onPrintIt",
  229. fn: function (){
  230. var self=this;
  231. return smalltalk.withContext(function($ctx1) {
  232. return self}, function($ctx1) {$ctx1.fill(self,"onPrintIt",{},smalltalk.HLInspector)})},
  233. messageSends: []}),
  234. smalltalk.HLInspector);
  235. smalltalk.addMethod(
  236. smalltalk.method({
  237. selector: "open",
  238. fn: function (){
  239. var self=this;
  240. function $HLTab(){return smalltalk.HLTab||(typeof HLTab=="undefined"?nil:HLTab)}
  241. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  242. return smalltalk.withContext(function($ctx1) {
  243. _st(_st($HLManager())._current())._addTab_(_st($HLTab())._on_labelled_(self,_st(self)._tabLabel()));
  244. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.HLInspector)})},
  245. messageSends: ["addTab:", "on:labelled:", "tabLabel", "current"]}),
  246. smalltalk.HLInspector);
  247. smalltalk.addMethod(
  248. smalltalk.method({
  249. selector: "refresh",
  250. fn: function (){
  251. var self=this;
  252. return smalltalk.withContext(function($ctx1) {
  253. _st(self)._inspect_(_st(self)._inspectee());
  254. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLInspector)})},
  255. messageSends: ["inspect:", "inspectee"]}),
  256. smalltalk.HLInspector);
  257. smalltalk.addMethod(
  258. smalltalk.method({
  259. selector: "refreshDisplayWidget",
  260. fn: function (){
  261. var self=this;
  262. return smalltalk.withContext(function($ctx1) {
  263. _st(_st(self)._displayWidget())._refresh();
  264. return self}, function($ctx1) {$ctx1.fill(self,"refreshDisplayWidget",{},smalltalk.HLInspector)})},
  265. messageSends: ["refresh", "displayWidget"]}),
  266. smalltalk.HLInspector);
  267. smalltalk.addMethod(
  268. smalltalk.method({
  269. selector: "refreshVariablesWidget",
  270. fn: function (){
  271. var self=this;
  272. return smalltalk.withContext(function($ctx1) {
  273. _st(_st(self)._variablesWidget())._refresh();
  274. return self}, function($ctx1) {$ctx1.fill(self,"refreshVariablesWidget",{},smalltalk.HLInspector)})},
  275. messageSends: ["refresh", "variablesWidget"]}),
  276. smalltalk.HLInspector);
  277. smalltalk.addMethod(
  278. smalltalk.method({
  279. selector: "register",
  280. fn: function (){
  281. var self=this;
  282. return smalltalk.withContext(function($ctx1) {
  283. _st(_st(self)._class())._register_(self);
  284. return self}, function($ctx1) {$ctx1.fill(self,"register",{},smalltalk.HLInspector)})},
  285. messageSends: ["register:", "class"]}),
  286. smalltalk.HLInspector);
  287. smalltalk.addMethod(
  288. smalltalk.method({
  289. selector: "renderContentOn:",
  290. fn: function (html){
  291. var self=this;
  292. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  293. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  294. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  295. return smalltalk.withContext(function($ctx1) {
  296. _st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st(self)._variablesWidget(),_st(self)._displayWidget()),_st(self)._codeWidget())));
  297. _st(_st(self)._variablesWidget())._focus();
  298. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspector)})},
  299. messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget", "focus"]}),
  300. smalltalk.HLInspector);
  301. smalltalk.addMethod(
  302. smalltalk.method({
  303. selector: "setLabel:",
  304. fn: function (aString){
  305. var self=this;
  306. return smalltalk.withContext(function($ctx1) {
  307. self["@label"]=aString;
  308. return self}, function($ctx1) {$ctx1.fill(self,"setLabel:",{aString:aString},smalltalk.HLInspector)})},
  309. messageSends: []}),
  310. smalltalk.HLInspector);
  311. smalltalk.addMethod(
  312. smalltalk.method({
  313. selector: "setVariables:",
  314. fn: function (aDictionary){
  315. var self=this;
  316. return smalltalk.withContext(function($ctx1) {
  317. _st(_st(self)._model())._variables_(aDictionary);
  318. return self}, function($ctx1) {$ctx1.fill(self,"setVariables:",{aDictionary:aDictionary},smalltalk.HLInspector)})},
  319. messageSends: ["variables:", "model"]}),
  320. smalltalk.HLInspector);
  321. smalltalk.addMethod(
  322. smalltalk.method({
  323. selector: "tabLabel",
  324. fn: function (){
  325. var self=this;
  326. return smalltalk.withContext(function($ctx1) {
  327. return "Inspector";
  328. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLInspector)})},
  329. messageSends: []}),
  330. smalltalk.HLInspector);
  331. smalltalk.addMethod(
  332. smalltalk.method({
  333. selector: "unregister",
  334. fn: function (){
  335. var self=this;
  336. return smalltalk.withContext(function($ctx1) {
  337. smalltalk.HLWidget.fn.prototype._unregister.apply(_st(self), []);
  338. _st(_st(self)._class())._unregister_(self);
  339. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLInspector)})},
  340. messageSends: ["unregister", "unregister:", "class"]}),
  341. smalltalk.HLInspector);
  342. smalltalk.addMethod(
  343. smalltalk.method({
  344. selector: "variablesWidget",
  345. fn: function (){
  346. var self=this;
  347. function $HLInspectorVariablesWidget(){return smalltalk.HLInspectorVariablesWidget||(typeof HLInspectorVariablesWidget=="undefined"?nil:HLInspectorVariablesWidget)}
  348. return smalltalk.withContext(function($ctx1) {
  349. var $2,$3,$4,$1;
  350. $2=self["@variablesWidget"];
  351. if(($receiver = $2) == nil || $receiver == undefined){
  352. $3=_st($HLInspectorVariablesWidget())._new();
  353. _st($3)._model_(_st(self)._model());
  354. $4=_st($3)._yourself();
  355. self["@variablesWidget"]=$4;
  356. $1=self["@variablesWidget"];
  357. } else {
  358. $1=$2;
  359. };
  360. return $1;
  361. }, function($ctx1) {$ctx1.fill(self,"variablesWidget",{},smalltalk.HLInspector)})},
  362. messageSends: ["ifNil:", "model:", "model", "new", "yourself"]}),
  363. smalltalk.HLInspector);
  364. smalltalk.HLInspector.klass.iVarNames = ['inspectors'];
  365. smalltalk.addMethod(
  366. smalltalk.method({
  367. selector: "canBeOpenAsTab",
  368. fn: function (){
  369. var self=this;
  370. return smalltalk.withContext(function($ctx1) {
  371. return false;
  372. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLInspector.klass)})},
  373. messageSends: []}),
  374. smalltalk.HLInspector.klass);
  375. smalltalk.addMethod(
  376. smalltalk.method({
  377. selector: "initialize",
  378. fn: function (){
  379. var self=this;
  380. function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
  381. return smalltalk.withContext(function($ctx1) {
  382. smalltalk.HLWidget.klass.fn.prototype._initialize.apply(_st(self), []);
  383. _st($InspectorHandler())._register_(self);
  384. _st(self)._watchChanges();
  385. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLInspector.klass)})},
  386. messageSends: ["initialize", "register:", "watchChanges"]}),
  387. smalltalk.HLInspector.klass);
  388. smalltalk.addMethod(
  389. smalltalk.method({
  390. selector: "inspect:",
  391. fn: function (anObject){
  392. var self=this;
  393. return smalltalk.withContext(function($ctx1) {
  394. var $1,$2;
  395. $1=_st(self)._new();
  396. _st($1)._inspect_(anObject);
  397. $2=_st($1)._open();
  398. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.HLInspector.klass)})},
  399. messageSends: ["inspect:", "new", "open"]}),
  400. smalltalk.HLInspector.klass);
  401. smalltalk.addMethod(
  402. smalltalk.method({
  403. selector: "inspectors",
  404. fn: function (){
  405. var self=this;
  406. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  407. return smalltalk.withContext(function($ctx1) {
  408. var $2,$1;
  409. $2=self["@inspectors"];
  410. if(($receiver = $2) == nil || $receiver == undefined){
  411. self["@inspectors"]=_st($OrderedCollection())._new();
  412. $1=self["@inspectors"];
  413. } else {
  414. $1=$2;
  415. };
  416. return $1;
  417. }, function($ctx1) {$ctx1.fill(self,"inspectors",{},smalltalk.HLInspector.klass)})},
  418. messageSends: ["ifNil:", "new"]}),
  419. smalltalk.HLInspector.klass);
  420. smalltalk.addMethod(
  421. smalltalk.method({
  422. selector: "register:",
  423. fn: function (anInspector){
  424. var self=this;
  425. return smalltalk.withContext(function($ctx1) {
  426. _st(_st(self)._inspectors())._add_(anInspector);
  427. return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.HLInspector.klass)})},
  428. messageSends: ["add:", "inspectors"]}),
  429. smalltalk.HLInspector.klass);
  430. smalltalk.addMethod(
  431. smalltalk.method({
  432. selector: "tabLabel",
  433. fn: function (){
  434. var self=this;
  435. return smalltalk.withContext(function($ctx1) {
  436. return "Inspector";
  437. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLInspector.klass)})},
  438. messageSends: []}),
  439. smalltalk.HLInspector.klass);
  440. smalltalk.addMethod(
  441. smalltalk.method({
  442. selector: "tabPriority",
  443. fn: function (){
  444. var self=this;
  445. return smalltalk.withContext(function($ctx1) {
  446. var $1;
  447. $1=(10);
  448. return $1;
  449. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLInspector.klass)})},
  450. messageSends: []}),
  451. smalltalk.HLInspector.klass);
  452. smalltalk.addMethod(
  453. smalltalk.method({
  454. selector: "unregister:",
  455. fn: function (anInspector){
  456. var self=this;
  457. return smalltalk.withContext(function($ctx1) {
  458. _st(_st(self)._inspectors())._remove_(anInspector);
  459. return self}, function($ctx1) {$ctx1.fill(self,"unregister:",{anInspector:anInspector},smalltalk.HLInspector.klass)})},
  460. messageSends: ["remove:", "inspectors"]}),
  461. smalltalk.HLInspector.klass);
  462. smalltalk.addMethod(
  463. smalltalk.method({
  464. selector: "watchChanges",
  465. fn: function (){
  466. var self=this;
  467. return smalltalk.withContext(function($ctx1) {
  468. _st((function(){
  469. return smalltalk.withContext(function($ctx2) {
  470. return _st(_st(self)._inspectors())._do_((function(each){
  471. return smalltalk.withContext(function($ctx3) {
  472. return _st(each)._refresh();
  473. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  474. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithInterval_((500));
  475. return self}, function($ctx1) {$ctx1.fill(self,"watchChanges",{},smalltalk.HLInspector.klass)})},
  476. messageSends: ["valueWithInterval:", "do:", "refresh", "inspectors"]}),
  477. smalltalk.HLInspector.klass);
  478. smalltalk.addClass('HLInspectorDisplayWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Inspector');
  479. smalltalk.addMethod(
  480. smalltalk.method({
  481. selector: "model",
  482. fn: function (){
  483. var self=this;
  484. return smalltalk.withContext(function($ctx1) {
  485. var $1;
  486. $1=self["@model"];
  487. return $1;
  488. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLInspectorDisplayWidget)})},
  489. messageSends: []}),
  490. smalltalk.HLInspectorDisplayWidget);
  491. smalltalk.addMethod(
  492. smalltalk.method({
  493. selector: "model:",
  494. fn: function (aModel){
  495. var self=this;
  496. return smalltalk.withContext(function($ctx1) {
  497. self["@model"]=aModel;
  498. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLInspectorDisplayWidget)})},
  499. messageSends: []}),
  500. smalltalk.HLInspectorDisplayWidget);
  501. smalltalk.addMethod(
  502. smalltalk.method({
  503. selector: "renderContentOn:",
  504. fn: function (html){
  505. var self=this;
  506. return smalltalk.withContext(function($ctx1) {
  507. _st(_st(html)._div())._with_(_st(self)._selectionDisplayString());
  508. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspectorDisplayWidget)})},
  509. messageSends: ["with:", "selectionDisplayString", "div"]}),
  510. smalltalk.HLInspectorDisplayWidget);
  511. smalltalk.addMethod(
  512. smalltalk.method({
  513. selector: "selectionDisplayString",
  514. fn: function (){
  515. var self=this;
  516. var selection;
  517. return smalltalk.withContext(function($ctx1) {
  518. var $2,$1;
  519. selection=_st(self["@model"])._selection();
  520. $2=_st(_st(_st(self["@model"])._variables())._keys())._includes_(selection);
  521. if(smalltalk.assert($2)){
  522. $1=_st(_st(self["@model"])._instVarObjectAt_(selection))._printString();
  523. } else {
  524. $1="";
  525. };
  526. return $1;
  527. }, function($ctx1) {$ctx1.fill(self,"selectionDisplayString",{selection:selection},smalltalk.HLInspectorDisplayWidget)})},
  528. messageSends: ["selection", "ifTrue:ifFalse:", "printString", "instVarObjectAt:", "includes:", "keys", "variables"]}),
  529. smalltalk.HLInspectorDisplayWidget);
  530. smalltalk.addClass('HLInspectorModel', smalltalk.Object, ['announcer', 'environment', 'inspectee', 'code', 'variables', 'selection'], 'Helios-Inspector');
  531. smalltalk.addMethod(
  532. smalltalk.method({
  533. selector: "announcer",
  534. fn: function (){
  535. var self=this;
  536. function $Announcer(){return smalltalk.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  537. return smalltalk.withContext(function($ctx1) {
  538. var $2,$1;
  539. $2=self["@announcer"];
  540. if(($receiver = $2) == nil || $receiver == undefined){
  541. self["@announcer"]=_st($Announcer())._new();
  542. $1=self["@announcer"];
  543. } else {
  544. $1=$2;
  545. };
  546. return $1;
  547. }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLInspectorModel)})},
  548. messageSends: ["ifNil:", "new"]}),
  549. smalltalk.HLInspectorModel);
  550. smalltalk.addMethod(
  551. smalltalk.method({
  552. selector: "code",
  553. fn: function (){
  554. var self=this;
  555. function $HLCodeModel(){return smalltalk.HLCodeModel||(typeof HLCodeModel=="undefined"?nil:HLCodeModel)}
  556. return smalltalk.withContext(function($ctx1) {
  557. var $2,$1;
  558. $2=self["@code"];
  559. if(($receiver = $2) == nil || $receiver == undefined){
  560. self["@code"]=_st($HLCodeModel())._on_(_st(self)._environment());
  561. $1=self["@code"];
  562. } else {
  563. $1=$2;
  564. };
  565. return $1;
  566. }, function($ctx1) {$ctx1.fill(self,"code",{},smalltalk.HLInspectorModel)})},
  567. messageSends: ["ifNil:", "on:", "environment"]}),
  568. smalltalk.HLInspectorModel);
  569. smalltalk.addMethod(
  570. smalltalk.method({
  571. selector: "environment",
  572. fn: function (){
  573. var self=this;
  574. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  575. return smalltalk.withContext(function($ctx1) {
  576. var $2,$1;
  577. $2=self["@environment"];
  578. if(($receiver = $2) == nil || $receiver == undefined){
  579. $1=_st(_st($HLManager())._current())._environment();
  580. } else {
  581. $1=$2;
  582. };
  583. return $1;
  584. }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLInspectorModel)})},
  585. messageSends: ["ifNil:", "environment", "current"]}),
  586. smalltalk.HLInspectorModel);
  587. smalltalk.addMethod(
  588. smalltalk.method({
  589. selector: "environment:",
  590. fn: function (anEnvironment){
  591. var self=this;
  592. return smalltalk.withContext(function($ctx1) {
  593. self["@environment"]=anEnvironment;
  594. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLInspectorModel)})},
  595. messageSends: []}),
  596. smalltalk.HLInspectorModel);
  597. smalltalk.addMethod(
  598. smalltalk.method({
  599. selector: "inspect:on:",
  600. fn: function (anObject,anInspector){
  601. var self=this;
  602. return smalltalk.withContext(function($ctx1) {
  603. self["@inspectee"]=anObject;
  604. self["@variables"]=[];
  605. _st(self["@inspectee"])._inspectOn_(anInspector);
  606. return self}, function($ctx1) {$ctx1.fill(self,"inspect:on:",{anObject:anObject,anInspector:anInspector},smalltalk.HLInspectorModel)})},
  607. messageSends: ["inspectOn:"]}),
  608. smalltalk.HLInspectorModel);
  609. smalltalk.addMethod(
  610. smalltalk.method({
  611. selector: "inspectee",
  612. fn: function (){
  613. var self=this;
  614. return smalltalk.withContext(function($ctx1) {
  615. var $1;
  616. $1=self["@inspectee"];
  617. return $1;
  618. }, function($ctx1) {$ctx1.fill(self,"inspectee",{},smalltalk.HLInspectorModel)})},
  619. messageSends: []}),
  620. smalltalk.HLInspectorModel);
  621. smalltalk.addMethod(
  622. smalltalk.method({
  623. selector: "inspectee:",
  624. fn: function (anObject){
  625. var self=this;
  626. return smalltalk.withContext(function($ctx1) {
  627. self["@inspectee"]=anObject;
  628. return self}, function($ctx1) {$ctx1.fill(self,"inspectee:",{anObject:anObject},smalltalk.HLInspectorModel)})},
  629. messageSends: []}),
  630. smalltalk.HLInspectorModel);
  631. smalltalk.addMethod(
  632. smalltalk.method({
  633. selector: "instVarObjectAt:",
  634. fn: function (anInstVarName){
  635. var self=this;
  636. return smalltalk.withContext(function($ctx1) {
  637. var $1;
  638. $1=_st(_st(self)._variables())._at_(anInstVarName);
  639. return $1;
  640. }, function($ctx1) {$ctx1.fill(self,"instVarObjectAt:",{anInstVarName:anInstVarName},smalltalk.HLInspectorModel)})},
  641. messageSends: ["at:", "variables"]}),
  642. smalltalk.HLInspectorModel);
  643. smalltalk.addMethod(
  644. smalltalk.method({
  645. selector: "onKeyDown:",
  646. fn: function (anEvent){
  647. var self=this;
  648. return smalltalk.withContext(function($ctx1) {
  649. if(anEvent.ctrlKey) {
  650. if(anEvent.keyCode === 80) { //ctrl+p
  651. self._printIt();
  652. anEvent.preventDefault();
  653. return false;
  654. }
  655. if(anEvent.keyCode === 68) { //ctrl+d
  656. self._doIt();
  657. anEvent.preventDefault();
  658. return false;
  659. }
  660. if(anEvent.keyCode === 73) { //ctrl+i
  661. self._inspectIt();
  662. anEvent.preventDefault();
  663. return false;
  664. }
  665. };
  666. return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{anEvent:anEvent},smalltalk.HLInspectorModel)})},
  667. messageSends: []}),
  668. smalltalk.HLInspectorModel);
  669. smalltalk.addMethod(
  670. smalltalk.method({
  671. selector: "selectedInstVar:",
  672. fn: function (anInstVarName){
  673. var self=this;
  674. return smalltalk.withContext(function($ctx1) {
  675. _st(self)._selection_(anInstVarName);
  676. return self}, function($ctx1) {$ctx1.fill(self,"selectedInstVar:",{anInstVarName:anInstVarName},smalltalk.HLInspectorModel)})},
  677. messageSends: ["selection:"]}),
  678. smalltalk.HLInspectorModel);
  679. smalltalk.addMethod(
  680. smalltalk.method({
  681. selector: "selectedInstVarObject",
  682. fn: function (){
  683. var self=this;
  684. return smalltalk.withContext(function($ctx1) {
  685. var $1;
  686. $1=_st(self)._instVarObjectAt_(_st(self)._selection());
  687. return $1;
  688. }, function($ctx1) {$ctx1.fill(self,"selectedInstVarObject",{},smalltalk.HLInspectorModel)})},
  689. messageSends: ["instVarObjectAt:", "selection"]}),
  690. smalltalk.HLInspectorModel);
  691. smalltalk.addMethod(
  692. smalltalk.method({
  693. selector: "selection",
  694. fn: function (){
  695. var self=this;
  696. return smalltalk.withContext(function($ctx1) {
  697. var $2,$1;
  698. $2=self["@selection"];
  699. if(($receiver = $2) == nil || $receiver == undefined){
  700. $1="";
  701. } else {
  702. $1=$2;
  703. };
  704. return $1;
  705. }, function($ctx1) {$ctx1.fill(self,"selection",{},smalltalk.HLInspectorModel)})},
  706. messageSends: ["ifNil:"]}),
  707. smalltalk.HLInspectorModel);
  708. smalltalk.addMethod(
  709. smalltalk.method({
  710. selector: "selection:",
  711. fn: function (anObject){
  712. var self=this;
  713. function $HLInstanceVariableSelected(){return smalltalk.HLInstanceVariableSelected||(typeof HLInstanceVariableSelected=="undefined"?nil:HLInstanceVariableSelected)}
  714. return smalltalk.withContext(function($ctx1) {
  715. self["@selection"]=anObject;
  716. _st(_st(self)._announcer())._announce_(_st($HLInstanceVariableSelected())._on_(self["@selection"]));
  717. return self}, function($ctx1) {$ctx1.fill(self,"selection:",{anObject:anObject},smalltalk.HLInspectorModel)})},
  718. messageSends: ["announce:", "on:", "announcer"]}),
  719. smalltalk.HLInspectorModel);
  720. smalltalk.addMethod(
  721. smalltalk.method({
  722. selector: "subscribe:",
  723. fn: function (aWidget){
  724. var self=this;
  725. return smalltalk.withContext(function($ctx1) {
  726. _st(aWidget)._subscribeTo_(_st(self)._announcer());
  727. return self}, function($ctx1) {$ctx1.fill(self,"subscribe:",{aWidget:aWidget},smalltalk.HLInspectorModel)})},
  728. messageSends: ["subscribeTo:", "announcer"]}),
  729. smalltalk.HLInspectorModel);
  730. smalltalk.addMethod(
  731. smalltalk.method({
  732. selector: "variables",
  733. fn: function (){
  734. var self=this;
  735. return smalltalk.withContext(function($ctx1) {
  736. var $1;
  737. $1=self["@variables"];
  738. return $1;
  739. }, function($ctx1) {$ctx1.fill(self,"variables",{},smalltalk.HLInspectorModel)})},
  740. messageSends: []}),
  741. smalltalk.HLInspectorModel);
  742. smalltalk.addMethod(
  743. smalltalk.method({
  744. selector: "variables:",
  745. fn: function (aCollection){
  746. var self=this;
  747. return smalltalk.withContext(function($ctx1) {
  748. self["@variables"]=aCollection;
  749. return self}, function($ctx1) {$ctx1.fill(self,"variables:",{aCollection:aCollection},smalltalk.HLInspectorModel)})},
  750. messageSends: []}),
  751. smalltalk.HLInspectorModel);
  752. smalltalk.addMethod(
  753. smalltalk.method({
  754. selector: "on:",
  755. fn: function (anEnvironment){
  756. var self=this;
  757. return smalltalk.withContext(function($ctx1) {
  758. var $2,$3,$1;
  759. $2=_st(self)._new();
  760. _st($2)._environment_(anEnvironment);
  761. $3=_st($2)._yourself();
  762. $1=$3;
  763. return $1;
  764. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},smalltalk.HLInspectorModel.klass)})},
  765. messageSends: ["environment:", "new", "yourself"]}),
  766. smalltalk.HLInspectorModel.klass);
  767. smalltalk.addClass('HLInspectorVariablesWidget', smalltalk.HLNavigationListWidget, ['announcer', 'model', 'list', 'diveButton'], 'Helios-Inspector');
  768. smalltalk.addMethod(
  769. smalltalk.method({
  770. selector: "announcer",
  771. fn: function (){
  772. var self=this;
  773. function $Announcer(){return smalltalk.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  774. return smalltalk.withContext(function($ctx1) {
  775. var $2,$1;
  776. $2=self["@announcer"];
  777. if(($receiver = $2) == nil || $receiver == undefined){
  778. self["@announcer"]=_st($Announcer())._new();
  779. $1=self["@announcer"];
  780. } else {
  781. $1=$2;
  782. };
  783. return $1;
  784. }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLInspectorVariablesWidget)})},
  785. messageSends: ["ifNil:", "new"]}),
  786. smalltalk.HLInspectorVariablesWidget);
  787. smalltalk.addMethod(
  788. smalltalk.method({
  789. selector: "defaultItems",
  790. fn: function (){
  791. var self=this;
  792. return smalltalk.withContext(function($ctx1) {
  793. var $1;
  794. $1=_st(_st(_st(self)._model())._variables())._keys();
  795. return $1;
  796. }, function($ctx1) {$ctx1.fill(self,"defaultItems",{},smalltalk.HLInspectorVariablesWidget)})},
  797. messageSends: ["keys", "variables", "model"]}),
  798. smalltalk.HLInspectorVariablesWidget);
  799. smalltalk.addMethod(
  800. smalltalk.method({
  801. selector: "label",
  802. fn: function (){
  803. var self=this;
  804. return smalltalk.withContext(function($ctx1) {
  805. var $1;
  806. $1=_st(_st(_st(_st(self)._model())._inspectee())._class())._name();
  807. return $1;
  808. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLInspectorVariablesWidget)})},
  809. messageSends: ["name", "class", "inspectee", "model"]}),
  810. smalltalk.HLInspectorVariablesWidget);
  811. smalltalk.addMethod(
  812. smalltalk.method({
  813. selector: "model",
  814. fn: function (){
  815. var self=this;
  816. return smalltalk.withContext(function($ctx1) {
  817. var $1;
  818. $1=self["@model"];
  819. return $1;
  820. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLInspectorVariablesWidget)})},
  821. messageSends: []}),
  822. smalltalk.HLInspectorVariablesWidget);
  823. smalltalk.addMethod(
  824. smalltalk.method({
  825. selector: "model:",
  826. fn: function (aModel){
  827. var self=this;
  828. return smalltalk.withContext(function($ctx1) {
  829. self["@model"]=aModel;
  830. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLInspectorVariablesWidget)})},
  831. messageSends: []}),
  832. smalltalk.HLInspectorVariablesWidget);
  833. smalltalk.addMethod(
  834. smalltalk.method({
  835. selector: "refresh",
  836. fn: function (){
  837. var self=this;
  838. return smalltalk.withContext(function($ctx1) {
  839. _st(self)._resetItems();
  840. smalltalk.HLNavigationListWidget.fn.prototype._refresh.apply(_st(self), []);
  841. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLInspectorVariablesWidget)})},
  842. messageSends: ["resetItems", "refresh"]}),
  843. smalltalk.HLInspectorVariablesWidget);
  844. smalltalk.addMethod(
  845. smalltalk.method({
  846. selector: "renderButtonsOn:",
  847. fn: function (html){
  848. var self=this;
  849. function $HLDiveRequested(){return smalltalk.HLDiveRequested||(typeof HLDiveRequested=="undefined"?nil:HLDiveRequested)}
  850. return smalltalk.withContext(function($ctx1) {
  851. var $1,$2;
  852. $1=_st(html)._button();
  853. _st($1)._class_("btn");
  854. _st($1)._with_("Dive");
  855. $2=_st($1)._onClick_((function(){
  856. return smalltalk.withContext(function($ctx2) {
  857. return _st(_st(self)._announcer())._announce_(_st($HLDiveRequested())._new());
  858. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  859. self["@diveButton"]=$2;
  860. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLInspectorVariablesWidget)})},
  861. messageSends: ["class:", "button", "with:", "onClick:", "announce:", "new", "announcer"]}),
  862. smalltalk.HLInspectorVariablesWidget);
  863. smalltalk.addMethod(
  864. smalltalk.method({
  865. selector: "renderContentOn:",
  866. fn: function (html){
  867. var self=this;
  868. return smalltalk.withContext(function($ctx1) {
  869. _st(self)._renderHeadOn_(html);
  870. smalltalk.HLNavigationListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  871. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspectorVariablesWidget)})},
  872. messageSends: ["renderHeadOn:", "renderContentOn:"]}),
  873. smalltalk.HLInspectorVariablesWidget);
  874. smalltalk.addMethod(
  875. smalltalk.method({
  876. selector: "renderHeadOn:",
  877. fn: function (html){
  878. var self=this;
  879. return smalltalk.withContext(function($ctx1) {
  880. var $1,$2;
  881. $1=_st(html)._div();
  882. _st($1)._class_("list-label");
  883. $2=_st($1)._with_(_st(self)._label());
  884. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},smalltalk.HLInspectorVariablesWidget)})},
  885. messageSends: ["class:", "div", "with:", "label"]}),
  886. smalltalk.HLInspectorVariablesWidget);
  887. smalltalk.addMethod(
  888. smalltalk.method({
  889. selector: "resetItems",
  890. fn: function (){
  891. var self=this;
  892. return smalltalk.withContext(function($ctx1) {
  893. self["@items"]=nil;
  894. return self}, function($ctx1) {$ctx1.fill(self,"resetItems",{},smalltalk.HLInspectorVariablesWidget)})},
  895. messageSends: []}),
  896. smalltalk.HLInspectorVariablesWidget);
  897. smalltalk.addMethod(
  898. smalltalk.method({
  899. selector: "selectItem:",
  900. fn: function (anObject){
  901. var self=this;
  902. return smalltalk.withContext(function($ctx1) {
  903. smalltalk.HLNavigationListWidget.fn.prototype._selectItem_.apply(_st(self), [anObject]);
  904. _st(_st(self)._model())._selectedInstVar_(anObject);
  905. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject},smalltalk.HLInspectorVariablesWidget)})},
  906. messageSends: ["selectItem:", "selectedInstVar:", "model"]}),
  907. smalltalk.HLInspectorVariablesWidget);
  908. smalltalk.addMethod(
  909. smalltalk.method({
  910. selector: "selection",
  911. fn: function (){
  912. var self=this;
  913. return smalltalk.withContext(function($ctx1) {
  914. var $1;
  915. $1=_st(self["@model"])._selection();
  916. return $1;
  917. }, function($ctx1) {$ctx1.fill(self,"selection",{},smalltalk.HLInspectorVariablesWidget)})},
  918. messageSends: ["selection"]}),
  919. smalltalk.HLInspectorVariablesWidget);
  920. smalltalk.addMethod(
  921. smalltalk.method({
  922. selector: "variables",
  923. fn: function (){
  924. var self=this;
  925. return smalltalk.withContext(function($ctx1) {
  926. var $1;
  927. $1=_st(self["@model"])._variables();
  928. return $1;
  929. }, function($ctx1) {$ctx1.fill(self,"variables",{},smalltalk.HLInspectorVariablesWidget)})},
  930. messageSends: ["variables"]}),
  931. smalltalk.HLInspectorVariablesWidget);