Helios-Inspector.deploy.js 30 KB

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